From a1e6b249cf06724d5a28e96d20425fb4bdf5e9f9 Mon Sep 17 00:00:00 2001 From: Brendan Forster Date: Fri, 28 Feb 2020 17:24:34 -0400 Subject: [PATCH] add snapshot of github schema for test purposes --- schema/api.github.com.json | 145893 ++++++++++++++++++++++++++++++++++ 1 file changed, 145893 insertions(+) create mode 100644 schema/api.github.com.json diff --git a/schema/api.github.com.json b/schema/api.github.com.json new file mode 100644 index 00000000..1d86c902 --- /dev/null +++ b/schema/api.github.com.json @@ -0,0 +1,145893 @@ +{ + "openapi": "3.0.1", + "info": { + "version": "9.0.0", + "title": "GitHub v3 REST API", + "description": "# Introduction\n\nThis describes the resources that make up the official GitHub REST API v3. If you have any problems or requests, please contact [GitHub Support](https://github.com/contact).", + "license": { + "name": "MIT" + }, + "termsOfService": "https://help.github.com/articles/github-terms-of-service/", + "contact": { + "name": "Support", + "email": "support@github.com" + } + }, + "servers": [ + { + "url": "https://api.github.com" + } + ], + "externalDocs": { + "description": "GitHub v3 REST API", + "url": "https://developer.github.com/v3/" + }, + "paths": { + "/app": { + "get": { + "summary": "Get the authenticated GitHub App", + "description": "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](https://developer.github.com/v3/apps/#list-installations)\" endpoint.\n\nYou must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.", + "operationId": "apps/get-authenticated", + "tags": [ + "apps" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/apps/#get-the-authenticated-github-app" + }, + "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 + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "slug": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "public_members_url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "external_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "metadata": { + "type": "string" + }, + "contents": { + "type": "string" + }, + "issues": { + "type": "string" + }, + "single_file": { + "type": "string" + } + } + }, + "events": { + "type": "array", + "items": { + "type": "string" + } + }, + "installations_count": { + "type": "number" + } + } + }, + "example": { + "id": 1, + "slug": "octoapp", + "node_id": "MDExOkludGVncmF0aW9uMQ==", + "owner": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization" + }, + "name": "Octocat App", + "description": "", + "external_url": "https://example.com", + "html_url": "https://github.com/apps/octoapp", + "created_at": "2017-07-08T16:18:44-04:00", + "updated_at": "2017-07-08T16:18:44-04:00", + "permissions": { + "metadata": "read", + "contents": "read", + "issues": "write", + "single_file": "write" + }, + "events": [ + "push", + "pull_request" + ], + "installations_count": 3 + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.machine-man-preview+json\" \\\n https://api.github.com/app" + }, + { + "lang": "JS", + "source": "octokit.apps.getAuthenticated()" + }, + { + "lang": "Ruby", + "source": "octokit.authenticated()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "machine-man", + "note": "To access the API with your GitHub App, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` Header for your requests.\n\n`application/vnd.github.machine-man-preview+json`", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/app-manifests/{code}/conversions": { + "post": { + "summary": "Create a GitHub App from a manifest", + "description": "Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://developer.github.com/apps/building-github-apps/creating-github-apps-from-a-manifest/). 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`.", + "operationId": "apps/create-from-manifest", + "tags": [ + "apps" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/apps/#create-a-github-app-from-a-manifest" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.fury-preview+json" + }, + "required": true + }, + { + "name": "code", + "description": "code parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "external_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "client_id": { + "type": "string" + }, + "client_secret": { + "type": "string" + }, + "webhook_secret": { + "type": "string" + }, + "pem": { + "type": "string" + } + } + }, + "example": { + "id": 1, + "node_id": "MDM6QXBwNTk=", + "owner": { + "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 + }, + "name": "octoapp", + "description": null, + "external_url": "https://www.example.com", + "html_url": "https://github.com/apps/octoapp", + "created_at": "2018-09-13T12:28:37Z", + "updated_at": "2018-09-13T12:28:37Z", + "client_id": "Iv1.8a61f9b3a7aba766", + "client_secret": "1726be1638095a19edd134c77bde3aa2ece1e5d8", + "webhook_secret": "e340154128314309424b7c8e90325147d99fdafa", + "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" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.fury-preview+json\" \\\n https://api.github.com/app-manifests/CODE/conversions" + }, + { + "lang": "JS", + "source": "octokit.apps.createFromManifest({\n code: 'code'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_from_manifest(\n 'code'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [ + { + "name": "fury", + "note": "GitHub App Manifests are currently available for developers to preview. To access this API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.fury-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/app/installations": { + "get": { + "summary": "List installations", + "description": "You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.\n\nThe permissions the installation has are included under the `permissions` key.", + "operationId": "apps/list-installations", + "tags": [ + "apps" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/apps/#list-installations" + }, + "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 + }, + { + "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": "The permissions the installation has are included under the `permissions` key.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "account": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "public_members_url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "access_tokens_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "app_id": { + "type": "number" + }, + "target_id": { + "type": "number" + }, + "target_type": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "metadata": { + "type": "string" + }, + "contents": { + "type": "string" + }, + "issues": { + "type": "string" + }, + "single_file": { + "type": "string" + } + } + }, + "events": { + "type": "array", + "items": { + "type": "string" + } + }, + "single_file_name": { + "type": "string" + }, + "repository_selection": { + "type": "string" + } + } + } + }, + "example": [ + { + "id": 1, + "account": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization" + }, + "access_tokens_url": "https://api.github.com/installations/1/access_tokens", + "repositories_url": "https://api.github.com/installation/repositories", + "html_url": "https://github.com/organizations/github/settings/installations/1", + "app_id": 1, + "target_id": 1, + "target_type": "Organization", + "permissions": { + "metadata": "read", + "contents": "read", + "issues": "write", + "single_file": "write" + }, + "events": [ + "push", + "pull_request" + ], + "single_file_name": "config.yml", + "repository_selection": "selected" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.machine-man-preview+json\" \\\n https://api.github.com/app/installations" + }, + { + "lang": "JS", + "source": "octokit.apps.listInstallations()" + }, + { + "lang": "Ruby", + "source": "octokit.installations()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "machine-man", + "note": "To access the API with your GitHub App, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` Header for your requests.\n\n`application/vnd.github.machine-man-preview+json`", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/app/installations/{installation_id}": { + "get": { + "summary": "Get an installation", + "description": "You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.", + "operationId": "apps/get-installation", + "tags": [ + "apps" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/apps/#get-an-installation" + }, + "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 + }, + { + "name": "installation_id", + "description": "installation_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "account": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "public_members_url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "access_tokens_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "app_id": { + "type": "number" + }, + "target_id": { + "type": "number" + }, + "target_type": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "metadata": { + "type": "string" + }, + "contents": { + "type": "string" + }, + "issues": { + "type": "string" + }, + "single_file": { + "type": "string" + } + } + }, + "events": { + "type": "array", + "items": { + "type": "string" + } + }, + "single_file_name": { + "type": "string" + }, + "repository_selection": { + "type": "string" + } + } + }, + "example": { + "id": 1, + "account": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization" + }, + "access_tokens_url": "https://api.github.com/installations/1/access_tokens", + "repositories_url": "https://api.github.com/installation/repositories", + "html_url": "https://github.com/organizations/github/settings/installations/1", + "app_id": 1, + "target_id": 1, + "target_type": "Organization", + "permissions": { + "metadata": "read", + "contents": "read", + "issues": "write", + "single_file": "write" + }, + "events": [ + "push", + "pull_request" + ], + "single_file_name": "config.yml", + "repository_selection": "selected" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.machine-man-preview+json\" \\\n https://api.github.com/app/installations/42" + }, + { + "lang": "JS", + "source": "octokit.apps.getInstallation({\n installation_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.installation(\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "machine-man", + "note": "To access the API with your GitHub App, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` Header for your requests.\n\n`application/vnd.github.machine-man-preview+json`", + "required": true + } + ] + }, + "x-changes": [] + }, + "delete": { + "summary": "Delete an installation", + "description": "Uninstalls a GitHub App on a user, organization, or business account.\n\nYou must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.", + "operationId": "apps/delete-installation", + "tags": [ + "apps" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/apps/#delete-an-installation" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.gambit-preview+json,application/vnd.github.machine-man-preview+json" + }, + "required": true + }, + { + "name": "installation_id", + "description": "installation_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.gambit-preview+json,application/vnd.github.machine-man-preview+json\" \\\n https://api.github.com/app/installations/42" + }, + { + "lang": "JS", + "source": "octokit.apps.deleteInstallation({\n installation_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_installation(\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [ + { + "name": "gambit", + "note": "Uninstalling 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](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.gambit-preview+json\n\n```", + "required": true + }, + { + "name": "machine-man", + "note": "To access the API with your GitHub App, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` Header for your requests.\n\n`application/vnd.github.machine-man-preview+json`", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/app/installations/{installation_id}/access_tokens": { + "post": { + "summary": "Create a new installation token", + "description": "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.\n\nYou must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.\n\nThis example grants the token \"Read and write\" permission to `issues` and \"Read\" permission to `contents`, and restricts the token's access to the repository with an `id` of 1296269.", + "operationId": "apps/create-installation-token", + "tags": [ + "apps" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/apps/#create-a-new-installation-token" + }, + "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 + }, + { + "name": "installation_id", + "description": "installation_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "token": { + "type": "string" + }, + "expires_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "issues": { + "type": "string" + }, + "contents": { + "type": "string" + } + } + }, + "repositories": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + } + } + } + }, + "example": { + "token": "v1.1f699f1069f60xxx", + "expires_at": "2016-07-11T22:14:10Z", + "permissions": { + "issues": "write", + "contents": "read" + }, + "repositories": [ + { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.machine-man-preview+json\" \\\n https://api.github.com/app/installations/42/access_tokens \\\n -d '{\"repository_ids\":[42]}'" + }, + { + "lang": "JS", + "source": "octokit.apps.createInstallationToken({\n installation_id: 42,\n repository_ids: [\n 42\n ]\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_installation_token(\n 42,\n [\n 42\n ]\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "machine-man", + "note": "To access the API with your GitHub App, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` Header for your requests.\n\n`application/vnd.github.machine-man-preview+json`", + "required": true + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "repository_ids": { + "type": "array", + "description": "The `id`s of the repositories that the installation token can access. Providing repository `id`s restricts the access of an installation token to specific repositories. You can use the \"[List repositories](https://developer.github.com/v3/apps/installations/#list-repositories)\" endpoint to get the `id` of all repositories that an installation can access. For example, you can select specific repositories when creating an installation token to restrict the number of repositories that can be cloned using the token.", + "items": { + "type": "integer" + } + }, + "permissions": { + "type": "object", + "description": "The permissions granted to the access token. The permissions object includes the permission names and their access type. For a complete list of permissions and allowable values, see \"[GitHub App permissions](https://developer.github.com/apps/building-github-apps/creating-github-apps-using-url-parameters/#github-app-permissions).\"", + "properties": {} + } + } + }, + "example": { + "repository_ids": [ + 1296269 + ], + "permissions": { + "issues": "write", + "contents": "read" + } + } + } + } + } + } + }, + "/applications/grants": { + "get": { + "summary": "List your grants", + "description": "**Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), 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](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).\n\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](https://developer.github.com/v3/oauth_authorizations/#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](https://github.com/settings/applications#authorized). 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\"]`.", + "operationId": "oauth-authorizations/list-grants", + "tags": [ + "oauth-authorizations" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/oauth_authorizations/#list-your-grants" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "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": { + "id": { + "type": "number" + }, + "url": { + "type": "string" + }, + "app": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "client_id": { + "type": "string" + } + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "example": [ + { + "id": 1, + "url": "https://api.github.com/applications/grants/1", + "app": { + "url": "http://my-github-app.com", + "name": "my github app", + "client_id": "abcde12345fghij67890" + }, + "created_at": "2011-09-06T17:26:27Z", + "updated_at": "2011-09-06T20:39:23Z", + "scopes": [ + "public_repo" + ] + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/applications/grants" + }, + { + "lang": "JS", + "source": "octokit.oauthAuthorizations.listGrants()" + }, + { + "lang": "Ruby", + "source": "octokit.grants()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "deprecated": true + } + }, + "/applications/grants/{grant_id}": { + "get": { + "summary": "Get a single grant", + "description": "**Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), 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](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).", + "operationId": "oauth-authorizations/get-grant", + "tags": [ + "oauth-authorizations" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/oauth_authorizations/#get-a-single-grant" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "grant_id", + "description": "grant_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "url": { + "type": "string" + }, + "app": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "client_id": { + "type": "string" + } + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "example": { + "id": 1, + "url": "https://api.github.com/applications/grants/1", + "app": { + "url": "http://my-github-app.com", + "name": "my github app", + "client_id": "abcde12345fghij67890" + }, + "created_at": "2011-09-06T17:26:27Z", + "updated_at": "2011-09-06T20:39:23Z", + "scopes": [ + "public_repo" + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/applications/grants/42" + }, + { + "lang": "JS", + "source": "octokit.oauthAuthorizations.getGrant({\n grant_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.grant(\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "deprecated": true + }, + "delete": { + "summary": "Delete a grant", + "description": "**Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), 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](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).\n\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](https://github.com/settings/applications#authorized).", + "operationId": "oauth-authorizations/delete-grant", + "tags": [ + "oauth-authorizations" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/oauth_authorizations/#delete-a-grant" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "grant_id", + "description": "grant_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/applications/grants/42" + }, + { + "lang": "JS", + "source": "octokit.oauthAuthorizations.deleteGrant({\n grant_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_grant(\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "deprecated": true + } + }, + "/applications/{client_id}/grant": { + "delete": { + "summary": "Delete an app authorization", + "description": "OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted.\n\nDeleting 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](https://github.com/settings/applications#authorized).", + "operationId": "apps/delete-authorization", + "tags": [ + "apps" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/apps/oauth_applications/#delete-an-app-authorization" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.doctor-strange-preview+json" + }, + "required": true + }, + { + "name": "client_id", + "description": "client_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.doctor-strange-preview+json\" \\\n https://api.github.com/applications/CLIENT_ID/grant \\\n -d '{\"access_token\":\"access_token\"}'" + }, + { + "lang": "JS", + "source": "octokit.apps.deleteAuthorization({\n client_id: 'client_id',\n access_token: 'access_token'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_authorization(\n 'client_id',\n 'access_token'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [ + { + "name": "doctor-strange", + "note": "New endpoints using OAuth tokens as input parameters instead of path parameters are available for developers to preview in the [OAuth Applications API](https://developer.github.com/v3/apps/oauth_applications/). To access these endpoints during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.doctor-strange-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "access_token": { + "type": "string", + "description": "The OAuth access token used to authenticate to the GitHub API." + } + } + }, + "example": { + "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" + } + } + } + } + } + }, + "/applications/{client_id}/grants/{access_token}": { + "delete": { + "summary": "Revoke a grant for an application", + "description": "**Deprecation Notice:** GitHub will replace and discontinue OAuth endpoints containing `access_token` in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using `access_token` as an input parameter. The OAuth Application API will be removed on July 1, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/).\n\nOAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid token as `:access_token` and the grant for the token's owner will be deleted.\n\nDeleting 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 Applications settings page under \"Authorized OAuth Apps\" on GitHub](https://github.com/settings/applications#authorized).", + "operationId": "apps/revoke-grant-for-application", + "tags": [ + "apps" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/apps/oauth_applications/#revoke-a-grant-for-an-application" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "client_id", + "description": "client_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "access_token", + "description": "access_token parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/applications/CLIENT_ID/grants/ACCESS_TOKEN" + }, + { + "lang": "JS", + "source": "octokit.apps.revokeGrantForApplication({\n client_id: 'client_id',\n access_token: 'access_token'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.revoke_grant_for_application(\n 'client_id',\n 'access_token'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "operation", + "date": "2019-11-05", + "note": "\"Revoke a grant for an application\" has been moved from \"OAuth Authorizations\" to \"Apps\"", + "before": { + "operationId": "oauth-authorizations/revoke-grant-for-application" + }, + "after": { + "operationId": "apps/revoke-grant-for-application" + } + } + ], + "deprecated": true + } + }, + "/applications/{client_id}/token": { + "post": { + "summary": "Check a token", + "description": "OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`.", + "operationId": "apps/check-token", + "tags": [ + "apps" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/apps/oauth_applications/#check-a-token" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.doctor-strange-preview+json" + }, + "required": true + }, + { + "name": "client_id", + "description": "client_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "url": { + "type": "string" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + } + }, + "token": { + "type": "string" + }, + "token_last_eight": { + "type": "string" + }, + "hashed_token": { + "type": "string" + }, + "app": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "client_id": { + "type": "string" + } + } + }, + "note": { + "type": "string" + }, + "note_url": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "fingerprint": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + } + }, + "example": { + "id": 1, + "url": "https://api.github.com/authorizations/1", + "scopes": [ + "public_repo" + ], + "token": "abcdefgh12345678", + "token_last_eight": "12345678", + "hashed_token": "25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8", + "app": { + "url": "http://my-github-app.com", + "name": "my github app", + "client_id": "abcde12345fghij67890" + }, + "note": "optional note", + "note_url": "http://optional/note/url", + "updated_at": "2011-09-06T20:39:23Z", + "created_at": "2011-09-06T17:26:27Z", + "fingerprint": "jklmnop12345678", + "user": { + "login": "octocat", + "id": 1, + "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 + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.doctor-strange-preview+json\" \\\n https://api.github.com/applications/CLIENT_ID/token \\\n -d '{\"access_token\":\"access_token\"}'" + }, + { + "lang": "JS", + "source": "octokit.apps.checkToken({\n client_id: 'client_id',\n access_token: 'access_token'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.check_token(\n 'client_id',\n 'access_token'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [ + { + "name": "doctor-strange", + "note": "New endpoints using OAuth tokens as input parameters instead of path parameters are available for developers to preview in the [OAuth Applications API](https://developer.github.com/v3/apps/oauth_applications/). To access these endpoints during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.doctor-strange-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "access_token": { + "type": "string", + "description": "The OAuth access token used to authenticate to the GitHub API." + } + } + }, + "example": { + "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" + } + } + } + } + }, + "patch": { + "summary": "Reset a token", + "description": "OAuth applications can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the \"token\" property in the response because changes take effect immediately. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`.", + "operationId": "apps/reset-token", + "tags": [ + "apps" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/apps/oauth_applications/#reset-a-token" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.doctor-strange-preview+json" + }, + "required": true + }, + { + "name": "client_id", + "description": "client_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "url": { + "type": "string" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + } + }, + "token": { + "type": "string" + }, + "token_last_eight": { + "type": "string" + }, + "hashed_token": { + "type": "string" + }, + "app": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "client_id": { + "type": "string" + } + } + }, + "note": { + "type": "string" + }, + "note_url": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "fingerprint": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + } + }, + "example": { + "id": 1, + "url": "https://api.github.com/authorizations/1", + "scopes": [ + "public_repo" + ], + "token": "abcdefgh12345678", + "token_last_eight": "12345678", + "hashed_token": "25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8", + "app": { + "url": "http://my-github-app.com", + "name": "my github app", + "client_id": "abcde12345fghij67890" + }, + "note": "optional note", + "note_url": "http://optional/note/url", + "updated_at": "2011-09-06T20:39:23Z", + "created_at": "2011-09-06T17:26:27Z", + "fingerprint": "jklmnop12345678", + "user": { + "login": "octocat", + "id": 1, + "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 + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\n -H\"Accept: application/vnd.github.doctor-strange-preview+json\" \\\n https://api.github.com/applications/CLIENT_ID/token \\\n -d '{\"access_token\":\"access_token\"}'" + }, + { + "lang": "JS", + "source": "octokit.apps.resetToken({\n client_id: 'client_id',\n access_token: 'access_token'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.reset_token(\n 'client_id',\n 'access_token'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [ + { + "name": "doctor-strange", + "note": "New endpoints using OAuth tokens as input parameters instead of path parameters are available for developers to preview in the [OAuth Applications API](https://developer.github.com/v3/apps/oauth_applications/). To access these endpoints during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.doctor-strange-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "access_token": { + "type": "string", + "description": "The OAuth access token used to authenticate to the GitHub API." + } + } + }, + "example": { + "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" + } + } + } + } + }, + "delete": { + "summary": "Delete an app token", + "description": "OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password.", + "operationId": "apps/delete-token", + "tags": [ + "apps" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/apps/oauth_applications/#delete-an-app-token" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.doctor-strange-preview+json" + }, + "required": true + }, + { + "name": "client_id", + "description": "client_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.doctor-strange-preview+json\" \\\n https://api.github.com/applications/CLIENT_ID/token \\\n -d '{\"access_token\":\"access_token\"}'" + }, + { + "lang": "JS", + "source": "octokit.apps.deleteToken({\n client_id: 'client_id',\n access_token: 'access_token'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_token(\n 'client_id',\n 'access_token'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [ + { + "name": "doctor-strange", + "note": "New endpoints using OAuth tokens as input parameters instead of path parameters are available for developers to preview in the [OAuth Applications API](https://developer.github.com/v3/apps/oauth_applications/). To access these endpoints during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.doctor-strange-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "access_token": { + "type": "string", + "description": "The OAuth access token used to authenticate to the GitHub API." + } + } + }, + "example": { + "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" + } + } + } + } + } + }, + "/applications/{client_id}/tokens/{access_token}": { + "get": { + "summary": "Check an authorization", + "description": "**Deprecation Notice:** GitHub will replace and discontinue OAuth endpoints containing `access_token` in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using `access_token` as an input parameter. The OAuth Application API will be removed on July 1, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/).\n\nOAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`.", + "operationId": "apps/check-authorization", + "tags": [ + "apps" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/apps/oauth_applications/#check-an-authorization" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "client_id", + "description": "client_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "access_token", + "description": "access_token parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "url": { + "type": "string" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + } + }, + "token": { + "type": "string" + }, + "token_last_eight": { + "type": "string" + }, + "hashed_token": { + "type": "string" + }, + "app": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "client_id": { + "type": "string" + } + } + }, + "note": { + "type": "string" + }, + "note_url": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "fingerprint": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + } + }, + "example": { + "id": 1, + "url": "https://api.github.com/authorizations/1", + "scopes": [ + "public_repo" + ], + "token": "abcdefgh12345678", + "token_last_eight": "12345678", + "hashed_token": "25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8", + "app": { + "url": "http://my-github-app.com", + "name": "my github app", + "client_id": "abcde12345fghij67890" + }, + "note": "optional note", + "note_url": "http://optional/note/url", + "updated_at": "2011-09-06T20:39:23Z", + "created_at": "2011-09-06T17:26:27Z", + "fingerprint": "jklmnop12345678", + "user": { + "login": "octocat", + "id": 1, + "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 + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/applications/CLIENT_ID/tokens/ACCESS_TOKEN" + }, + { + "lang": "JS", + "source": "octokit.apps.checkAuthorization({\n client_id: 'client_id',\n access_token: 'access_token'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.check_authorization(\n 'client_id',\n 'access_token'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "operation", + "date": "2019-11-05", + "note": "\"Check an authorization\" has been moved from \"OAuth Authorizations\" to \"Apps\"", + "before": { + "operationId": "oauth-authorizations/check-authorization" + }, + "after": { + "operationId": "apps/check-authorization" + } + } + ], + "deprecated": true + }, + "post": { + "summary": "Reset an authorization", + "description": "**Deprecation Notice:** GitHub will replace and discontinue OAuth endpoints containing `access_token` in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using `access_token` as an input parameter. The OAuth Application API will be removed on July 1, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/).\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](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`.", + "operationId": "apps/reset-authorization", + "tags": [ + "apps" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/apps/oauth_applications/#reset-an-authorization" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "client_id", + "description": "client_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "access_token", + "description": "access_token parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "url": { + "type": "string" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + } + }, + "token": { + "type": "string" + }, + "token_last_eight": { + "type": "string" + }, + "hashed_token": { + "type": "string" + }, + "app": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "client_id": { + "type": "string" + } + } + }, + "note": { + "type": "string" + }, + "note_url": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "fingerprint": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + } + }, + "example": { + "id": 1, + "url": "https://api.github.com/authorizations/1", + "scopes": [ + "public_repo" + ], + "token": "abcdefgh12345678", + "token_last_eight": "12345678", + "hashed_token": "25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8", + "app": { + "url": "http://my-github-app.com", + "name": "my github app", + "client_id": "abcde12345fghij67890" + }, + "note": "optional note", + "note_url": "http://optional/note/url", + "updated_at": "2011-09-06T20:39:23Z", + "created_at": "2011-09-06T17:26:27Z", + "fingerprint": "jklmnop12345678", + "user": { + "login": "octocat", + "id": 1, + "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 + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/applications/CLIENT_ID/tokens/ACCESS_TOKEN" + }, + { + "lang": "JS", + "source": "octokit.apps.resetAuthorization({\n client_id: 'client_id',\n access_token: 'access_token'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.reset_authorization(\n 'client_id',\n 'access_token'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "operation", + "date": "2019-11-05", + "note": "\"Reset an authorization\" has been moved from \"OAuth Authorizations\" to \"Apps\"", + "before": { + "operationId": "oauth-authorizations/reset-authorization" + }, + "after": { + "operationId": "apps/reset-authorization" + } + } + ], + "deprecated": true + }, + "delete": { + "summary": "Revoke an authorization for an application", + "description": "**Deprecation Notice:** GitHub will replace and discontinue OAuth endpoints containing `access_token` in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using `access_token` as an input parameter. The OAuth Application API will be removed on July 1, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/).\n\nOAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password.", + "operationId": "apps/revoke-authorization-for-application", + "tags": [ + "apps" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/apps/oauth_applications/#revoke-an-authorization-for-an-application" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "client_id", + "description": "client_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "access_token", + "description": "access_token parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/applications/CLIENT_ID/tokens/ACCESS_TOKEN" + }, + { + "lang": "JS", + "source": "octokit.apps.revokeAuthorizationForApplication({\n client_id: 'client_id',\n access_token: 'access_token'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.revoke_authorization_for_application(\n 'client_id',\n 'access_token'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "operation", + "date": "2019-11-05", + "note": "\"Revoke an authorization for an application\" has been moved from \"OAuth Authorizations\" to \"Apps\"", + "before": { + "operationId": "oauth-authorizations/revoke-authorization-for-application" + }, + "after": { + "operationId": "apps/revoke-authorization-for-application" + } + } + ], + "deprecated": true + } + }, + "/apps/{app_slug}": { + "get": { + "summary": "Get a single GitHub App", + "description": "**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`).\n\nIf 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](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.", + "operationId": "apps/get-by-slug", + "tags": [ + "apps" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/apps/#get-a-single-github-app" + }, + "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 + }, + { + "name": "app_slug", + "description": "app_slug parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "slug": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "public_members_url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "external_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "metadata": { + "type": "string" + }, + "contents": { + "type": "string" + }, + "issues": { + "type": "string" + }, + "single_file": { + "type": "string" + } + } + }, + "events": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "example": { + "id": 1, + "slug": "octoapp", + "node_id": "MDExOkludGVncmF0aW9uMQ==", + "owner": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization" + }, + "name": "Octocat App", + "description": "", + "external_url": "https://example.com", + "html_url": "https://github.com/apps/octoapp", + "created_at": "2017-07-08T16:18:44-04:00", + "updated_at": "2017-07-08T16:18:44-04:00", + "permissions": { + "metadata": "read", + "contents": "read", + "issues": "write", + "single_file": "write" + }, + "events": [ + "push", + "pull_request" + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.machine-man-preview+json\" \\\n https://api.github.com/apps/APP_SLUG" + }, + { + "lang": "JS", + "source": "octokit.apps.getBySlug({\n app_slug: 'app_slug'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.by_slug(\n 'app_slug'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "machine-man", + "note": "To access the API with your GitHub App, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` Header for your requests.\n\n`application/vnd.github.machine-man-preview+json`", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/authorizations": { + "get": { + "summary": "List your authorizations", + "description": "**Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), 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](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).", + "operationId": "oauth-authorizations/list-authorizations", + "tags": [ + "oauth-authorizations" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/oauth_authorizations/#list-your-authorizations" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "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": { + "id": { + "type": "number" + }, + "url": { + "type": "string" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + } + }, + "token": { + "type": "string" + }, + "token_last_eight": { + "type": "string" + }, + "hashed_token": { + "type": "string" + }, + "app": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "client_id": { + "type": "string" + } + } + }, + "note": { + "type": "string" + }, + "note_url": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "fingerprint": { + "type": "string" + } + } + } + }, + "example": [ + { + "id": 1, + "url": "https://api.github.com/authorizations/1", + "scopes": [ + "public_repo" + ], + "token": "", + "token_last_eight": "12345678", + "hashed_token": "25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8", + "app": { + "url": "http://my-github-app.com", + "name": "my github app", + "client_id": "abcde12345fghij67890" + }, + "note": "optional note", + "note_url": "http://optional/note/url", + "updated_at": "2011-09-06T20:39:23Z", + "created_at": "2011-09-06T17:26:27Z", + "fingerprint": "jklmnop12345678" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/authorizations" + }, + { + "lang": "JS", + "source": "octokit.oauthAuthorizations.listAuthorizations()" + }, + { + "lang": "Ruby", + "source": "octokit.authorizations()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "deprecated": true + }, + "post": { + "summary": "Create a new authorization", + "description": "**Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), 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](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).\n\n**Warning:** Apps must use the [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api).\n\nCreates OAuth tokens using [Basic Authentication](https://developer.github.com/v3/auth#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](https://developer.github.com/v3/auth/#working-with-two-factor-authentication).\"\n\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.\n\nYou can also create tokens on GitHub from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://help.github.com/articles/creating-an-access-token-for-command-line-use).\n\nOrganizations that enforce SAML SSO require personal access tokens to be whitelisted. Read more about whitelisting tokens in [the GitHub Help documentation](https://help.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on).", + "operationId": "oauth-authorizations/create-authorization", + "tags": [ + "oauth-authorizations" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/oauth_authorizations/#create-a-new-authorization" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "url": { + "type": "string" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + } + }, + "token": { + "type": "string" + }, + "token_last_eight": { + "type": "string" + }, + "hashed_token": { + "type": "string" + }, + "app": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "client_id": { + "type": "string" + } + } + }, + "note": { + "type": "string" + }, + "note_url": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "fingerprint": { + "type": "string" + } + } + }, + "example": { + "id": 1, + "url": "https://api.github.com/authorizations/1", + "scopes": [ + "public_repo" + ], + "token": "abcdefgh12345678", + "token_last_eight": "12345678", + "hashed_token": "25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8", + "app": { + "url": "http://my-github-app.com", + "name": "my github app", + "client_id": "abcde12345fghij67890" + }, + "note": "optional note", + "note_url": "http://optional/note/url", + "updated_at": "2011-09-06T20:39:23Z", + "created_at": "2011-09-06T17:26:27Z", + "fingerprint": "" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/authorizations \\\n -d '{\"note\":\"note\"}'" + }, + { + "lang": "JS", + "source": "octokit.oauthAuthorizations.createAuthorization({\n note: 'note'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_authorization(\n 'note'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "scopes": { + "type": "array", + "description": "A list of scopes that this authorization is in.", + "items": { + "type": "string" + } + }, + "note": { + "type": "string", + "description": "A note to remind you what the OAuth token is for. Tokens not associated with a specific OAuth application (i.e. personal access tokens) must have a unique note." + }, + "note_url": { + "type": "string", + "description": "A URL to remind you what app the OAuth token is for." + }, + "client_id": { + "type": "string", + "description": "The 20 character OAuth app client key for which to create the token." + }, + "client_secret": { + "type": "string", + "description": "The 40 character OAuth app client secret for which to create the token." + }, + "fingerprint": { + "type": "string", + "description": "A unique string to distinguish an authorization from others created for the same client ID and user." + } + }, + "required": [ + "note" + ] + }, + "example": { + "scopes": [ + "public_repo" + ], + "note": "admin script" + } + } + } + }, + "deprecated": true + } + }, + "/authorizations/clients/{client_id}": { + "put": { + "summary": "Get-or-create an authorization for a specific app", + "description": "**Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), 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](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).\n\n**Warning:** Apps must use the [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api).\n\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.\n\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](https://developer.github.com/v3/auth/#working-with-two-factor-authentication).\"\n\n**Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), 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](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).", + "operationId": "oauth-authorizations/get-or-create-authorization-for-app", + "tags": [ + "oauth-authorizations" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "client_id", + "description": "client_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Response if returning an existing token", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "url": { + "type": "string" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + } + }, + "token": { + "type": "string" + }, + "token_last_eight": { + "type": "string" + }, + "hashed_token": { + "type": "string" + }, + "app": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "client_id": { + "type": "string" + } + } + }, + "note": { + "type": "string" + }, + "note_url": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "fingerprint": { + "type": "string" + } + } + }, + "examples": { + "response-if-returning-an-existing-token": { + "value": { + "id": 1, + "url": "https://api.github.com/authorizations/1", + "scopes": [ + "public_repo" + ], + "token": "", + "token_last_eight": "12345678", + "hashed_token": "25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8", + "app": { + "url": "http://my-github-app.com", + "name": "my github app", + "client_id": "abcde12345fghij67890" + }, + "note": "optional note", + "note_url": "http://optional/note/url", + "updated_at": "2011-09-06T20:39:23Z", + "created_at": "2011-09-06T17:26:27Z", + "fingerprint": "" + } + } + } + } + } + }, + "201": { + "description": "**Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), 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](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "url": { + "type": "string" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + } + }, + "token": { + "type": "string" + }, + "token_last_eight": { + "type": "string" + }, + "hashed_token": { + "type": "string" + }, + "app": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "client_id": { + "type": "string" + } + } + }, + "note": { + "type": "string" + }, + "note_url": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "fingerprint": { + "type": "string" + } + } + }, + "example": { + "id": 1, + "url": "https://api.github.com/authorizations/1", + "scopes": [ + "public_repo" + ], + "token": "abcdefgh12345678", + "token_last_eight": "12345678", + "hashed_token": "25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8", + "app": { + "url": "http://my-github-app.com", + "name": "my github app", + "client_id": "abcde12345fghij67890" + }, + "note": "optional note", + "note_url": "http://optional/note/url", + "updated_at": "2011-09-06T20:39:23Z", + "created_at": "2011-09-06T17:26:27Z", + "fingerprint": "" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/authorizations/clients/CLIENT_ID \\\n -d '{\"client_secret\":\"client_secret\"}'" + }, + { + "lang": "JS", + "source": "octokit.oauthAuthorizations.getOrCreateAuthorizationForApp({\n client_id: 'client_id',\n client_secret: 'client_secret'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.or_create_authorization_for_app(\n 'client_id',\n 'client_secret'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "client_secret": { + "type": "string", + "description": "The 40 character OAuth app client secret associated with the client ID specified in the URL." + }, + "scopes": { + "type": "array", + "description": "A list of scopes that this authorization is in.", + "items": { + "type": "string" + } + }, + "note": { + "type": "string", + "description": "A note to remind you what the OAuth token is for." + }, + "note_url": { + "type": "string", + "description": "A URL to remind you what app the OAuth token is for." + }, + "fingerprint": { + "type": "string", + "description": "A unique string to distinguish an authorization from others created for the same client and user. If provided, this API is functionally equivalent to [Get-or-create an authorization for a specific app and fingerprint](https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app-and-fingerprint)." + } + }, + "required": [ + "client_secret" + ] + }, + "example": { + "client_secret": "abcdabcdabcdabcdabcdabcdabcdabcdabcdabcd", + "scopes": [ + "public_repo" + ], + "note": "admin script" + } + } + } + }, + "deprecated": true + } + }, + "/authorizations/clients/{client_id}/{fingerprint}": { + "put": { + "summary": "Get-or-create an authorization for a specific app and fingerprint", + "description": "**Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), 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](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).\n\n**Warning:** Apps must use the [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api).\n\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.\n\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](https://developer.github.com/v3/auth/#working-with-two-factor-authentication).\"", + "operationId": "oauth-authorizations/get-or-create-authorization-for-app-and-fingerprint", + "tags": [ + "oauth-authorizations" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app-and-fingerprint" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "client_id", + "description": "client_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "fingerprint", + "description": "fingerprint parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Response if returning an existing token", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "url": { + "type": "string" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + } + }, + "token": { + "type": "string" + }, + "token_last_eight": { + "type": "string" + }, + "hashed_token": { + "type": "string" + }, + "app": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "client_id": { + "type": "string" + } + } + }, + "note": { + "type": "string" + }, + "note_url": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "fingerprint": { + "type": "string" + } + } + }, + "examples": { + "response-if-returning-an-existing-token": { + "value": { + "id": 1, + "url": "https://api.github.com/authorizations/1", + "scopes": [ + "public_repo" + ], + "token": "", + "token_last_eight": "12345678", + "hashed_token": "25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8", + "app": { + "url": "http://my-github-app.com", + "name": "my github app", + "client_id": "abcde12345fghij67890" + }, + "note": "optional note", + "note_url": "http://optional/note/url", + "updated_at": "2011-09-06T20:39:23Z", + "created_at": "2011-09-06T17:26:27Z", + "fingerprint": "jklmnop12345678" + } + } + } + } + } + }, + "201": { + "description": "Response if returning a new token", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "url": { + "type": "string" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + } + }, + "token": { + "type": "string" + }, + "token_last_eight": { + "type": "string" + }, + "hashed_token": { + "type": "string" + }, + "app": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "client_id": { + "type": "string" + } + } + }, + "note": { + "type": "string" + }, + "note_url": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "fingerprint": { + "type": "string" + } + } + }, + "example": { + "id": 1, + "url": "https://api.github.com/authorizations/1", + "scopes": [ + "public_repo" + ], + "token": "abcdefgh12345678", + "token_last_eight": "12345678", + "hashed_token": "25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8", + "app": { + "url": "http://my-github-app.com", + "name": "my github app", + "client_id": "abcde12345fghij67890" + }, + "note": "optional note", + "note_url": "http://optional/note/url", + "updated_at": "2011-09-06T20:39:23Z", + "created_at": "2011-09-06T17:26:27Z", + "fingerprint": "jklmnop12345678" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/authorizations/clients/CLIENT_ID/FINGERPRINT \\\n -d '{\"client_secret\":\"client_secret\"}'" + }, + { + "lang": "JS", + "source": "octokit.oauthAuthorizations.getOrCreateAuthorizationForAppAndFingerprint({\n client_id: 'client_id',\n fingerprint: 'fingerprint',\n client_secret: 'client_secret'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.or_create_authorization_for_app_and_fingerprint(\n 'client_id',\n 'fingerprint',\n 'client_secret'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "operation", + "date": "2018-12-27", + "note": "`idName` changed for \"Get-or-create an authorization for a specific app and fingerprint\". It now includes `-and-`", + "before": { + "operationId": "oauth-authorizations/get-or-create-authorization-for-app-fingerprint" + }, + "after": { + "operationId": "oauth-authorizations/get-or-create-authorization-for-app-and-fingerprint" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "client_secret": { + "type": "string", + "description": "The 40 character OAuth app client secret associated with the client ID specified in the URL." + }, + "scopes": { + "type": "array", + "description": "A list of scopes that this authorization is in.", + "items": { + "type": "string" + } + }, + "note": { + "type": "string", + "description": "A note to remind you what the OAuth token is for." + }, + "note_url": { + "type": "string", + "description": "A URL to remind you what app the OAuth token is for." + } + }, + "required": [ + "client_secret" + ] + }, + "example": { + "client_secret": "abcdabcdabcdabcdabcdabcdabcdabcdabcdabcd", + "scopes": [ + "public_repo" + ], + "note": "admin script" + } + } + } + }, + "deprecated": true + } + }, + "/authorizations/{authorization_id}": { + "get": { + "summary": "Get a single authorization", + "description": "**Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), 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](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).", + "operationId": "oauth-authorizations/get-authorization", + "tags": [ + "oauth-authorizations" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/oauth_authorizations/#get-a-single-authorization" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "authorization_id", + "description": "authorization_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "url": { + "type": "string" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + } + }, + "token": { + "type": "string" + }, + "token_last_eight": { + "type": "string" + }, + "hashed_token": { + "type": "string" + }, + "app": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "client_id": { + "type": "string" + } + } + }, + "note": { + "type": "string" + }, + "note_url": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "fingerprint": { + "type": "string" + } + } + }, + "example": { + "id": 1, + "url": "https://api.github.com/authorizations/1", + "scopes": [ + "public_repo" + ], + "token": "", + "token_last_eight": "12345678", + "hashed_token": "25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8", + "app": { + "url": "http://my-github-app.com", + "name": "my github app", + "client_id": "abcde12345fghij67890" + }, + "note": "optional note", + "note_url": "http://optional/note/url", + "updated_at": "2011-09-06T20:39:23Z", + "created_at": "2011-09-06T17:26:27Z", + "fingerprint": "jklmnop12345678" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/authorizations/42" + }, + { + "lang": "JS", + "source": "octokit.oauthAuthorizations.getAuthorization({\n authorization_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.authorization(\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "deprecated": true + }, + "patch": { + "summary": "Update an existing authorization", + "description": "**Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), 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](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).\n\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](https://developer.github.com/v3/auth/#working-with-two-factor-authentication).\"\n\nYou can only send one of these scope keys at a time.", + "operationId": "oauth-authorizations/update-authorization", + "tags": [ + "oauth-authorizations" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/oauth_authorizations/#update-an-existing-authorization" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "authorization_id", + "description": "authorization_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "url": { + "type": "string" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + } + }, + "token": { + "type": "string" + }, + "token_last_eight": { + "type": "string" + }, + "hashed_token": { + "type": "string" + }, + "app": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "client_id": { + "type": "string" + } + } + }, + "note": { + "type": "string" + }, + "note_url": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "fingerprint": { + "type": "string" + } + } + }, + "example": { + "id": 1, + "url": "https://api.github.com/authorizations/1", + "scopes": [ + "public_repo" + ], + "token": "", + "token_last_eight": "12345678", + "hashed_token": "25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8", + "app": { + "url": "http://my-github-app.com", + "name": "my github app", + "client_id": "abcde12345fghij67890" + }, + "note": "optional note", + "note_url": "http://optional/note/url", + "updated_at": "2011-09-06T20:39:23Z", + "created_at": "2011-09-06T17:26:27Z", + "fingerprint": "jklmnop12345678" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/authorizations/42 \\\n -d '{\"scopes\":[\"scopes\"]}'" + }, + { + "lang": "JS", + "source": "octokit.oauthAuthorizations.updateAuthorization({\n authorization_id: 42,\n scopes: [\n 'scopes'\n ]\n})" + }, + { + "lang": "Ruby", + "source": "octokit.update_authorization(\n 42,\n [\n 'scopes'\n ]\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "scopes": { + "type": "array", + "description": "Replaces the authorization scopes with these.", + "items": { + "type": "string" + } + }, + "add_scopes": { + "type": "array", + "description": "A list of scopes to add to this authorization.", + "items": { + "type": "string" + } + }, + "remove_scopes": { + "type": "array", + "description": "A list of scopes to remove from this authorization.", + "items": { + "type": "string" + } + }, + "note": { + "type": "string", + "description": "A note to remind you what the OAuth token is for. Tokens not associated with a specific OAuth application (i.e. personal access tokens) must have a unique note." + }, + "note_url": { + "type": "string", + "description": "A URL to remind you what app the OAuth token is for." + }, + "fingerprint": { + "type": "string", + "description": "A unique string to distinguish an authorization from others created for the same client ID and user." + } + } + }, + "example": { + "add_scopes": [ + "repo" + ], + "note": "admin script" + } + } + } + }, + "deprecated": true + }, + "delete": { + "summary": "Delete an authorization", + "description": "**Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), 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](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).", + "operationId": "oauth-authorizations/delete-authorization", + "tags": [ + "oauth-authorizations" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/oauth_authorizations/#delete-an-authorization" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "authorization_id", + "description": "authorization_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/authorizations/42" + }, + { + "lang": "JS", + "source": "octokit.oauthAuthorizations.deleteAuthorization({\n authorization_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_authorization(\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "deprecated": true + } + }, + "/codes_of_conduct": { + "get": { + "summary": "List all codes of conduct", + "description": "", + "operationId": "codes-of-conduct/list-conduct-codes", + "tags": [ + "codes-of-conduct" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/codes_of_conduct/#list-all-codes-of-conduct" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.scarlet-witch-preview+json" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "type": "string" + } + } + } + }, + "example": [ + { + "key": "citizen_code_of_conduct", + "name": "Citizen Code of Conduct", + "url": "https://api.github.com/codes_of_conduct/citizen_code_of_conduct" + }, + { + "key": "contributor_covenant", + "name": "Contributor Covenant", + "url": "https://api.github.com/codes_of_conduct/contributor_covenant" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.scarlet-witch-preview+json\" \\\n https://api.github.com/codes_of_conduct" + }, + { + "lang": "JS", + "source": "octokit.codesOfConduct.listConductCodes()" + }, + { + "lang": "Ruby", + "source": "octokit.conduct_codes()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "scarlet-witch", + "note": "The Codes of Conduct API is currently available for developers to preview.\n\nTo access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.scarlet-witch-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/codes_of_conduct/{key}": { + "get": { + "summary": "Get an individual code of conduct", + "description": "", + "operationId": "codes-of-conduct/get-conduct-code", + "tags": [ + "codes-of-conduct" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/codes_of_conduct/#get-an-individual-code-of-conduct" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.scarlet-witch-preview+json" + }, + "required": true + }, + { + "name": "key", + "description": "key parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "type": "string" + }, + "body": { + "type": "string" + } + } + }, + "example": { + "key": "contributor_covenant", + "name": "Contributor Covenant", + "url": "https://api.github.com/codes_of_conduct/contributor_covenant", + "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" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.scarlet-witch-preview+json\" \\\n https://api.github.com/codes_of_conduct/KEY" + }, + { + "lang": "JS", + "source": "octokit.codesOfConduct.getConductCode({\n key: 'key'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.conduct_code(\n 'key'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "scarlet-witch", + "note": "The Codes of Conduct API is currently available for developers to preview.\n\nTo access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.scarlet-witch-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/content_references/{content_reference_id}/attachments": { + "post": { + "summary": "Create a content attachment", + "description": "Creates 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](https://developer.github.com/v3/activity/events/types/#contentreferenceevent) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://developer.github.com/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.\n\nThis example creates a content attachment for the domain `https://errors.ai/`.", + "operationId": "apps/create-content-attachment", + "tags": [ + "apps" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/apps/installations/#create-a-content-attachment" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.corsair-preview+json" + }, + "required": true + }, + { + "name": "content_reference_id", + "description": "content_reference_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + } + } + }, + "example": { + "id": 101, + "title": "[A-1234] Error found in core/models.py file'", + "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()" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.corsair-preview+json\" \\\n https://api.github.com/content_references/42/attachments \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'" + }, + { + "lang": "JS", + "source": "octokit.apps.createContentAttachment({\n content_reference_id: 42,\n title: 'title',\n body: 'body'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_content_attachment(\n 42,\n 'title',\n 'body'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "corsair", + "note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.corsair-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "The title of the content attachment displayed in the body or comment of an issue or pull request." + }, + "body": { + "type": "string", + "description": "The body text of the content attachment displayed in the body or comment of an issue or pull request. This parameter supports markdown." + } + }, + "required": [ + "title", + "body" + ] + }, + "example": { + "title": "[A-1234] Error found in core/models.py file", + "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\nself.save()" + } + } + } + } + } + }, + "/emojis": { + "get": { + "summary": "Get", + "description": "Lists all the emojis available to use on GitHub.\n\n", + "operationId": "emojis/get", + "tags": [ + "emojis" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/emojis/#emojis" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + } + ], + "responses": { + "200": { + "description": "response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/emojis" + }, + { + "lang": "JS", + "source": "octokit.emojis.get()" + }, + { + "lang": "Ruby", + "source": "octokit.get()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/events": { + "get": { + "summary": "List public events", + "description": "We 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.", + "operationId": "activity/list-public-events", + "tags": [ + "activity" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/activity/events/#list-public-events" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "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": { + "418": { + "description": "Response definition missing" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/events" + }, + { + "lang": "JS", + "source": "octokit.activity.listPublicEvents()" + }, + { + "lang": "Ruby", + "source": "octokit.public_events()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/feeds": { + "get": { + "summary": "List feeds", + "description": "GitHub provides several timeline resources in [Atom](http://en.wikipedia.org/wiki/Atom_(standard)) format. The Feeds API lists all the feeds available to the authenticated user:\n\n* **Timeline**: The GitHub global public timeline\n* **User**: The public timeline for any user, using [URI template](https://developer.github.com/v3/#hypermedia)\n* **Current user public**: The public timeline for the authenticated user\n* **Current user**: The private timeline for the authenticated user\n* **Current user actor**: The private timeline for activity created by the authenticated user\n* **Current user organizations**: The private timeline for the organizations the authenticated user is a member of.\n* **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub.\n\n**Note**: Private feeds are only returned when [authenticating via Basic Auth](https://developer.github.com/v3/#basic-authentication) since current feed URIs use the older, non revocable auth tokens.", + "operationId": "activity/list-feeds", + "tags": [ + "activity" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/activity/feeds/#list-feeds" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timeline_url": { + "type": "string" + }, + "user_url": { + "type": "string" + }, + "current_user_public_url": { + "type": "string" + }, + "current_user_url": { + "type": "string" + }, + "current_user_actor_url": { + "type": "string" + }, + "current_user_organization_url": { + "type": "string" + }, + "current_user_organization_urls": { + "type": "array", + "items": { + "type": "string" + } + }, + "security_advisories_url": { + "type": "string" + }, + "_links": { + "type": "object", + "properties": { + "timeline": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "user": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "current_user_public": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "current_user": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "current_user_actor": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "current_user_organization": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "current_user_organizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "type": { + "type": "string" + } + } + } + }, + "security_advisories": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "type": { + "type": "string" + } + } + } + } + } + } + }, + "example": { + "timeline_url": "https://github.com/timeline", + "user_url": "https://github.com/{user}", + "current_user_public_url": "https://github.com/octocat", + "current_user_url": "https://github.com/octocat.private?token=abc123", + "current_user_actor_url": "https://github.com/octocat.private.actor?token=abc123", + "current_user_organization_url": "", + "current_user_organization_urls": [ + "https://github.com/organizations/github/octocat.private.atom?token=abc123" + ], + "security_advisories_url": "https://github.com/security-advisories", + "_links": { + "timeline": { + "href": "https://github.com/timeline", + "type": "application/atom+xml" + }, + "user": { + "href": "https://github.com/{user}", + "type": "application/atom+xml" + }, + "current_user_public": { + "href": "https://github.com/octocat", + "type": "application/atom+xml" + }, + "current_user": { + "href": "https://github.com/octocat.private?token=abc123", + "type": "application/atom+xml" + }, + "current_user_actor": { + "href": "https://github.com/octocat.private.actor?token=abc123", + "type": "application/atom+xml" + }, + "current_user_organization": { + "href": "", + "type": "" + }, + "current_user_organizations": [ + { + "href": "https://github.com/organizations/github/octocat.private.atom?token=abc123", + "type": "application/atom+xml" + } + ], + "security_advisories": { + "href": "https://github.com/security-advisories", + "type": "application/atom+xml" + } + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/feeds" + }, + { + "lang": "JS", + "source": "octokit.activity.listFeeds()" + }, + { + "lang": "Ruby", + "source": "octokit.feeds()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/gists": { + "get": { + "summary": "List the authenticated user's gists or if called anonymously, this will return all public gists", + "description": "", + "operationId": "gists/list", + "tags": [ + "gists" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/gists/#list-a-users-gists" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "since", + "description": "This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only gists updated at or after this time are returned.", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "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": { + "url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "id": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "git_pull_url": { + "type": "string" + }, + "git_push_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "files": { + "type": "object", + "properties": { + "hello_world.rb": { + "type": "object", + "properties": { + "filename": { + "type": "string" + }, + "type": { + "type": "string" + }, + "language": { + "type": "string" + }, + "raw_url": { + "type": "string" + }, + "size": { + "type": "number" + } + } + } + } + }, + "public": { + "type": "boolean" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "description": { + "type": "string" + }, + "comments": { + "type": "number" + }, + "user": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "truncated": { + "type": "boolean" + } + } + } + }, + "example": [ + { + "url": "https://api.github.com/gists/aa5a315d61ae9438b18d", + "forks_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/forks", + "commits_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/commits", + "id": "aa5a315d61ae9438b18d", + "node_id": "MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk", + "git_pull_url": "https://gist.github.com/aa5a315d61ae9438b18d.git", + "git_push_url": "https://gist.github.com/aa5a315d61ae9438b18d.git", + "html_url": "https://gist.github.com/aa5a315d61ae9438b18d", + "files": { + "hello_world.rb": { + "filename": "hello_world.rb", + "type": "application/x-ruby", + "language": "Ruby", + "raw_url": "https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb", + "size": 167 + } + }, + "public": true, + "created_at": "2010-04-14T02:15:15Z", + "updated_at": "2011-06-20T11:34:15Z", + "description": "Hello World Examples", + "comments": 0, + "user": null, + "comments_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/comments/", + "owner": { + "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 + }, + "truncated": false + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists" + }, + { + "lang": "JS", + "source": "octokit.gists.list()" + }, + { + "lang": "Ruby", + "source": "octokit.list()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "post": { + "summary": "Create a gist", + "description": "Allows you to add a new gist with one or more files.\n\n**Note:** Don't name your files \"gistfile\" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally.", + "operationId": "gists/create", + "tags": [ + "gists" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/gists/#create-a-gist" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "id": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "git_pull_url": { + "type": "string" + }, + "git_push_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "files": { + "type": "object", + "properties": { + "hello_world.rb": { + "type": "object", + "properties": { + "filename": { + "type": "string" + }, + "type": { + "type": "string" + }, + "language": { + "type": "string" + }, + "raw_url": { + "type": "string" + }, + "size": { + "type": "number" + }, + "truncated": { + "type": "boolean" + }, + "content": { + "type": "string" + } + } + }, + "hello_world.py": { + "type": "object", + "properties": { + "filename": { + "type": "string" + }, + "type": { + "type": "string" + }, + "language": { + "type": "string" + }, + "raw_url": { + "type": "string" + }, + "size": { + "type": "number" + }, + "truncated": { + "type": "boolean" + }, + "content": { + "type": "string" + } + } + }, + "hello_world_ruby.txt": { + "type": "object", + "properties": { + "filename": { + "type": "string" + }, + "type": { + "type": "string" + }, + "language": { + "type": "string" + }, + "raw_url": { + "type": "string" + }, + "size": { + "type": "number" + }, + "truncated": { + "type": "boolean" + }, + "content": { + "type": "string" + } + } + }, + "hello_world_python.txt": { + "type": "object", + "properties": { + "filename": { + "type": "string" + }, + "type": { + "type": "string" + }, + "language": { + "type": "string" + }, + "raw_url": { + "type": "string" + }, + "size": { + "type": "number" + }, + "truncated": { + "type": "boolean" + }, + "content": { + "type": "string" + } + } + } + } + }, + "public": { + "type": "boolean" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "description": { + "type": "string" + }, + "comments": { + "type": "number" + }, + "user": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "truncated": { + "type": "boolean" + }, + "forks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "url": { + "type": "string" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + } + }, + "history": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "version": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "change_status": { + "type": "object", + "properties": { + "deletions": { + "type": "number" + }, + "additions": { + "type": "number" + }, + "total": { + "type": "number" + } + } + }, + "committed_at": { + "type": "string" + } + } + } + } + } + }, + "example": { + "url": "https://api.github.com/gists/aa5a315d61ae9438b18d", + "forks_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/forks", + "commits_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/commits", + "id": "aa5a315d61ae9438b18d", + "node_id": "MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk", + "git_pull_url": "https://gist.github.com/aa5a315d61ae9438b18d.git", + "git_push_url": "https://gist.github.com/aa5a315d61ae9438b18d.git", + "html_url": "https://gist.github.com/aa5a315d61ae9438b18d", + "files": { + "hello_world.rb": { + "filename": "hello_world.rb", + "type": "application/x-ruby", + "language": "Ruby", + "raw_url": "https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb", + "size": 167, + "truncated": false, + "content": "class HelloWorld\n def initialize(name)\n @name = name.capitalize\n end\n def sayHi\n puts \"Hello !\"\n end\nend\n\nhello = HelloWorld.new(\"World\")\nhello.sayHi" + }, + "hello_world.py": { + "filename": "hello_world.py", + "type": "application/x-python", + "language": "Python", + "raw_url": "https://gist.githubusercontent.com/octocat/e29f3839074953e1cc2934867fa5f2d2/raw/99c1bf3a345505c2e6195198d5f8c36267de570b/hello_world.py", + "size": 199, + "truncated": false, + "content": "class HelloWorld:\n\n def __init__(self, name):\n self.name = name.capitalize()\n \n def sayHi(self):\n print \"Hello \" + self.name + \"!\"\n\nhello = HelloWorld(\"world\")\nhello.sayHi()" + }, + "hello_world_ruby.txt": { + "filename": "hello_world_ruby.txt", + "type": "text/plain", + "language": "Text", + "raw_url": "https://gist.githubusercontent.com/octocat/e29f3839074953e1cc2934867fa5f2d2/raw/9e4544db60e01a261aac098592b11333704e9082/hello_world_ruby.txt", + "size": 46, + "truncated": false, + "content": "Run `ruby hello_world.rb` to print Hello World" + }, + "hello_world_python.txt": { + "filename": "hello_world_python.txt", + "type": "text/plain", + "language": "Text", + "raw_url": "https://gist.githubusercontent.com/octocat/e29f3839074953e1cc2934867fa5f2d2/raw/076b4b78c10c9b7e1e0b73ffb99631bfc948de3b/hello_world_python.txt", + "size": 48, + "truncated": false, + "content": "Run `python hello_world.py` to print Hello World" + } + }, + "public": true, + "created_at": "2010-04-14T02:15:15Z", + "updated_at": "2011-06-20T11:34:15Z", + "description": "Hello World Examples", + "comments": 0, + "user": null, + "comments_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/comments/", + "owner": { + "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 + }, + "truncated": false, + "forks": [ + { + "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 + }, + "url": "https://api.github.com/gists/dee9c42e4998ce2ea439", + "id": "dee9c42e4998ce2ea439", + "created_at": "2011-04-14T16:00:49Z", + "updated_at": "2011-04-14T16:00:49Z" + } + ], + "history": [ + { + "url": "https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f", + "version": "57a7f021a713b1c5a6a199b54cc514735d2d462f", + "user": { + "login": "octocat", + "id": 1, + "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 + }, + "change_status": { + "deletions": 0, + "additions": 180, + "total": 180 + }, + "committed_at": "2010-04-14T02:15:15Z" + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists \\\n -d '{\"files\":{\"content\":\"content\"}}'" + }, + { + "lang": "JS", + "source": "octokit.gists.create({\n files: {\n content: 'content'\n }\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create(\n {\n content: 'content'\n }\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "files": { + "type": "object", + "description": "The filenames and content of each file in the gist. The keys in the `files` object represent the filename and have the type `string`.", + "properties": { + "content": { + "type": "string", + "description": "The content of the file." + } + } + }, + "description": { + "type": "string", + "description": "A descriptive name for this gist." + }, + "public": { + "type": "boolean", + "description": "When `true`, the gist will be public and available for anyone to see.", + "default": false + } + }, + "required": [ + "files" + ] + }, + "example": { + "description": "Hello World Examples", + "public": true, + "files": { + "hello_world.rb": { + "content": "class HelloWorld\n def initialize(name)\n @name = name.capitalize\n end\n def sayHi\n puts \"Hello !\"\n end\nend\n\nhello = HelloWorld.new(\"World\")\nhello.sayHi" + }, + "hello_world.py": { + "content": "class HelloWorld:\n\n def __init__(self, name):\n self.name = name.capitalize()\n \n def sayHi(self):\n print \"Hello \" + self.name + \"!\"\n\nhello = HelloWorld(\"world\")\nhello.sayHi()" + }, + "hello_world_ruby.txt": { + "content": "Run `ruby hello_world.rb` to print Hello World" + }, + "hello_world_python.txt": { + "content": "Run `python hello_world.py` to print Hello World" + } + } + } + } + } + } + } + }, + "/gists/public": { + "get": { + "summary": "List all public gists", + "description": "List all public gists sorted by most recently updated to least recently updated.\n\nNote: With [pagination](https://developer.github.com/v3/#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.", + "operationId": "gists/list-public", + "tags": [ + "gists" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/gists/#list-all-public-gists" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "since", + "description": "This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only gists updated at or after this time are returned.", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "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": { + "url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "id": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "git_pull_url": { + "type": "string" + }, + "git_push_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "files": { + "type": "object", + "properties": { + "hello_world.rb": { + "type": "object", + "properties": { + "filename": { + "type": "string" + }, + "type": { + "type": "string" + }, + "language": { + "type": "string" + }, + "raw_url": { + "type": "string" + }, + "size": { + "type": "number" + } + } + } + } + }, + "public": { + "type": "boolean" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "description": { + "type": "string" + }, + "comments": { + "type": "number" + }, + "user": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "truncated": { + "type": "boolean" + } + } + } + }, + "example": [ + { + "url": "https://api.github.com/gists/aa5a315d61ae9438b18d", + "forks_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/forks", + "commits_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/commits", + "id": "aa5a315d61ae9438b18d", + "node_id": "MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk", + "git_pull_url": "https://gist.github.com/aa5a315d61ae9438b18d.git", + "git_push_url": "https://gist.github.com/aa5a315d61ae9438b18d.git", + "html_url": "https://gist.github.com/aa5a315d61ae9438b18d", + "files": { + "hello_world.rb": { + "filename": "hello_world.rb", + "type": "application/x-ruby", + "language": "Ruby", + "raw_url": "https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb", + "size": 167 + } + }, + "public": true, + "created_at": "2010-04-14T02:15:15Z", + "updated_at": "2011-06-20T11:34:15Z", + "description": "Hello World Examples", + "comments": 0, + "user": null, + "comments_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/comments/", + "owner": { + "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 + }, + "truncated": false + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/public" + }, + { + "lang": "JS", + "source": "octokit.gists.listPublic()" + }, + { + "lang": "Ruby", + "source": "octokit.public()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/gists/starred": { + "get": { + "summary": "List starred gists", + "description": "List the authenticated user's starred gists:", + "operationId": "gists/list-starred", + "tags": [ + "gists" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/gists/#list-starred-gists" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "since", + "description": "This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only gists updated at or after this time are returned.", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "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": { + "url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "id": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "git_pull_url": { + "type": "string" + }, + "git_push_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "files": { + "type": "object", + "properties": { + "hello_world.rb": { + "type": "object", + "properties": { + "filename": { + "type": "string" + }, + "type": { + "type": "string" + }, + "language": { + "type": "string" + }, + "raw_url": { + "type": "string" + }, + "size": { + "type": "number" + } + } + } + } + }, + "public": { + "type": "boolean" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "description": { + "type": "string" + }, + "comments": { + "type": "number" + }, + "user": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "truncated": { + "type": "boolean" + } + } + } + }, + "example": [ + { + "url": "https://api.github.com/gists/aa5a315d61ae9438b18d", + "forks_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/forks", + "commits_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/commits", + "id": "aa5a315d61ae9438b18d", + "node_id": "MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk", + "git_pull_url": "https://gist.github.com/aa5a315d61ae9438b18d.git", + "git_push_url": "https://gist.github.com/aa5a315d61ae9438b18d.git", + "html_url": "https://gist.github.com/aa5a315d61ae9438b18d", + "files": { + "hello_world.rb": { + "filename": "hello_world.rb", + "type": "application/x-ruby", + "language": "Ruby", + "raw_url": "https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb", + "size": 167 + } + }, + "public": true, + "created_at": "2010-04-14T02:15:15Z", + "updated_at": "2011-06-20T11:34:15Z", + "description": "Hello World Examples", + "comments": 0, + "user": null, + "comments_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/comments/", + "owner": { + "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 + }, + "truncated": false + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/starred" + }, + { + "lang": "JS", + "source": "octokit.gists.listStarred()" + }, + { + "lang": "Ruby", + "source": "octokit.starred()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/gists/{gist_id}": { + "get": { + "summary": "Get a single gist", + "description": "", + "operationId": "gists/get", + "tags": [ + "gists" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/gists/#get-a-single-gist" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "gist_id", + "description": "gist_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "id": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "git_pull_url": { + "type": "string" + }, + "git_push_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "files": { + "type": "object", + "properties": { + "hello_world.rb": { + "type": "object", + "properties": { + "filename": { + "type": "string" + }, + "type": { + "type": "string" + }, + "language": { + "type": "string" + }, + "raw_url": { + "type": "string" + }, + "size": { + "type": "number" + }, + "truncated": { + "type": "boolean" + }, + "content": { + "type": "string" + } + } + }, + "hello_world.py": { + "type": "object", + "properties": { + "filename": { + "type": "string" + }, + "type": { + "type": "string" + }, + "language": { + "type": "string" + }, + "raw_url": { + "type": "string" + }, + "size": { + "type": "number" + }, + "truncated": { + "type": "boolean" + }, + "content": { + "type": "string" + } + } + }, + "hello_world_ruby.txt": { + "type": "object", + "properties": { + "filename": { + "type": "string" + }, + "type": { + "type": "string" + }, + "language": { + "type": "string" + }, + "raw_url": { + "type": "string" + }, + "size": { + "type": "number" + }, + "truncated": { + "type": "boolean" + }, + "content": { + "type": "string" + } + } + }, + "hello_world_python.txt": { + "type": "object", + "properties": { + "filename": { + "type": "string" + }, + "type": { + "type": "string" + }, + "language": { + "type": "string" + }, + "raw_url": { + "type": "string" + }, + "size": { + "type": "number" + }, + "truncated": { + "type": "boolean" + }, + "content": { + "type": "string" + } + } + } + } + }, + "public": { + "type": "boolean" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "description": { + "type": "string" + }, + "comments": { + "type": "number" + }, + "user": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "truncated": { + "type": "boolean" + }, + "forks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "url": { + "type": "string" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + } + }, + "history": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "version": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "change_status": { + "type": "object", + "properties": { + "deletions": { + "type": "number" + }, + "additions": { + "type": "number" + }, + "total": { + "type": "number" + } + } + }, + "committed_at": { + "type": "string" + } + } + } + } + } + }, + "example": { + "url": "https://api.github.com/gists/aa5a315d61ae9438b18d", + "forks_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/forks", + "commits_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/commits", + "id": "aa5a315d61ae9438b18d", + "node_id": "MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk", + "git_pull_url": "https://gist.github.com/aa5a315d61ae9438b18d.git", + "git_push_url": "https://gist.github.com/aa5a315d61ae9438b18d.git", + "html_url": "https://gist.github.com/aa5a315d61ae9438b18d", + "files": { + "hello_world.rb": { + "filename": "hello_world.rb", + "type": "application/x-ruby", + "language": "Ruby", + "raw_url": "https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb", + "size": 167, + "truncated": false, + "content": "class HelloWorld\n def initialize(name)\n @name = name.capitalize\n end\n def sayHi\n puts \"Hello !\"\n end\nend\n\nhello = HelloWorld.new(\"World\")\nhello.sayHi" + }, + "hello_world.py": { + "filename": "hello_world.py", + "type": "application/x-python", + "language": "Python", + "raw_url": "https://gist.githubusercontent.com/octocat/e29f3839074953e1cc2934867fa5f2d2/raw/99c1bf3a345505c2e6195198d5f8c36267de570b/hello_world.py", + "size": 199, + "truncated": false, + "content": "class HelloWorld:\n\n def __init__(self, name):\n self.name = name.capitalize()\n \n def sayHi(self):\n print \"Hello \" + self.name + \"!\"\n\nhello = HelloWorld(\"world\")\nhello.sayHi()" + }, + "hello_world_ruby.txt": { + "filename": "hello_world_ruby.txt", + "type": "text/plain", + "language": "Text", + "raw_url": "https://gist.githubusercontent.com/octocat/e29f3839074953e1cc2934867fa5f2d2/raw/9e4544db60e01a261aac098592b11333704e9082/hello_world_ruby.txt", + "size": 46, + "truncated": false, + "content": "Run `ruby hello_world.rb` to print Hello World" + }, + "hello_world_python.txt": { + "filename": "hello_world_python.txt", + "type": "text/plain", + "language": "Text", + "raw_url": "https://gist.githubusercontent.com/octocat/e29f3839074953e1cc2934867fa5f2d2/raw/076b4b78c10c9b7e1e0b73ffb99631bfc948de3b/hello_world_python.txt", + "size": 48, + "truncated": false, + "content": "Run `python hello_world.py` to print Hello World" + } + }, + "public": true, + "created_at": "2010-04-14T02:15:15Z", + "updated_at": "2011-06-20T11:34:15Z", + "description": "Hello World Examples", + "comments": 0, + "user": null, + "comments_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/comments/", + "owner": { + "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 + }, + "truncated": false, + "forks": [ + { + "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 + }, + "url": "https://api.github.com/gists/dee9c42e4998ce2ea439", + "id": "dee9c42e4998ce2ea439", + "created_at": "2011-04-14T16:00:49Z", + "updated_at": "2011-04-14T16:00:49Z" + } + ], + "history": [ + { + "url": "https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f", + "version": "57a7f021a713b1c5a6a199b54cc514735d2d462f", + "user": { + "login": "octocat", + "id": 1, + "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 + }, + "change_status": { + "deletions": 0, + "additions": 180, + "total": 180 + }, + "committed_at": "2010-04-14T02:15:15Z" + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID" + }, + { + "lang": "JS", + "source": "octokit.gists.get({\n gist_id: 'gist_id'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.get(\n 'gist_id'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "patch": { + "summary": "Edit a gist", + "description": "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.", + "operationId": "gists/update", + "tags": [ + "gists" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/gists/#edit-a-gist" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "gist_id", + "description": "gist_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "id": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "git_pull_url": { + "type": "string" + }, + "git_push_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "files": { + "type": "object", + "properties": { + "hello_world.rb": { + "type": "object", + "properties": { + "filename": { + "type": "string" + }, + "type": { + "type": "string" + }, + "language": { + "type": "string" + }, + "raw_url": { + "type": "string" + }, + "size": { + "type": "number" + }, + "truncated": { + "type": "boolean" + }, + "content": { + "type": "string" + } + } + }, + "hello_world.py": { + "type": "object", + "properties": { + "filename": { + "type": "string" + }, + "type": { + "type": "string" + }, + "language": { + "type": "string" + }, + "raw_url": { + "type": "string" + }, + "size": { + "type": "number" + }, + "truncated": { + "type": "boolean" + }, + "content": { + "type": "string" + } + } + }, + "hello_world.md": { + "type": "object", + "properties": { + "filename": { + "type": "string" + }, + "type": { + "type": "string" + }, + "language": { + "type": "string" + }, + "raw_url": { + "type": "string" + }, + "size": { + "type": "number" + }, + "truncated": { + "type": "boolean" + }, + "content": { + "type": "string" + } + } + }, + "new_file.txt": { + "type": "object", + "properties": { + "filename": { + "type": "string" + }, + "type": { + "type": "string" + }, + "language": { + "type": "string" + }, + "raw_url": { + "type": "string" + }, + "size": { + "type": "number" + }, + "truncated": { + "type": "boolean" + }, + "content": { + "type": "string" + } + } + } + } + }, + "public": { + "type": "boolean" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "description": { + "type": "string" + }, + "comments": { + "type": "number" + }, + "user": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "truncated": { + "type": "boolean" + }, + "forks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "url": { + "type": "string" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + } + }, + "history": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "version": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "change_status": { + "type": "object", + "properties": { + "deletions": { + "type": "number" + }, + "additions": { + "type": "number" + }, + "total": { + "type": "number" + } + } + }, + "committed_at": { + "type": "string" + } + } + } + } + } + }, + "example": { + "url": "https://api.github.com/gists/aa5a315d61ae9438b18d", + "forks_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/forks", + "commits_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/commits", + "id": "aa5a315d61ae9438b18d", + "node_id": "MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk", + "git_pull_url": "https://gist.github.com/aa5a315d61ae9438b18d.git", + "git_push_url": "https://gist.github.com/aa5a315d61ae9438b18d.git", + "html_url": "https://gist.github.com/aa5a315d61ae9438b18d", + "files": { + "hello_world.rb": { + "filename": "hello_world.rb", + "type": "application/x-ruby", + "language": "Ruby", + "raw_url": "https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb", + "size": 167, + "truncated": false, + "content": "class HelloWorld\n def initialize(name)\n @name = name.capitalize\n end\n def sayHi\n puts \"Hello !\"\n end\nend\n\nhello = HelloWorld.new(\"World\")\nhello.sayHi" + }, + "hello_world.py": { + "filename": "hello_world.py", + "type": "application/x-python", + "language": "Python", + "raw_url": "https://gist.githubusercontent.com/octocat/e29f3839074953e1cc2934867fa5f2d2/raw/99c1bf3a345505c2e6195198d5f8c36267de570b/hello_world.py", + "size": 199, + "truncated": false, + "content": "class HelloWorld:\n\n def __init__(self, name):\n self.name = name.capitalize()\n \n def sayHi(self):\n print \"Hello \" + self.name + \"!\"\n\nhello = HelloWorld(\"world\")\nhello.sayHi()" + }, + "hello_world.md": { + "filename": "hello_world.md", + "type": "text/plain", + "language": "Markdown", + "raw_url": "https://gist.githubusercontent.com/octocat/8df0a8f642973cbda937bf542d37d4e9/raw/4221bb4b942568c4e3ab253022d2b7fec7844f21/hello_world.md", + "size": 73, + "truncated": false, + "content": "Run `ruby hello_world.rb` or `python hello_world.py` to print Hello World" + }, + "new_file.txt": { + "filename": "new_file.txt", + "type": "text/plain", + "language": "Text", + "raw_url": "https://gist.githubusercontent.com/octocat/8df0a8f642973cbda937bf542d37d4e9/raw/56ab7bdf864fa11c1e16acce2a5116171514d2d1/new_file.txt", + "size": 31, + "truncated": false, + "content": "This is a new placeholder file." + } + }, + "public": true, + "created_at": "2010-04-14T02:15:15Z", + "updated_at": "2011-06-20T11:34:15Z", + "description": "Hello World Examples", + "comments": 0, + "user": null, + "comments_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/comments/", + "owner": { + "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 + }, + "truncated": false, + "forks": [ + { + "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 + }, + "url": "https://api.github.com/gists/dee9c42e4998ce2ea439", + "id": "dee9c42e4998ce2ea439", + "created_at": "2011-04-14T16:00:49Z", + "updated_at": "2011-04-14T16:00:49Z" + } + ], + "history": [ + { + "url": "https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f", + "version": "57a7f021a713b1c5a6a199b54cc514735d2d462f", + "user": { + "login": "octocat", + "id": 1, + "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 + }, + "change_status": { + "deletions": 0, + "additions": 180, + "total": 180 + }, + "committed_at": "2010-04-14T02:15:15Z" + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID \\\n -d '{\"description\":\"description\"}'" + }, + { + "lang": "JS", + "source": "octokit.gists.update({\n gist_id: 'gist_id',\n description: 'description'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.update(\n 'gist_id',\n 'description'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "A descriptive name for this gist." + }, + "files": { + "type": "object", + "description": "The filenames and content that make up this gist.", + "properties": { + "content": { + "type": "string", + "description": "The updated content of the file." + }, + "filename": { + "type": "string", + "description": "The new name for this file. To delete a file, set the value of the filename to `null`." + } + } + } + } + }, + "example": { + "description": "Hello World Examples", + "files": { + "hello_world_ruby.txt": { + "content": "Run `ruby hello_world.rb` or `python hello_world.py` to print Hello World", + "filename": "hello_world.md" + }, + "hello_world_python.txt": null, + "new_file.txt": { + "content": "This is a new placeholder file." + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete a gist", + "description": "", + "operationId": "gists/delete", + "tags": [ + "gists" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/gists/#delete-a-gist" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "gist_id", + "description": "gist_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID" + }, + { + "lang": "JS", + "source": "octokit.gists.delete({\n gist_id: 'gist_id'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete(\n 'gist_id'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/gists/{gist_id}/comments": { + "get": { + "summary": "List comments on a gist", + "description": "", + "operationId": "gists/list-comments", + "tags": [ + "gists" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/gists/comments/#list-comments-on-a-gist" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "gist_id", + "description": "gist_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "body": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + } + }, + "example": [ + { + "id": 1, + "node_id": "MDExOkdpc3RDb21tZW50MQ==", + "url": "https://api.github.com/gists/a6db0bec360bb87e9418/comments/1", + "body": "Just commenting for the sake of commenting", + "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 + }, + "created_at": "2011-04-18T23:23:56Z", + "updated_at": "2011-04-18T23:23:56Z" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/comments" + }, + { + "lang": "JS", + "source": "octokit.gists.listComments({\n gist_id: 'gist_id'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.comments(\n 'gist_id'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "post": { + "summary": "Create a comment", + "description": "", + "operationId": "gists/create-comment", + "tags": [ + "gists" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/gists/comments/#create-a-comment" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "gist_id", + "description": "gist_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "body": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + }, + "example": { + "id": 1, + "node_id": "MDExOkdpc3RDb21tZW50MQ==", + "url": "https://api.github.com/gists/a6db0bec360bb87e9418/comments/1", + "body": "Just commenting for the sake of commenting", + "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 + }, + "created_at": "2011-04-18T23:23:56Z", + "updated_at": "2011-04-18T23:23:56Z" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/comments \\\n -d '{\"body\":\"body\"}'" + }, + { + "lang": "JS", + "source": "octokit.gists.createComment({\n gist_id: 'gist_id',\n body: 'body'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_comment(\n 'gist_id',\n 'body'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "type": "string", + "description": "The comment text." + } + }, + "required": [ + "body" + ] + }, + "example": { + "body": "Just commenting for the sake of commenting" + } + } + } + } + } + }, + "/gists/{gist_id}/comments/{comment_id}": { + "get": { + "summary": "Get a single comment", + "description": "", + "operationId": "gists/get-comment", + "tags": [ + "gists" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/gists/comments/#get-a-single-comment" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "gist_id", + "description": "gist_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "comment_id", + "description": "comment_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "body": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + }, + "example": { + "id": 1, + "node_id": "MDExOkdpc3RDb21tZW50MQ==", + "url": "https://api.github.com/gists/a6db0bec360bb87e9418/comments/1", + "body": "Just commenting for the sake of commenting", + "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 + }, + "created_at": "2011-04-18T23:23:56Z", + "updated_at": "2011-04-18T23:23:56Z" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/comments/42" + }, + { + "lang": "JS", + "source": "octokit.gists.getComment({\n gist_id: 'gist_id',\n comment_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.comment(\n 'gist_id',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "patch": { + "summary": "Edit a comment", + "description": "", + "operationId": "gists/update-comment", + "tags": [ + "gists" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/gists/comments/#edit-a-comment" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "gist_id", + "description": "gist_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "comment_id", + "description": "comment_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "body": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + }, + "example": { + "id": 1, + "node_id": "MDExOkdpc3RDb21tZW50MQ==", + "url": "https://api.github.com/gists/a6db0bec360bb87e9418/comments/1", + "body": "Just commenting for the sake of commenting", + "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 + }, + "created_at": "2011-04-18T23:23:56Z", + "updated_at": "2011-04-18T23:23:56Z" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/comments/42 \\\n -d '{\"body\":\"body\"}'" + }, + { + "lang": "JS", + "source": "octokit.gists.updateComment({\n gist_id: 'gist_id',\n comment_id: 42,\n body: 'body'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.update_comment(\n 'gist_id',\n 42,\n 'body'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "type": "string", + "description": "The comment text." + } + }, + "required": [ + "body" + ] + }, + "example": { + "body": "Just commenting for the sake of commenting" + } + } + } + } + }, + "delete": { + "summary": "Delete a comment", + "description": "", + "operationId": "gists/delete-comment", + "tags": [ + "gists" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/gists/comments/#delete-a-comment" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "gist_id", + "description": "gist_id parameter", + "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" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/comments/42" + }, + { + "lang": "JS", + "source": "octokit.gists.deleteComment({\n gist_id: 'gist_id',\n comment_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_comment(\n 'gist_id',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/gists/{gist_id}/commits": { + "get": { + "summary": "List gist commits", + "description": "", + "operationId": "gists/list-commits", + "tags": [ + "gists" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/gists/#list-gist-commits" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "gist_id", + "description": "gist_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "url": { + "type": "string" + }, + "version": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "change_status": { + "type": "object", + "properties": { + "deletions": { + "type": "number" + }, + "additions": { + "type": "number" + }, + "total": { + "type": "number" + } + } + }, + "committed_at": { + "type": "string" + } + } + } + }, + "example": [ + { + "url": "https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f", + "version": "57a7f021a713b1c5a6a199b54cc514735d2d462f", + "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 + }, + "change_status": { + "deletions": 0, + "additions": 180, + "total": 180 + }, + "committed_at": "2010-04-14T02:15:15Z" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/commits" + }, + { + "lang": "JS", + "source": "octokit.gists.listCommits({\n gist_id: 'gist_id'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.commits(\n 'gist_id'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/gists/{gist_id}/forks": { + "post": { + "summary": "Fork a gist", + "description": "**Note**: This was previously `/gists/:gist_id/fork`.", + "operationId": "gists/fork", + "tags": [ + "gists" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/gists/#fork-a-gist" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "gist_id", + "description": "gist_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "id": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "git_pull_url": { + "type": "string" + }, + "git_push_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "files": { + "type": "object", + "properties": { + "hello_world.rb": { + "type": "object", + "properties": { + "filename": { + "type": "string" + }, + "type": { + "type": "string" + }, + "language": { + "type": "string" + }, + "raw_url": { + "type": "string" + }, + "size": { + "type": "number" + } + } + } + } + }, + "public": { + "type": "boolean" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "description": { + "type": "string" + }, + "comments": { + "type": "number" + }, + "user": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "truncated": { + "type": "boolean" + } + } + }, + "example": { + "url": "https://api.github.com/gists/aa5a315d61ae9438b18d", + "forks_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/forks", + "commits_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/commits", + "id": "aa5a315d61ae9438b18d", + "node_id": "MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk", + "git_pull_url": "https://gist.github.com/aa5a315d61ae9438b18d.git", + "git_push_url": "https://gist.github.com/aa5a315d61ae9438b18d.git", + "html_url": "https://gist.github.com/aa5a315d61ae9438b18d", + "files": { + "hello_world.rb": { + "filename": "hello_world.rb", + "type": "application/x-ruby", + "language": "Ruby", + "raw_url": "https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb", + "size": 167 + } + }, + "public": true, + "created_at": "2010-04-14T02:15:15Z", + "updated_at": "2011-06-20T11:34:15Z", + "description": "Hello World Examples", + "comments": 0, + "user": null, + "comments_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/comments/", + "owner": { + "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 + }, + "truncated": false + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/forks" + }, + { + "lang": "JS", + "source": "octokit.gists.fork({\n gist_id: 'gist_id'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.fork(\n 'gist_id'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "get": { + "summary": "List gist forks", + "description": "", + "operationId": "gists/list-forks", + "tags": [ + "gists" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/gists/#list-gist-forks" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "gist_id", + "description": "gist_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "url": { + "type": "string" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + } + }, + "example": [ + { + "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 + }, + "url": "https://api.github.com/gists/dee9c42e4998ce2ea439", + "id": "dee9c42e4998ce2ea439", + "created_at": "2011-04-14T16:00:49Z", + "updated_at": "2011-04-14T16:00:49Z" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/forks" + }, + { + "lang": "JS", + "source": "octokit.gists.listForks({\n gist_id: 'gist_id'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.forks(\n 'gist_id'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/gists/{gist_id}/star": { + "put": { + "summary": "Star a gist", + "description": "Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP verbs](https://developer.github.com/v3/#http-verbs).\"", + "operationId": "gists/star", + "tags": [ + "gists" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/gists/#star-a-gist" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "gist_id", + "description": "gist_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/star" + }, + { + "lang": "JS", + "source": "octokit.gists.star({\n gist_id: 'gist_id'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.star(\n 'gist_id'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "delete": { + "summary": "Unstar a gist", + "description": "", + "operationId": "gists/unstar", + "tags": [ + "gists" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/gists/#unstar-a-gist" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "gist_id", + "description": "gist_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/star" + }, + { + "lang": "JS", + "source": "octokit.gists.unstar({\n gist_id: 'gist_id'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.unstar(\n 'gist_id'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "get": { + "summary": "Check if a gist is starred", + "description": "", + "operationId": "gists/check-is-starred", + "tags": [ + "gists" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/gists/#check-if-a-gist-is-starred" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "gist_id", + "description": "gist_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Response if gist is starred" + }, + "404": { + "description": "Response if gist is not starred" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/star" + }, + { + "lang": "JS", + "source": "octokit.gists.checkIsStarred({\n gist_id: 'gist_id'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.check_is_starred(\n 'gist_id'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/gists/{gist_id}/{sha}": { + "get": { + "summary": "Get a specific revision of a gist", + "description": "", + "operationId": "gists/get-revision", + "tags": [ + "gists" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/gists/#get-a-specific-revision-of-a-gist" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "gist_id", + "description": "gist_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "sha", + "description": "sha parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "id": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "git_pull_url": { + "type": "string" + }, + "git_push_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "files": { + "type": "object", + "properties": { + "hello_world.rb": { + "type": "object", + "properties": { + "filename": { + "type": "string" + }, + "type": { + "type": "string" + }, + "language": { + "type": "string" + }, + "raw_url": { + "type": "string" + }, + "size": { + "type": "number" + }, + "truncated": { + "type": "boolean" + }, + "content": { + "type": "string" + } + } + }, + "hello_world.py": { + "type": "object", + "properties": { + "filename": { + "type": "string" + }, + "type": { + "type": "string" + }, + "language": { + "type": "string" + }, + "raw_url": { + "type": "string" + }, + "size": { + "type": "number" + }, + "truncated": { + "type": "boolean" + }, + "content": { + "type": "string" + } + } + }, + "hello_world_ruby.txt": { + "type": "object", + "properties": { + "filename": { + "type": "string" + }, + "type": { + "type": "string" + }, + "language": { + "type": "string" + }, + "raw_url": { + "type": "string" + }, + "size": { + "type": "number" + }, + "truncated": { + "type": "boolean" + }, + "content": { + "type": "string" + } + } + }, + "hello_world_python.txt": { + "type": "object", + "properties": { + "filename": { + "type": "string" + }, + "type": { + "type": "string" + }, + "language": { + "type": "string" + }, + "raw_url": { + "type": "string" + }, + "size": { + "type": "number" + }, + "truncated": { + "type": "boolean" + }, + "content": { + "type": "string" + } + } + } + } + }, + "public": { + "type": "boolean" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "description": { + "type": "string" + }, + "comments": { + "type": "number" + }, + "user": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "truncated": { + "type": "boolean" + }, + "forks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "url": { + "type": "string" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + } + }, + "history": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "version": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "change_status": { + "type": "object", + "properties": { + "deletions": { + "type": "number" + }, + "additions": { + "type": "number" + }, + "total": { + "type": "number" + } + } + }, + "committed_at": { + "type": "string" + } + } + } + } + } + }, + "example": { + "url": "https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f", + "forks_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/forks", + "commits_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/commits", + "id": "aa5a315d61ae9438b18d", + "node_id": "MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk", + "git_pull_url": "https://gist.github.com/aa5a315d61ae9438b18d.git", + "git_push_url": "https://gist.github.com/aa5a315d61ae9438b18d.git", + "html_url": "https://gist.github.com/aa5a315d61ae9438b18d", + "files": { + "hello_world.rb": { + "filename": "hello_world.rb", + "type": "application/x-ruby", + "language": "Ruby", + "raw_url": "https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb", + "size": 167, + "truncated": false, + "content": "class HelloWorld\n def initialize(name)\n @name = name.capitalize\n end\n def sayHi\n puts \"Hello !\"\n end\nend\n\nhello = HelloWorld.new(\"World\")\nhello.sayHi" + }, + "hello_world.py": { + "filename": "hello_world.py", + "type": "application/x-python", + "language": "Python", + "raw_url": "https://gist.githubusercontent.com/octocat/e29f3839074953e1cc2934867fa5f2d2/raw/99c1bf3a345505c2e6195198d5f8c36267de570b/hello_world.py", + "size": 199, + "truncated": false, + "content": "class HelloWorld:\n\n def __init__(self, name):\n self.name = name.capitalize()\n \n def sayHi(self):\n print \"Hello \" + self.name + \"!\"\n\nhello = HelloWorld(\"world\")\nhello.sayHi()" + }, + "hello_world_ruby.txt": { + "filename": "hello_world_ruby.txt", + "type": "text/plain", + "language": "Text", + "raw_url": "https://gist.githubusercontent.com/octocat/e29f3839074953e1cc2934867fa5f2d2/raw/9e4544db60e01a261aac098592b11333704e9082/hello_world_ruby.txt", + "size": 46, + "truncated": false, + "content": "Run `ruby hello_world.rb` to print Hello World" + }, + "hello_world_python.txt": { + "filename": "hello_world_python.txt", + "type": "text/plain", + "language": "Text", + "raw_url": "https://gist.githubusercontent.com/octocat/e29f3839074953e1cc2934867fa5f2d2/raw/076b4b78c10c9b7e1e0b73ffb99631bfc948de3b/hello_world_python.txt", + "size": 48, + "truncated": false, + "content": "Run `python hello_world.py` to print Hello World" + } + }, + "public": true, + "created_at": "2010-04-14T02:15:15Z", + "updated_at": "2011-06-20T11:34:15Z", + "description": "Hello World Examples", + "comments": 0, + "user": null, + "comments_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/comments/", + "owner": { + "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 + }, + "truncated": false, + "forks": [ + { + "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 + }, + "url": "https://api.github.com/gists/dee9c42e4998ce2ea439", + "id": "dee9c42e4998ce2ea439", + "created_at": "2011-04-14T16:00:49Z", + "updated_at": "2011-04-14T16:00:49Z" + } + ], + "history": [ + { + "url": "https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f", + "version": "57a7f021a713b1c5a6a199b54cc514735d2d462f", + "user": { + "login": "octocat", + "id": 1, + "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 + }, + "change_status": { + "deletions": 0, + "additions": 180, + "total": 180 + }, + "committed_at": "2010-04-14T02:15:15Z" + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/SHA" + }, + { + "lang": "JS", + "source": "octokit.gists.getRevision({\n gist_id: 'gist_id',\n sha: 'sha'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.revision(\n 'gist_id',\n 'sha'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/gitignore/templates": { + "get": { + "summary": "Listing available templates", + "description": "List all templates available to pass as an option when [creating a repository](https://developer.github.com/v3/repos/#create).", + "operationId": "gitignore/list-templates", + "tags": [ + "gitignore" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/gitignore/#listing-available-templates" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": [ + "Actionscript", + "Android", + "AppceleratorTitanium", + "Autotools", + "Bancha", + "C", + "C++" + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gitignore/templates" + }, + { + "lang": "JS", + "source": "octokit.gitignore.listTemplates()" + }, + { + "lang": "Ruby", + "source": "octokit.templates()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/gitignore/templates/{name}": { + "get": { + "summary": "Get a single template", + "description": "The API also allows fetching the source of a single template.\n\nUse the raw [media type](https://developer.github.com/v3/media/) to get the raw contents.\n\n", + "operationId": "gitignore/get-template", + "tags": [ + "gitignore" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/gitignore/#get-a-single-template" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "name", + "description": "name parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "source": { + "type": "string" + } + } + }, + "example": { + "name": "C", + "source": "# Object files\n*.o\n\n# Libraries\n*.lib\n*.a\n\n# Shared objects (inc. Windows DLLs)\n*.dll\n*.so\n*.so.*\n*.dylib\n\n# Executables\n*.exe\n*.out\n*.app\n" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gitignore/templates/NAME" + }, + { + "lang": "JS", + "source": "octokit.gitignore.getTemplate({\n name: 'name'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.template(\n 'name'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/installation/repositories": { + "get": { + "summary": "List repositories", + "description": "List repositories that an installation can access.\n\nYou must use an [installation access token](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.", + "operationId": "apps/list-repos", + "tags": [ + "apps" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/apps/installations/#list-repositories" + }, + "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 + }, + { + "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": "object", + "properties": { + "total_count": { + "type": "number" + }, + "repositories": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + } + } + } + }, + "example": { + "total_count": 1, + "repositories": [ + { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.machine-man-preview+json\" \\\n https://api.github.com/installation/repositories" + }, + { + "lang": "JS", + "source": "octokit.apps.listRepos()" + }, + { + "lang": "Ruby", + "source": "octokit.repos()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "machine-man", + "note": "To access the API with your GitHub App, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` Header for your requests.\n\n`application/vnd.github.machine-man-preview+json`", + "required": true + }, + { + "name": "mercy", + "note": "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](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.mercy-preview+json\n\n```", + "required": false + } + ] + }, + "x-changes": [] + } + }, + "/installation/token": { + "delete": { + "summary": "Revoke an installation token", + "description": "Revokes the installation token you're using to authenticate as an installation and access this endpoint.\n\nOnce an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the \"[Create a new installation token](https://developer.github.com/v3/apps/#create-a-new-installation-token)\" endpoint.\n\nYou must use an [installation access token](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.", + "operationId": "apps/revoke-installation-token", + "tags": [ + "apps" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/apps/installations/#revoke-an-installation-token" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.gambit-preview+json" + }, + "required": true + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.gambit-preview+json\" \\\n https://api.github.com/installation/token" + }, + { + "lang": "JS", + "source": "octokit.apps.revokeInstallationToken()" + }, + { + "lang": "Ruby", + "source": "octokit.revoke_installation_token()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "gambit", + "note": "Uninstalling 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](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.gambit-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/issues": { + "get": { + "summary": "List all issues assigned to the authenticated user across all visible repositories including owned repositories, member repositories, and organization repositories", + "description": "**Note**: 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.\n\nBe 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](https://developer.github.com/v3/pulls/#list-pull-requests)\" endpoint.\n\n", + "operationId": "issues/list", + "tags": [ + "issues" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/issues/#list-issues" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "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" + } + }, + { + "name": "state", + "description": "Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "open", + "closed", + "all" + ], + "default": "open" + } + }, + { + "name": "labels", + "description": "A list of comma separated label names. Example: `bug,ui,@high`", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sort", + "description": "What to sort results by. Can be either `created`, `updated`, `comments`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "created", + "updated", + "comments" + ], + "default": "created" + } + }, + { + "name": "direction", + "description": "The direction of the sort. Can be either `asc` or `desc`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "default": "desc" + } + }, + { + "name": "since", + "description": "Only issues updated at or after this time are returned. 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" + } + }, + { + "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": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repository_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "color": { + "type": "string" + }, + "default": { + "type": "boolean" + } + } + } + }, + "assignee": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "assignees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "milestone": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "open_issues": { + "type": "number" + }, + "closed_issues": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "closed_at": { + "type": "string" + }, + "due_on": { + "type": "string" + } + } + }, + "locked": { + "type": "boolean" + }, + "active_lock_reason": { + "type": "string" + }, + "comments": { + "type": "number" + }, + "pull_request": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "diff_url": { + "type": "string" + }, + "patch_url": { + "type": "string" + } + } + }, + "closed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "repository": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + } + } + } + }, + "example": [ + { + "id": 1, + "node_id": "MDU6SXNzdWUx", + "url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", + "repository_url": "https://api.github.com/repos/octocat/Hello-World", + "labels_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}", + "comments_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/comments", + "events_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/events", + "html_url": "https://github.com/octocat/Hello-World/issues/1347", + "number": 1347, + "state": "open", + "title": "Found a bug", + "body": "I'm having a problem with this.", + "user": { + "login": "octocat", + "id": 1, + "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 + }, + "labels": [ + { + "id": 208045946, + "node_id": "MDU6TGFiZWwyMDgwNDU5NDY=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", + "name": "bug", + "description": "Something isn't working", + "color": "f29513", + "default": true + } + ], + "assignee": { + "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 + }, + "assignees": [ + { + "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 + } + ], + "milestone": { + "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1", + "html_url": "https://github.com/octocat/Hello-World/milestones/v1.0", + "labels_url": "https://api.github.com/repos/octocat/Hello-World/milestones/1/labels", + "id": 1002604, + "node_id": "MDk6TWlsZXN0b25lMTAwMjYwNA==", + "number": 1, + "state": "open", + "title": "v1.0", + "description": "Tracking milestone for version 1.0", + "creator": { + "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 + }, + "open_issues": 4, + "closed_issues": 8, + "created_at": "2011-04-10T20:09:31Z", + "updated_at": "2014-03-03T18:58:10Z", + "closed_at": "2013-02-12T13:22:01Z", + "due_on": "2012-10-09T23:39:01Z" + }, + "locked": true, + "active_lock_reason": "too heated", + "comments": 0, + "pull_request": { + "url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347", + "html_url": "https://github.com/octocat/Hello-World/pull/1347", + "diff_url": "https://github.com/octocat/Hello-World/pull/1347.diff", + "patch_url": "https://github.com/octocat/Hello-World/pull/1347.patch" + }, + "closed_at": null, + "created_at": "2011-04-22T13:33:48Z", + "updated_at": "2011-04-22T13:33:48Z", + "repository": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/issues" + }, + { + "lang": "JS", + "source": "octokit.issues.list()" + }, + { + "lang": "Ruby", + "source": "octokit.list()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [ + { + "name": "machine-man", + "note": "If an issue is opened via a GitHub App, the response will include the `performed_via_github_app` object with information about the GitHub App. For more information, see the [related blog post](https://developer.github.com/changes/2016-09-14-Integrations-Early-Access).\n\nTo receive the `performed_via_github_app` object is the response, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.machine-man-preview\n\n```", + "required": false + }, + { + "name": "squirrel-girl", + "note": "An additional `reactions` object in the issue 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://developer.github.com/v3/media) in the `Accept` header:\n\n```\n application/vnd.github.squirrel-girl-preview\n\n```\n\nThe `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions.", + "required": false + } + ] + }, + "x-changes": [] + } + }, + "/legacy/issues/search/{owner}/{repository}/{state}/{keyword}": { + "get": { + "summary": "Search issues", + "description": "Find issues by state and keyword.", + "operationId": "search/issues-legacy", + "tags": [ + "search" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/search/legacy/#search-issues" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repository", + "description": "repository parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "state", + "description": "Indicates the state of the issues to return. Can be either `open` or `closed`.", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "open", + "closed" + ] + } + }, + { + "name": "keyword", + "description": "The search term.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "issues": { + "type": "array", + "items": { + "type": "object", + "properties": { + "gravatar_id": { + "type": "string" + }, + "position": { + "type": "number" + }, + "number": { + "type": "number" + }, + "votes": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "comments": { + "type": "number" + }, + "body": { + "type": "string" + }, + "title": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "user": { + "type": "string" + }, + "labels": { + "type": "array", + "items": { + "type": "string" + } + }, + "state": { + "type": "string" + } + } + } + } + } + }, + "example": { + "issues": [ + { + "gravatar_id": "", + "position": 10, + "number": 10, + "votes": 2, + "created_at": "2010-06-04T23:20:33Z", + "comments": 5, + "body": "Issue body goes here", + "title": "This is is the issue title", + "updated_at": "2010-06-04T23:20:33Z", + "html_url": "https://github.com/pengwynn/linkedin/issues/10", + "user": "ckarbass", + "labels": [ + "api", + "feature request", + "investigation" + ], + "state": "open" + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/legacy/issues/search/octocat/REPOSITORY/STATE/KEYWORD" + }, + { + "lang": "JS", + "source": "octokit.search.issuesLegacy({\n owner: 'octocat',\n repository: 'repository',\n state: 'state',\n keyword: 'keyword'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.issues_legacy(\n 'repository',\n 'state',\n 'keyword'\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "deprecated": true + } + }, + "/legacy/repos/search/{keyword}": { + "get": { + "summary": "Search repositories", + "description": "Find repositories by keyword. Note, this legacy method does not follow the v3 pagination pattern. This method returns up to 100 results per page and pages can be fetched using the `start_page` parameter.", + "operationId": "search/repos-legacy", + "tags": [ + "search" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/search/legacy/#search-repositories" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "keyword", + "description": "The search term.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "language", + "description": "Filter results by language.", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "start_page", + "description": "The page number to fetch.", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sort", + "description": "The sort field. One of `stars`, `forks`, or `updated`. Default: results are sorted by best match.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "stars", + "forks", + "updated" + ] + } + }, + { + "name": "order", + "description": "The sort field. if `sort` param is provided. Can be either `asc` or `desc`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "repositories": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "created": { + "type": "string" + }, + "watchers": { + "type": "number" + }, + "has_downloads": { + "type": "boolean" + }, + "username": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "url": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "has_issues": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "forks": { + "type": "number" + }, + "size": { + "type": "number" + }, + "private": { + "type": "boolean" + }, + "followers": { + "type": "number" + }, + "name": { + "type": "string" + }, + "owner": { + "type": "string" + }, + "open_issues": { + "type": "number" + }, + "pushed_at": { + "type": "string" + }, + "score": { + "type": "number" + }, + "pushed": { + "type": "string" + }, + "description": { + "type": "string" + }, + "language": { + "type": "string" + }, + "created_at": { + "type": "string" + } + } + } + } + } + }, + "example": { + "repositories": [ + { + "type": "repo", + "created": "2011-09-05T11:07:54Z", + "watchers": 2913, + "has_downloads": true, + "username": "mathiasbynens", + "homepage": "http://mths.be/dotfiles", + "url": "https://github.com/mathiasbynens/dotfiles", + "fork": false, + "has_issues": true, + "has_wiki": false, + "forks": 520, + "size": 192, + "private": false, + "followers": 2913, + "name": "dotfiles", + "owner": "mathiasbynens", + "open_issues": 12, + "pushed_at": "2012-06-05T03:37:13Z", + "score": 3.289718, + "pushed": "2012-06-05T03:37:13Z", + "description": "sensible hacker defaults for OS X", + "language": "VimL", + "created_at": "2011-09-05T11:07:54Z" + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/legacy/repos/search/KEYWORD" + }, + { + "lang": "JS", + "source": "octokit.search.reposLegacy({\n keyword: 'keyword'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.repos_legacy(\n 'keyword'\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "deprecated": true + } + }, + "/legacy/user/email/{email}": { + "get": { + "summary": "Email search", + "description": "This API call is added for compatibility reasons only. There's no guarantee that full email searches will always be available. The `@` character in the address must be left unencoded. Searches only against public email addresses (as configured on the user's GitHub profile).", + "operationId": "search/email-legacy", + "tags": [ + "search" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/search/legacy/#email-search" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "email", + "description": "The email address.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "user": { + "type": "object", + "properties": { + "public_repo_count": { + "type": "number" + }, + "public_gist_count": { + "type": "number" + }, + "followers_count": { + "type": "number" + }, + "following_count": { + "type": "number" + }, + "created": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "name": { + "type": "string" + }, + "company": { + "type": "string" + }, + "blog": { + "type": "string" + }, + "location": { + "type": "string" + }, + "email": { + "type": "string" + }, + "id": { + "type": "number" + }, + "login": { + "type": "string" + }, + "type": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + } + } + } + } + }, + "example": { + "user": { + "public_repo_count": 2, + "public_gist_count": 1, + "followers_count": 20, + "following_count": 0, + "created": "2009-10-05T01:32:06Z", + "created_at": "2009-10-05T01:32:06Z", + "name": "monalisa octocat", + "company": "GitHub", + "blog": "https://github.com/blog", + "location": "San Francisco", + "email": "octocat@github.com", + "id": 2, + "login": "octocat", + "type": "User", + "gravatar_id": "" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/legacy/user/email/octocat%40github.com" + }, + { + "lang": "JS", + "source": "octokit.search.emailLegacy({\n email: 'octocat@github.com'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.email_legacy(\n 'octocat@github.com'\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "deprecated": true + } + }, + "/legacy/user/search/{keyword}": { + "get": { + "summary": "Search users", + "description": "Find users by keyword.", + "operationId": "search/users-legacy", + "tags": [ + "search" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/search/legacy/#search-users" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "keyword", + "description": "The search term.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "start_page", + "description": "The page number to fetch.", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sort", + "description": "The sort field. One of `stars`, `forks`, or `updated`. Default: results are sorted by best match.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "stars", + "forks", + "updated" + ] + } + }, + { + "name": "order", + "description": "The sort field. if `sort` param is provided. Can be either `asc` or `desc`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "users": { + "type": "array", + "items": { + "type": "object", + "properties": { + "gravatar_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "location": { + "type": "string" + }, + "public_repo_count": { + "type": "number" + }, + "followers": { + "type": "number" + }, + "language": { + "type": "string" + }, + "fullname": { + "type": "string" + }, + "username": { + "type": "string" + }, + "id": { + "type": "string" + }, + "repos": { + "type": "number" + }, + "type": { + "type": "string" + }, + "followers_count": { + "type": "number" + }, + "login": { + "type": "string" + }, + "score": { + "type": "number" + }, + "created": { + "type": "string" + } + } + } + } + } + }, + "example": { + "users": [ + { + "gravatar_id": "", + "name": "Hirotaka Kawata", + "created_at": "2009-10-05T01:32:06Z", + "location": "Tsukuba, Ibaraki, Japan", + "public_repo_count": 8, + "followers": 10, + "language": "Python", + "fullname": "Hirotaka Kawata", + "username": "techno", + "id": "user-135050", + "repos": 8, + "type": "user", + "followers_count": 10, + "login": "techno", + "score": 4.2559967, + "created": "2009-10-05T01:32:06Z" + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/legacy/user/search/KEYWORD" + }, + { + "lang": "JS", + "source": "octokit.search.usersLegacy({\n keyword: 'keyword'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.users_legacy(\n 'keyword'\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "deprecated": true + } + }, + "/licenses": { + "get": { + "summary": "List commonly used licenses", + "description": "", + "operationId": "licenses/list-commonly-used", + "tags": [ + "licenses" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/licenses/#list-commonly-used-licenses" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "spdx_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "node_id": { + "type": "string" + } + } + } + }, + "example": [ + { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZW1pdA==" + }, + { + "key": "lgpl-3.0", + "name": "GNU Lesser General Public License v3.0", + "spdx_id": "LGPL-3.0", + "url": "https://api.github.com/licenses/lgpl-3.0" + }, + { + "key": "mpl-2.0", + "name": "Mozilla Public License 2.0", + "spdx_id": "MPL-2.0", + "url": "https://api.github.com/licenses/mpl-2.0" + }, + { + "key": "agpl-3.0", + "name": "GNU Affero General Public License v3.0", + "spdx_id": "AGPL-3.0", + "url": "https://api.github.com/licenses/agpl-3.0" + }, + { + "key": "unlicense", + "name": "The Unlicense", + "spdx_id": "Unlicense", + "url": "https://api.github.com/licenses/unlicense" + }, + { + "key": "apache-2.0", + "name": "Apache License 2.0", + "spdx_id": "Apache-2.0", + "url": "https://api.github.com/licenses/apache-2.0" + }, + { + "key": "gpl-3.0", + "name": "GNU General Public License v3.0", + "spdx_id": "GPL-3.0", + "url": "https://api.github.com/licenses/gpl-3.0" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/licenses" + }, + { + "lang": "JS", + "source": "octokit.licenses.listCommonlyUsed()" + }, + { + "lang": "Ruby", + "source": "octokit.commonly_used()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "operation", + "date": "2019-03-05", + "note": "\"List all licenses\" renamed to \"List commonly used licenses\"", + "before": { + "operationId": "licenses/list" + }, + "after": { + "operationId": "licenses/list-commonly-used" + } + } + ] + } + }, + "/licenses/{license}": { + "get": { + "summary": "Get an individual license", + "description": "", + "operationId": "licenses/get", + "tags": [ + "licenses" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/licenses/#get-an-individual-license" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "license", + "description": "license parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "spdx_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "implementation": { + "type": "string" + }, + "permissions": { + "type": "array", + "items": { + "type": "string" + } + }, + "conditions": { + "type": "array", + "items": { + "type": "string" + } + }, + "limitations": { + "type": "array", + "items": { + "type": "string" + } + }, + "body": { + "type": "string" + }, + "featured": { + "type": "boolean" + } + } + }, + "example": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZW1pdA==", + "html_url": "http://choosealicense.com/licenses/mit/", + "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.", + "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.", + "permissions": [ + "commercial-use", + "modifications", + "distribution", + "sublicense", + "private-use" + ], + "conditions": [ + "include-copyright" + ], + "limitations": [ + "no-liability" + ], + "body": "\n\nThe MIT License (MIT)\n\nCopyright (c) [year] [fullname]\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", + "featured": true + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/licenses/LICENSE" + }, + { + "lang": "JS", + "source": "octokit.licenses.get({\n license: 'license'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.get(\n 'license'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/markdown": { + "post": { + "summary": "Render an arbitrary Markdown document", + "description": "", + "operationId": "markdown/render", + "tags": [ + "markdown" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/markdown/#render-an-arbitrary-markdown-document" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + } + ], + "responses": { + "200": { + "description": "response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/markdown \\\n -d '{\"text\":\"text\"}'" + }, + { + "lang": "JS", + "source": "octokit.markdown.render({\n text: 'text'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.render(\n 'text'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "text": { + "type": "string", + "description": "The Markdown text to render in HTML. Markdown content must be 400 KB or less." + }, + "mode": { + "type": "string", + "description": "The rendering mode. Can be either: \n\\* `markdown` to render a document in plain Markdown, just like README.md files are rendered. \n\\* `gfm` to render a document in [GitHub Flavored Markdown](https://github.github.com/gfm/), which creates links for user mentions as well as references to SHA-1 hashes, issues, and pull requests.", + "enum": [ + "markdown", + "gfm" + ], + "default": "markdown" + }, + "context": { + "type": "string", + "description": "The repository context to use when creating references in `gfm` mode. Omit this parameter when using `markdown` mode." + } + }, + "required": [ + "text" + ] + }, + "example": { + "text": "Hello world github/linguist#1 **cool**, and #1!", + "mode": "gfm", + "context": "github/gollum" + } + } + } + } + } + }, + "/markdown/raw": { + "post": { + "summary": "Render a Markdown document in raw mode", + "description": "You 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](https://github.github.com/gfm/) is not supported and Markdown will be rendered in plain format like a README.md file. Markdown content must be 400 KB or less.\n\n", + "operationId": "markdown/render-raw", + "tags": [ + "markdown" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/markdown/#render-a-markdown-document-in-raw-mode" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "content-type", + "description": "Setting content-type header is required for this endpoint", + "in": "header", + "schema": { + "type": "string", + "enum": [ + "text/plain; charset=utf-8" + ] + } + } + ], + "responses": { + "200": { + "description": "response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/markdown/raw \\\n -d '{\"data\":\"data\"}'" + }, + { + "lang": "JS", + "source": "octokit.markdown.renderRaw({\n data: 'data'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.render_raw(\n 'data'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "requestBodyParameterName": "data", + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "string", + "description": "data parameter" + } + } + } + } + } + }, + "/marketplace_listing/accounts/{account_id}": { + "get": { + "summary": "Check if a GitHub account is associated with any Marketplace listing", + "description": "Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.\n\nGitHub Apps must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint.", + "operationId": "apps/check-account-is-associated-with-any", + "tags": [ + "apps" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/apps/marketplace/#check-if-a-github-account-is-associated-with-any-marketplace-listing" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "account_id", + "description": "account_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "id": { + "type": "number" + }, + "login": { + "type": "string" + }, + "email": { + "type": "string" + }, + "organization_billing_email": { + "type": "string" + }, + "marketplace_pending_change": { + "type": "object", + "properties": { + "effective_date": { + "type": "string" + }, + "unit_count": { + "type": "string" + }, + "id": { + "type": "number" + }, + "plan": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "accounts_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "number": { + "type": "number" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "monthly_price_in_cents": { + "type": "number" + }, + "yearly_price_in_cents": { + "type": "number" + }, + "price_model": { + "type": "string" + }, + "has_free_trial": { + "type": "boolean" + }, + "state": { + "type": "string" + }, + "unit_name": { + "type": "string" + }, + "bullets": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "marketplace_purchase": { + "type": "object", + "properties": { + "billing_cycle": { + "type": "string" + }, + "next_billing_date": { + "type": "string" + }, + "unit_count": { + "type": "string" + }, + "on_free_trial": { + "type": "boolean" + }, + "free_trial_ends_on": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "plan": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "accounts_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "number": { + "type": "number" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "monthly_price_in_cents": { + "type": "number" + }, + "yearly_price_in_cents": { + "type": "number" + }, + "price_model": { + "type": "string" + }, + "has_free_trial": { + "type": "boolean" + }, + "unit_name": { + "type": "string" + }, + "state": { + "type": "string" + }, + "bullets": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "example": { + "url": "https://api.github.com/orgs/github", + "type": "Organization", + "id": 4, + "login": "github", + "email": null, + "organization_billing_email": "billing@github.com", + "marketplace_pending_change": { + "effective_date": "2017-11-11T00:00:00Z", + "unit_count": null, + "id": 77, + "plan": { + "url": "https://api.github.com/marketplace_listing/plans/1111", + "accounts_url": "https://api.github.com/marketplace_listing/plans/1111/accounts", + "id": 1111, + "number": 2, + "name": "Startup", + "description": "A professional-grade CI solution", + "monthly_price_in_cents": 699, + "yearly_price_in_cents": 7870, + "price_model": "flat-rate", + "has_free_trial": true, + "state": "published", + "unit_name": null, + "bullets": [ + "Up to 10 private repositories", + "3 concurrent builds" + ] + } + }, + "marketplace_purchase": { + "billing_cycle": "monthly", + "next_billing_date": "2017-11-11T00:00:00Z", + "unit_count": null, + "on_free_trial": true, + "free_trial_ends_on": "2017-11-11T00:00:00Z", + "updated_at": "2017-11-02T01:12:12Z", + "plan": { + "url": "https://api.github.com/marketplace_listing/plans/1313", + "accounts_url": "https://api.github.com/marketplace_listing/plans/1313/accounts", + "id": 1313, + "number": 3, + "name": "Pro", + "description": "A professional-grade CI solution", + "monthly_price_in_cents": 1099, + "yearly_price_in_cents": 11870, + "price_model": "flat-rate", + "has_free_trial": true, + "unit_name": null, + "state": "published", + "bullets": [ + "Up to 25 private repositories", + "11 concurrent builds" + ] + } + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/marketplace_listing/accounts/42" + }, + { + "lang": "JS", + "source": "octokit.apps.checkAccountIsAssociatedWithAny({\n account_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.check_account_is_associated_with_any(\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/marketplace_listing/plans": { + "get": { + "summary": "List all plans for your Marketplace listing", + "description": "GitHub Apps must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint.", + "operationId": "apps/list-plans", + "tags": [ + "apps" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/apps/marketplace/#list-all-plans-for-your-marketplace-listing" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "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": { + "url": { + "type": "string" + }, + "accounts_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "number": { + "type": "number" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "monthly_price_in_cents": { + "type": "number" + }, + "yearly_price_in_cents": { + "type": "number" + }, + "price_model": { + "type": "string" + }, + "has_free_trial": { + "type": "boolean" + }, + "unit_name": { + "type": "string" + }, + "state": { + "type": "string" + }, + "bullets": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "example": [ + { + "url": "https://api.github.com/marketplace_listing/plans/1313", + "accounts_url": "https://api.github.com/marketplace_listing/plans/1313/accounts", + "id": 1313, + "number": 3, + "name": "Pro", + "description": "A professional-grade CI solution", + "monthly_price_in_cents": 1099, + "yearly_price_in_cents": 11870, + "price_model": "flat-rate", + "has_free_trial": true, + "unit_name": null, + "state": "published", + "bullets": [ + "Up to 25 private repositories", + "11 concurrent builds" + ] + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/marketplace_listing/plans" + }, + { + "lang": "JS", + "source": "octokit.apps.listPlans()" + }, + { + "lang": "Ruby", + "source": "octokit.plans()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/marketplace_listing/plans/{plan_id}/accounts": { + "get": { + "summary": "List all GitHub accounts (user or organization) on a specific plan", + "description": "Returns any accounts associated with a plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.\n\nGitHub Apps must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint.", + "operationId": "apps/list-accounts-user-or-org-on-plan", + "tags": [ + "apps" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/apps/marketplace/#list-all-github-accounts-user-or-organization-on-a-specific-plan" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "plan_id", + "description": "plan_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "sort", + "description": "Sorts the GitHub accounts by the date they were created or last updated. Can be one of `created` or `updated`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "created", + "updated" + ], + "default": "created" + } + }, + { + "name": "direction", + "description": "To return the oldest accounts first, set to `asc`. Can be one of `asc` or `desc`. Ignored without the `sort` parameter.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "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": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "id": { + "type": "number" + }, + "login": { + "type": "string" + }, + "email": { + "type": "string" + }, + "organization_billing_email": { + "type": "string" + }, + "marketplace_pending_change": { + "type": "object", + "properties": { + "effective_date": { + "type": "string" + }, + "unit_count": { + "type": "string" + }, + "id": { + "type": "number" + }, + "plan": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "accounts_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "number": { + "type": "number" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "monthly_price_in_cents": { + "type": "number" + }, + "yearly_price_in_cents": { + "type": "number" + }, + "price_model": { + "type": "string" + }, + "has_free_trial": { + "type": "boolean" + }, + "state": { + "type": "string" + }, + "unit_name": { + "type": "string" + }, + "bullets": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "marketplace_purchase": { + "type": "object", + "properties": { + "billing_cycle": { + "type": "string" + }, + "next_billing_date": { + "type": "string" + }, + "unit_count": { + "type": "string" + }, + "on_free_trial": { + "type": "boolean" + }, + "free_trial_ends_on": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "plan": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "accounts_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "number": { + "type": "number" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "monthly_price_in_cents": { + "type": "number" + }, + "yearly_price_in_cents": { + "type": "number" + }, + "price_model": { + "type": "string" + }, + "has_free_trial": { + "type": "boolean" + }, + "unit_name": { + "type": "string" + }, + "state": { + "type": "string" + }, + "bullets": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "example": [ + { + "url": "https://api.github.com/orgs/github", + "type": "Organization", + "id": 4, + "login": "github", + "email": null, + "organization_billing_email": "billing@github.com", + "marketplace_pending_change": { + "effective_date": "2017-11-11T00:00:00Z", + "unit_count": null, + "id": 77, + "plan": { + "url": "https://api.github.com/marketplace_listing/plans/1111", + "accounts_url": "https://api.github.com/marketplace_listing/plans/1111/accounts", + "id": 1111, + "number": 2, + "name": "Startup", + "description": "A professional-grade CI solution", + "monthly_price_in_cents": 699, + "yearly_price_in_cents": 7870, + "price_model": "flat-rate", + "has_free_trial": true, + "state": "published", + "unit_name": null, + "bullets": [ + "Up to 10 private repositories", + "3 concurrent builds" + ] + } + }, + "marketplace_purchase": { + "billing_cycle": "monthly", + "next_billing_date": "2017-11-11T00:00:00Z", + "unit_count": null, + "on_free_trial": true, + "free_trial_ends_on": "2017-11-11T00:00:00Z", + "updated_at": "2017-11-02T01:12:12Z", + "plan": { + "url": "https://api.github.com/marketplace_listing/plans/1313", + "accounts_url": "https://api.github.com/marketplace_listing/plans/1313/accounts", + "id": 1313, + "number": 3, + "name": "Pro", + "description": "A professional-grade CI solution", + "monthly_price_in_cents": 1099, + "yearly_price_in_cents": 11870, + "price_model": "flat-rate", + "has_free_trial": true, + "unit_name": null, + "state": "published", + "bullets": [ + "Up to 25 private repositories", + "11 concurrent builds" + ] + } + } + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/marketplace_listing/plans/42/accounts" + }, + { + "lang": "JS", + "source": "octokit.apps.listAccountsUserOrOrgOnPlan({\n plan_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.accounts_user_or_org_on_plan(\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/marketplace_listing/stubbed/accounts/{account_id}": { + "get": { + "summary": "Check if a GitHub account is associated with any Marketplace listing (stubbed)", + "description": "Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.\n\nGitHub Apps must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint.", + "operationId": "apps/check-account-is-associated-with-any-stubbed", + "tags": [ + "apps" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/apps/marketplace/#check-if-a-github-account-is-associated-with-any-marketplace-listing" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "account_id", + "description": "account_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "id": { + "type": "number" + }, + "login": { + "type": "string" + }, + "email": { + "type": "string" + }, + "organization_billing_email": { + "type": "string" + }, + "marketplace_pending_change": { + "type": "object", + "properties": { + "effective_date": { + "type": "string" + }, + "unit_count": { + "type": "string" + }, + "id": { + "type": "number" + }, + "plan": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "accounts_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "number": { + "type": "number" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "monthly_price_in_cents": { + "type": "number" + }, + "yearly_price_in_cents": { + "type": "number" + }, + "price_model": { + "type": "string" + }, + "has_free_trial": { + "type": "boolean" + }, + "state": { + "type": "string" + }, + "unit_name": { + "type": "string" + }, + "bullets": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "marketplace_purchase": { + "type": "object", + "properties": { + "billing_cycle": { + "type": "string" + }, + "next_billing_date": { + "type": "string" + }, + "unit_count": { + "type": "string" + }, + "on_free_trial": { + "type": "boolean" + }, + "free_trial_ends_on": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "plan": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "accounts_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "number": { + "type": "number" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "monthly_price_in_cents": { + "type": "number" + }, + "yearly_price_in_cents": { + "type": "number" + }, + "price_model": { + "type": "string" + }, + "has_free_trial": { + "type": "boolean" + }, + "unit_name": { + "type": "string" + }, + "state": { + "type": "string" + }, + "bullets": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "example": { + "url": "https://api.github.com/orgs/github", + "type": "Organization", + "id": 4, + "login": "github", + "email": null, + "organization_billing_email": "billing@github.com", + "marketplace_pending_change": { + "effective_date": "2017-11-11T00:00:00Z", + "unit_count": null, + "id": 77, + "plan": { + "url": "https://api.github.com/marketplace_listing/plans/1111", + "accounts_url": "https://api.github.com/marketplace_listing/plans/1111/accounts", + "id": 1111, + "number": 2, + "name": "Startup", + "description": "A professional-grade CI solution", + "monthly_price_in_cents": 699, + "yearly_price_in_cents": 7870, + "price_model": "flat-rate", + "has_free_trial": true, + "state": "published", + "unit_name": null, + "bullets": [ + "Up to 10 private repositories", + "3 concurrent builds" + ] + } + }, + "marketplace_purchase": { + "billing_cycle": "monthly", + "next_billing_date": "2017-11-11T00:00:00Z", + "unit_count": null, + "on_free_trial": true, + "free_trial_ends_on": "2017-11-11T00:00:00Z", + "updated_at": "2017-11-02T01:12:12Z", + "plan": { + "url": "https://api.github.com/marketplace_listing/plans/1313", + "accounts_url": "https://api.github.com/marketplace_listing/plans/1313/accounts", + "id": 1313, + "number": 3, + "name": "Pro", + "description": "A professional-grade CI solution", + "monthly_price_in_cents": 1099, + "yearly_price_in_cents": 11870, + "price_model": "flat-rate", + "has_free_trial": true, + "unit_name": null, + "state": "published", + "bullets": [ + "Up to 25 private repositories", + "11 concurrent builds" + ] + } + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/marketplace_listing/stubbed/accounts/42" + }, + { + "lang": "JS", + "source": "octokit.apps.checkAccountIsAssociatedWithAnyStubbed({\n account_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.check_account_is_associated_with_any_stubbed(\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/marketplace_listing/stubbed/plans": { + "get": { + "summary": "List all plans for your Marketplace listing (stubbed)", + "description": "GitHub Apps must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint.", + "operationId": "apps/list-plans-stubbed", + "tags": [ + "apps" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/apps/marketplace/#list-all-plans-for-your-marketplace-listing" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "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": { + "url": { + "type": "string" + }, + "accounts_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "number": { + "type": "number" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "monthly_price_in_cents": { + "type": "number" + }, + "yearly_price_in_cents": { + "type": "number" + }, + "price_model": { + "type": "string" + }, + "has_free_trial": { + "type": "boolean" + }, + "unit_name": { + "type": "string" + }, + "state": { + "type": "string" + }, + "bullets": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "example": [ + { + "url": "https://api.github.com/marketplace_listing/plans/1313", + "accounts_url": "https://api.github.com/marketplace_listing/plans/1313/accounts", + "id": 1313, + "number": 3, + "name": "Pro", + "description": "A professional-grade CI solution", + "monthly_price_in_cents": 1099, + "yearly_price_in_cents": 11870, + "price_model": "flat-rate", + "has_free_trial": true, + "unit_name": null, + "state": "published", + "bullets": [ + "Up to 25 private repositories", + "11 concurrent builds" + ] + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/marketplace_listing/stubbed/plans" + }, + { + "lang": "JS", + "source": "octokit.apps.listPlansStubbed()" + }, + { + "lang": "Ruby", + "source": "octokit.plans_stubbed()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/marketplace_listing/stubbed/plans/{plan_id}/accounts": { + "get": { + "summary": "List all GitHub accounts (user or organization) on a specific plan (stubbed)", + "description": "Returns any accounts associated with a plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.\n\nGitHub Apps must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint.", + "operationId": "apps/list-accounts-user-or-org-on-plan-stubbed", + "tags": [ + "apps" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/apps/marketplace/#list-all-github-accounts-user-or-organization-on-a-specific-plan" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "plan_id", + "description": "plan_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "sort", + "description": "Sorts the GitHub accounts by the date they were created or last updated. Can be one of `created` or `updated`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "created", + "updated" + ], + "default": "created" + } + }, + { + "name": "direction", + "description": "To return the oldest accounts first, set to `asc`. Can be one of `asc` or `desc`. Ignored without the `sort` parameter.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "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": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "id": { + "type": "number" + }, + "login": { + "type": "string" + }, + "email": { + "type": "string" + }, + "organization_billing_email": { + "type": "string" + }, + "marketplace_pending_change": { + "type": "object", + "properties": { + "effective_date": { + "type": "string" + }, + "unit_count": { + "type": "string" + }, + "id": { + "type": "number" + }, + "plan": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "accounts_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "number": { + "type": "number" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "monthly_price_in_cents": { + "type": "number" + }, + "yearly_price_in_cents": { + "type": "number" + }, + "price_model": { + "type": "string" + }, + "has_free_trial": { + "type": "boolean" + }, + "state": { + "type": "string" + }, + "unit_name": { + "type": "string" + }, + "bullets": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "marketplace_purchase": { + "type": "object", + "properties": { + "billing_cycle": { + "type": "string" + }, + "next_billing_date": { + "type": "string" + }, + "unit_count": { + "type": "string" + }, + "on_free_trial": { + "type": "boolean" + }, + "free_trial_ends_on": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "plan": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "accounts_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "number": { + "type": "number" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "monthly_price_in_cents": { + "type": "number" + }, + "yearly_price_in_cents": { + "type": "number" + }, + "price_model": { + "type": "string" + }, + "has_free_trial": { + "type": "boolean" + }, + "unit_name": { + "type": "string" + }, + "state": { + "type": "string" + }, + "bullets": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "example": [ + { + "url": "https://api.github.com/orgs/github", + "type": "Organization", + "id": 4, + "login": "github", + "email": null, + "organization_billing_email": "billing@github.com", + "marketplace_pending_change": { + "effective_date": "2017-11-11T00:00:00Z", + "unit_count": null, + "id": 77, + "plan": { + "url": "https://api.github.com/marketplace_listing/plans/1111", + "accounts_url": "https://api.github.com/marketplace_listing/plans/1111/accounts", + "id": 1111, + "number": 2, + "name": "Startup", + "description": "A professional-grade CI solution", + "monthly_price_in_cents": 699, + "yearly_price_in_cents": 7870, + "price_model": "flat-rate", + "has_free_trial": true, + "state": "published", + "unit_name": null, + "bullets": [ + "Up to 10 private repositories", + "3 concurrent builds" + ] + } + }, + "marketplace_purchase": { + "billing_cycle": "monthly", + "next_billing_date": "2017-11-11T00:00:00Z", + "unit_count": null, + "on_free_trial": true, + "free_trial_ends_on": "2017-11-11T00:00:00Z", + "updated_at": "2017-11-02T01:12:12Z", + "plan": { + "url": "https://api.github.com/marketplace_listing/plans/1313", + "accounts_url": "https://api.github.com/marketplace_listing/plans/1313/accounts", + "id": 1313, + "number": 3, + "name": "Pro", + "description": "A professional-grade CI solution", + "monthly_price_in_cents": 1099, + "yearly_price_in_cents": 11870, + "price_model": "flat-rate", + "has_free_trial": true, + "unit_name": null, + "state": "published", + "bullets": [ + "Up to 25 private repositories", + "11 concurrent builds" + ] + } + } + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/marketplace_listing/stubbed/plans/42/accounts" + }, + { + "lang": "JS", + "source": "octokit.apps.listAccountsUserOrOrgOnPlanStubbed({\n plan_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.accounts_user_or_org_on_plan_stubbed(\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/meta": { + "get": { + "summary": "Get", + "description": "This endpoint provides a list of GitHub's IP addresses. For more information, see \"[About GitHub's IP addresses](https://help.github.com/articles/about-github-s-ip-addresses/).\"", + "operationId": "meta/get", + "tags": [ + "meta" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/meta/#meta" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "verifiable_password_authentication": { + "type": "boolean" + }, + "ssh_key_fingerprints": { + "type": "object", + "properties": { + "MD5_RSA": { + "type": "string" + }, + "MD5_DSA": { + "type": "string" + }, + "SHA256_RSA": { + "type": "string" + }, + "SHA256_DSA": { + "type": "string" + } + } + }, + "hooks": { + "type": "array", + "items": { + "type": "string" + } + }, + "web": { + "type": "array", + "items": { + "type": "string" + } + }, + "api": { + "type": "array", + "items": { + "type": "string" + } + }, + "git": { + "type": "array", + "items": { + "type": "string" + } + }, + "pages": { + "type": "array", + "items": { + "type": "string" + } + }, + "importer": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "example": { + "verifiable_password_authentication": true, + "ssh_key_fingerprints": { + "MD5_RSA": "16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48", + "MD5_DSA": "ad:1c:08:a4:40:e3:6f:9c:f5:66:26:5d:4b:33:5d:8c", + "SHA256_RSA": "nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8", + "SHA256_DSA": "br9IjFspm1vxR3iA35FWE+4VTyz1hYVLIE2t1/CeyWQ" + }, + "hooks": [ + "192.30.252.0/22" + ], + "web": [ + "192.30.252.0/22", + "185.199.108.0/22" + ], + "api": [ + "192.30.252.0/22", + "185.199.108.0/22" + ], + "git": [ + "192.30.252.0/22" + ], + "pages": [ + "192.30.252.153/32", + "192.30.252.154/32" + ], + "importer": [ + "54.158.161.132", + "54.226.70.38" + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/meta" + }, + { + "lang": "JS", + "source": "octokit.meta.get()" + }, + { + "lang": "Ruby", + "source": "octokit.get()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/networks/{owner}/{repo}/events": { + "get": { + "summary": "List public events for a network of repositories", + "description": "", + "operationId": "activity/list-public-events-for-repo-network", + "tags": [ + "activity" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/activity/events/#list-public-events-for-a-network-of-repositories" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "418": { + "description": "Response definition missing" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/networks/octocat/hello-world/events" + }, + { + "lang": "JS", + "source": "octokit.activity.listPublicEventsForRepoNetwork({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.public_events_for_repo_network(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/notifications": { + "get": { + "summary": "List your notifications", + "description": "List all notifications for the current user, sorted by most recently updated.\n\nThe following example uses the `since` parameter to list notifications that have been updated after the specified time.", + "operationId": "activity/list-notifications", + "tags": [ + "activity" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/activity/notifications/#list-your-notifications" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "all", + "description": "If `true`, show notifications marked as read.", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "participating", + "description": "If `true`, only shows notifications in which the user is directly participating or mentioned.", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + { + "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" + } + }, + { + "name": "before", + "description": "Only show notifications updated before 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" + } + }, + { + "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": { + "id": { + "type": "string" + }, + "repository": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + } + } + }, + "subject": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "url": { + "type": "string" + }, + "latest_comment_url": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "reason": { + "type": "string" + }, + "unread": { + "type": "boolean" + }, + "updated_at": { + "type": "string" + }, + "last_read_at": { + "type": "string" + }, + "url": { + "type": "string" + } + } + } + }, + "example": [ + { + "id": "1", + "repository": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}" + }, + "subject": { + "title": "Greetings", + "url": "https://api.github.com/repos/octokit/octokit.rb/issues/123", + "latest_comment_url": "https://api.github.com/repos/octokit/octokit.rb/issues/comments/123", + "type": "Issue" + }, + "reason": "subscribed", + "unread": true, + "updated_at": "2014-11-07T22:01:45Z", + "last_read_at": "2014-11-07T22:01:45Z", + "url": "https://api.github.com/notifications/threads/1" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/notifications" + }, + { + "lang": "JS", + "source": "octokit.activity.listNotifications()" + }, + { + "lang": "Ruby", + "source": "octokit.notifications()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "put": { + "summary": "Mark as read", + "description": "Marks a notification as \"read\" removes it from the [default view on GitHub](https://github.com/notifications). If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as \"read.\" To check whether any \"unread\" notifications remain, you can use the [List your notifications](https://developer.github.com/v3/activity/notifications/#list-your-notifications) endpoint and pass the query parameter `all=false`.", + "operationId": "activity/mark-as-read", + "tags": [ + "activity" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/activity/notifications/#mark-as-read" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + } + ], + "responses": { + "205": { + "description": "response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/notifications \\\n -d '{\"last_read_at\":\"last_read_at\"}'" + }, + { + "lang": "JS", + "source": "octokit.activity.markAsRead({\n last_read_at: 'last_read_at'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.mark_as_read(\n 'last_read_at'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "last_read_at": { + "type": "string", + "description": "Describes the last point that notifications were checked. Anything updated since this time will not be updated. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp." + } + } + } + } + } + } + } + }, + "/notifications/threads/{thread_id}": { + "get": { + "summary": "View a single thread", + "description": "", + "operationId": "activity/get-thread", + "tags": [ + "activity" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/activity/notifications/#view-a-single-thread" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "thread_id", + "description": "thread_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "repository": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + } + } + }, + "subject": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "url": { + "type": "string" + }, + "latest_comment_url": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "reason": { + "type": "string" + }, + "unread": { + "type": "boolean" + }, + "updated_at": { + "type": "string" + }, + "last_read_at": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "example": { + "id": "1", + "repository": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}" + }, + "subject": { + "title": "Greetings", + "url": "https://api.github.com/repos/octokit/octokit.rb/issues/123", + "latest_comment_url": "https://api.github.com/repos/octokit/octokit.rb/issues/comments/123", + "type": "Issue" + }, + "reason": "subscribed", + "unread": true, + "updated_at": "2014-11-07T22:01:45Z", + "last_read_at": "2014-11-07T22:01:45Z", + "url": "https://api.github.com/notifications/threads/1" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/notifications/threads/42" + }, + { + "lang": "JS", + "source": "octokit.activity.getThread({\n thread_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.thread(\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "patch": { + "summary": "Mark a thread as read", + "description": "", + "operationId": "activity/mark-thread-as-read", + "tags": [ + "activity" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/activity/notifications/#mark-a-thread-as-read" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "thread_id", + "description": "thread_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "205": { + "description": "response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/notifications/threads/42" + }, + { + "lang": "JS", + "source": "octokit.activity.markThreadAsRead({\n thread_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.mark_thread_as_read(\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/notifications/threads/{thread_id}/subscription": { + "get": { + "summary": "Get a thread subscription", + "description": "This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://developer.github.com/v3/activity/watching/#get-a-repository-subscription).\n\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.", + "operationId": "activity/get-thread-subscription", + "tags": [ + "activity" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/activity/notifications/#get-a-thread-subscription" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "thread_id", + "description": "thread_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "subscribed": { + "type": "boolean" + }, + "ignored": { + "type": "boolean" + }, + "reason": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "url": { + "type": "string" + }, + "thread_url": { + "type": "string" + } + } + }, + "example": { + "subscribed": true, + "ignored": false, + "reason": null, + "created_at": "2012-10-06T21:34:12Z", + "url": "https://api.github.com/notifications/threads/1/subscription", + "thread_url": "https://api.github.com/notifications/threads/1" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/notifications/threads/42/subscription" + }, + { + "lang": "JS", + "source": "octokit.activity.getThreadSubscription({\n thread_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.thread_subscription(\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "put": { + "summary": "Set a thread subscription", + "description": "This lets you subscribe or unsubscribe from a conversation.", + "operationId": "activity/set-thread-subscription", + "tags": [ + "activity" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/activity/notifications/#set-a-thread-subscription" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "thread_id", + "description": "thread_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "subscribed": { + "type": "boolean" + }, + "ignored": { + "type": "boolean" + }, + "reason": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "url": { + "type": "string" + }, + "thread_url": { + "type": "string" + } + } + }, + "example": { + "subscribed": true, + "ignored": false, + "reason": null, + "created_at": "2012-10-06T21:34:12Z", + "url": "https://api.github.com/notifications/threads/1/subscription", + "thread_url": "https://api.github.com/notifications/threads/1" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/notifications/threads/42/subscription \\\n -d '{\"ignored\":true}'" + }, + { + "lang": "JS", + "source": "octokit.activity.setThreadSubscription({\n thread_id: 42,\n ignored: true\n})" + }, + { + "lang": "Ruby", + "source": "octokit.set_thread_subscription(\n 42,\n true\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ignored": { + "type": "boolean", + "description": "Unsubscribes and subscribes you to a conversation. Set `ignored` to `true` to block all notifications from this thread.", + "default": false + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete a thread subscription", + "description": "Mutes all future notifications for a conversation until you comment on the thread or get **@mention**ed.", + "operationId": "activity/delete-thread-subscription", + "tags": [ + "activity" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/activity/notifications/#delete-a-thread-subscription" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "thread_id", + "description": "thread_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/notifications/threads/42/subscription" + }, + { + "lang": "JS", + "source": "octokit.activity.deleteThreadSubscription({\n thread_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_thread_subscription(\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/organizations": { + "get": { + "summary": "List all organizations", + "description": "Lists all organizations, in the order that they were created on GitHub.\n\n**Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://developer.github.com/v3/#link-header) to get the URL for the next page of organizations.", + "operationId": "orgs/list", + "tags": [ + "orgs" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/orgs/#list-all-organizations" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "since", + "description": "The integer ID of the last organization that you've seen.", + "in": "query", + "required": false, + "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": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "public_members_url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "description": { + "type": "string" + } + } + } + }, + "example": [ + { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/organizations" + }, + { + "lang": "JS", + "source": "octokit.orgs.list()" + }, + { + "lang": "Ruby", + "source": "octokit.list()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/orgs/{org}": { + "get": { + "summary": "Get an organization", + "description": "To 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](https://help.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/).\n\nGitHub Apps with the `Organization plan` permission can use this endpoint to retrieve information about an organization's GitHub plan. See \"[Authenticating with GitHub Apps](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/)\" for details. For an example response, see \"[Response with GitHub plan information](https://developer.github.com/v3/orgs/#response-with-github-plan-information).\"", + "operationId": "orgs/get", + "tags": [ + "orgs" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/orgs/#get-an-organization" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "public_members_url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "company": { + "type": "string" + }, + "blog": { + "type": "string" + }, + "location": { + "type": "string" + }, + "email": { + "type": "string" + }, + "is_verified": { + "type": "boolean" + }, + "has_organization_projects": { + "type": "boolean" + }, + "has_repository_projects": { + "type": "boolean" + }, + "public_repos": { + "type": "number" + }, + "public_gists": { + "type": "number" + }, + "followers": { + "type": "number" + }, + "following": { + "type": "number" + }, + "html_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "type": { + "type": "string" + }, + "total_private_repos": { + "type": "number" + }, + "owned_private_repos": { + "type": "number" + }, + "private_gists": { + "type": "number" + }, + "disk_usage": { + "type": "number" + }, + "collaborators": { + "type": "number" + }, + "billing_email": { + "type": "string" + }, + "plan": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "space": { + "type": "number" + }, + "private_repos": { + "type": "number" + } + } + }, + "default_repository_permission": { + "type": "string" + }, + "members_can_create_repositories": { + "type": "boolean" + }, + "two_factor_requirement_enabled": { + "type": "boolean" + }, + "members_allowed_repository_creation_type": { + "type": "string" + }, + "members_can_create_public_repositories": { + "type": "boolean" + }, + "members_can_create_private_repositories": { + "type": "boolean" + }, + "members_can_create_internal_repositories": { + "type": "boolean" + } + } + }, + "examples": { + "default-response": { + "summary": "Default response", + "value": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization", + "name": "github", + "company": "GitHub", + "blog": "https://github.com/blog", + "location": "San Francisco", + "email": "octocat@github.com", + "is_verified": true, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 2, + "public_gists": 1, + "followers": 20, + "following": 0, + "html_url": "https://github.com/octocat", + "created_at": "2008-01-14T04:33:35Z", + "type": "Organization", + "total_private_repos": 100, + "owned_private_repos": 100, + "private_gists": 81, + "disk_usage": 10000, + "collaborators": 8, + "billing_email": "support@github.com", + "plan": { + "name": "Medium", + "space": 400, + "private_repos": 20 + }, + "default_repository_permission": "read", + "members_can_create_repositories": true, + "two_factor_requirement_enabled": true, + "members_allowed_repository_creation_type": "all", + "members_can_create_public_repositories": false, + "members_can_create_private_repositories": false, + "members_can_create_internal_repositories": false + } + }, + "response-with-git-hub-plan-information": { + "summary": "Response with GitHub plan information", + "value": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization", + "name": "github", + "company": "GitHub", + "blog": "https://github.com/blog", + "location": "San Francisco", + "email": "octocat@github.com", + "is_verified": true, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 2, + "public_gists": 1, + "followers": 20, + "following": 0, + "html_url": "https://github.com/octocat", + "created_at": "2008-01-14T04:33:35Z", + "type": "Organization", + "plan": { + "name": "team", + "space": 976562499, + "private_repos": 999999, + "filled_seats": 4, + "seats": 5 + } + } + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG" + }, + { + "lang": "JS", + "source": "octokit.orgs.get({\n org: 'org'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.get(\n 'org'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.surtur-preview+json\n\n```", + "required": false + } + ] + }, + "x-changes": [] + }, + "patch": { + "summary": "Edit an organization", + "description": "\n\n**Parameter Deprecation Notice:** GitHub 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](https://developer.github.com/changes/2019-12-03-internal-visibility-changes).\n\nEnables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges.", + "operationId": "orgs/update", + "tags": [ + "orgs" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/orgs/#edit-an-organization" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "public_members_url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "company": { + "type": "string" + }, + "blog": { + "type": "string" + }, + "location": { + "type": "string" + }, + "email": { + "type": "string" + }, + "is_verified": { + "type": "boolean" + }, + "has_organization_projects": { + "type": "boolean" + }, + "has_repository_projects": { + "type": "boolean" + }, + "public_repos": { + "type": "number" + }, + "public_gists": { + "type": "number" + }, + "followers": { + "type": "number" + }, + "following": { + "type": "number" + }, + "html_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "type": { + "type": "string" + }, + "total_private_repos": { + "type": "number" + }, + "owned_private_repos": { + "type": "number" + }, + "private_gists": { + "type": "number" + }, + "disk_usage": { + "type": "number" + }, + "collaborators": { + "type": "number" + }, + "billing_email": { + "type": "string" + }, + "plan": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "space": { + "type": "number" + }, + "private_repos": { + "type": "number" + } + } + }, + "default_repository_permission": { + "type": "string" + }, + "members_can_create_repositories": { + "type": "boolean" + }, + "two_factor_requirement_enabled": { + "type": "boolean" + }, + "members_allowed_repository_creation_type": { + "type": "string" + }, + "members_can_create_public_repositories": { + "type": "boolean" + }, + "members_can_create_private_repositories": { + "type": "boolean" + }, + "members_can_create_internal_repositories": { + "type": "boolean" + } + } + }, + "example": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization", + "name": "github", + "company": "GitHub", + "blog": "https://github.com/blog", + "location": "San Francisco", + "email": "octocat@github.com", + "is_verified": true, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 2, + "public_gists": 1, + "followers": 20, + "following": 0, + "html_url": "https://github.com/octocat", + "created_at": "2008-01-14T04:33:35Z", + "type": "Organization", + "total_private_repos": 100, + "owned_private_repos": 100, + "private_gists": 81, + "disk_usage": 10000, + "collaborators": 8, + "billing_email": "support@github.com", + "plan": { + "name": "Medium", + "space": 400, + "private_repos": 20 + }, + "default_repository_permission": "read", + "members_can_create_repositories": true, + "two_factor_requirement_enabled": true, + "members_allowed_repository_creation_type": "all", + "members_can_create_public_repositories": false, + "members_can_create_private_repositories": false, + "members_can_create_internal_repositories": false + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG \\\n -d '{\"billing_email\":\"billing_email\"}'" + }, + { + "lang": "JS", + "source": "octokit.orgs.update({\n org: 'org',\n billing_email: 'billing_email'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.update(\n 'org',\n 'billing_email'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.surtur-preview+json\n\n```", + "required": false + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "billing_email": { + "type": "string", + "description": "Billing email address. This address is not publicized." + }, + "company": { + "type": "string", + "description": "The company name." + }, + "email": { + "type": "string", + "description": "The publicly visible email address." + }, + "location": { + "type": "string", + "description": "The location." + }, + "name": { + "type": "string", + "description": "The shorthand name of the company." + }, + "description": { + "type": "string", + "description": "The description of the company." + }, + "has_organization_projects": { + "type": "boolean", + "description": "Toggles whether an organization can use organization projects." + }, + "has_repository_projects": { + "type": "boolean", + "description": "Toggles whether repositories that belong to the organization can use repository projects." + }, + "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.", + "enum": [ + "read", + "write", + "admin", + "none" + ], + "default": "read" + }, + "members_can_create_repositories": { + "type": "boolean", + "description": "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` \n**Note:** 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.", + "default": true + }, + "members_can_create_internal_repositories": { + "type": "boolean", + "description": "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](https://help.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)\" in the GitHub Help documentation." + }, + "members_can_create_private_repositories": { + "type": "boolean", + "description": "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](https://help.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)\" in the GitHub Help documentation." + }, + "members_can_create_public_repositories": { + "type": "boolean", + "description": "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](https://help.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)\" in the GitHub Help documentation." + }, + "members_allowed_repository_creation_type": { + "type": "string", + "description": "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. \n**Note:** 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 [this note](https://developer.github.com/v3/orgs/#members_can_create_repositories) for details.", + "enum": [ + "all", + "private", + "none" + ] + } + } + }, + "example": { + "billing_email": "support@github.com", + "company": "GitHub", + "email": "support@github.com", + "location": "San Francisco", + "name": "github", + "description": "GitHub, the company.", + "default_repository_permission": "read", + "members_can_create_repositories": true, + "members_allowed_repository_creation_type": "all" + } + } + } + } + } + }, + "/orgs/{org}/blocks": { + "get": { + "summary": "List blocked users", + "description": "List the users blocked by an organization.", + "operationId": "orgs/list-blocked-users", + "tags": [ + "orgs" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/orgs/blocking/#list-blocked-users" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "example": [ + { + "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 + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/blocks" + }, + { + "lang": "JS", + "source": "octokit.orgs.listBlockedUsers({\n org: 'org'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.blocked_users(\n 'org'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/orgs/{org}/blocks/{username}": { + "get": { + "summary": "Check whether a user is blocked from an organization", + "description": "If the user is blocked:\n\nIf the user is not blocked:", + "operationId": "orgs/check-blocked-user", + "tags": [ + "orgs" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/orgs/blocking/#check-whether-a-user-is-blocked-from-an-organization" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "If the user is blocked:" + }, + "404": { + "description": "If the user is not blocked:" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/blocks/USERNAME" + }, + { + "lang": "JS", + "source": "octokit.orgs.checkBlockedUser({\n org: 'org',\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.check_blocked_user(\n 'org',\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "put": { + "summary": "Block a user", + "description": "", + "operationId": "orgs/block-user", + "tags": [ + "orgs" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/orgs/blocking/#block-a-user" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/blocks/USERNAME" + }, + { + "lang": "JS", + "source": "octokit.orgs.blockUser({\n org: 'org',\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.block_user(\n 'org',\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "delete": { + "summary": "Unblock a user", + "description": "", + "operationId": "orgs/unblock-user", + "tags": [ + "orgs" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/orgs/blocking/#unblock-a-user" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/blocks/USERNAME" + }, + { + "lang": "JS", + "source": "octokit.orgs.unblockUser({\n org: 'org',\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.unblock_user(\n 'org',\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/orgs/{org}/credential-authorizations": { + "get": { + "summary": "List credential authorizations for an organization", + "description": "Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nAn authenticated organization owner with the `read:org` scope can list all credential authorizations for an organization that uses SAML single sign-on (SSO). The credentials are either personal access tokens or SSH keys that organization members have authorized for the organization. For more information, see [About authentication with SAML single sign-on](https://help.github.com/en/articles/about-authentication-with-saml-single-sign-on).", + "operationId": "orgs/list-credential-authorizations", + "tags": [ + "orgs" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/orgs/#list-credential-authorizations-for-an-organization" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "credential_id": { + "type": "string" + }, + "credential_type": { + "type": "string" + }, + "token_last_eight": { + "type": "string" + }, + "credential_authorized_at": { + "type": "string" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "example": [ + { + "login": "octocat", + "credential_id": "161195", + "credential_type": "personal access token", + "token_last_eight": "71c3fc11", + "credential_authorized_at": "2011-01-26T19:06:43Z", + "scopes": [ + "user", + "repo" + ] + }, + { + "login": "hubot", + "credential_id": "161196", + "credential_type": "personal access token", + "token_last_eight": "12345678", + "credential_authorized_at": "2019-03-29T19:06:43Z", + "scopes": [ + "repo" + ] + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/credential-authorizations" + }, + { + "lang": "JS", + "source": "octokit.orgs.listCredentialAuthorizations({\n org: 'org'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.credential_authorizations(\n 'org'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": true, + "previews": [] + }, + "x-changes": [] + } + }, + "/orgs/{org}/credential-authorizations/{credential_id}": { + "delete": { + "summary": "Remove a credential authorization for an organization", + "description": "Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nAn authenticated organization owner with the `admin:org` scope can remove a credential authorization for an organization that uses SAML SSO. Once you remove someone's credential authorization, they will need to create a new personal access token or SSH key and authorize it for the organization they want to access.", + "operationId": "orgs/remove-credential-authorization", + "tags": [ + "orgs" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/orgs/#remove-a-credential-authorization-for-an-organization" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "credential_id", + "description": "credential_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/credential-authorizations/42" + }, + { + "lang": "JS", + "source": "octokit.orgs.removeCredentialAuthorization({\n org: 'org',\n credential_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.remove_credential_authorization(\n 'org',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": true, + "previews": [] + }, + "x-changes": [] + } + }, + "/orgs/{org}/events": { + "get": { + "summary": "List public events for an organization", + "description": "", + "operationId": "activity/list-public-events-for-org", + "tags": [ + "activity" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/activity/events/#list-public-events-for-an-organization" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "418": { + "description": "Response definition missing" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/events" + }, + { + "lang": "JS", + "source": "octokit.activity.listPublicEventsForOrg({\n org: 'org'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.public_events_for_org(\n 'org'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/orgs/{org}/hooks": { + "get": { + "summary": "List hooks", + "description": "", + "operationId": "orgs/list-hooks", + "tags": [ + "orgs" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/orgs/hooks/#list-hooks" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "id": { + "type": "number" + }, + "url": { + "type": "string" + }, + "ping_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "events": { + "type": "array", + "items": { + "type": "string" + } + }, + "active": { + "type": "boolean" + }, + "config": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "content_type": { + "type": "string" + } + } + }, + "updated_at": { + "type": "string" + }, + "created_at": { + "type": "string" + } + } + } + }, + "example": [ + { + "id": 1, + "url": "https://api.github.com/orgs/octocat/hooks/1", + "ping_url": "https://api.github.com/orgs/octocat/hooks/1/pings", + "name": "web", + "events": [ + "push", + "pull_request" + ], + "active": true, + "config": { + "url": "http://example.com", + "content_type": "json" + }, + "updated_at": "2011-09-06T20:39:23Z", + "created_at": "2011-09-06T17:26:27Z" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/hooks" + }, + { + "lang": "JS", + "source": "octokit.orgs.listHooks({\n org: 'org'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.hooks(\n 'org'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "post": { + "summary": "Create a hook", + "description": "Here's how you can create a hook that posts payloads in JSON format:", + "operationId": "orgs/create-hook", + "tags": [ + "orgs" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/orgs/hooks/#create-a-hook" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "url": { + "type": "string" + }, + "ping_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "events": { + "type": "array", + "items": { + "type": "string" + } + }, + "active": { + "type": "boolean" + }, + "config": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "content_type": { + "type": "string" + } + } + }, + "updated_at": { + "type": "string" + }, + "created_at": { + "type": "string" + } + } + }, + "example": { + "id": 1, + "url": "https://api.github.com/orgs/octocat/hooks/1", + "ping_url": "https://api.github.com/orgs/octocat/hooks/1/pings", + "name": "web", + "events": [ + "push", + "pull_request" + ], + "active": true, + "config": { + "url": "http://example.com", + "content_type": "json" + }, + "updated_at": "2011-09-06T20:39:23Z", + "created_at": "2011-09-06T17:26:27Z" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\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\"}}'" + }, + { + "lang": "JS", + "source": "octokit.orgs.createHook({\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 }\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_hook(\n 'org',\n 'name',\n {\n url: 'url',\n content_type: 'content_type',\n secret: 'secret',\n insecure_ssl: 'insecure_ssl'\n }\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Must be passed as \"web\"." + }, + "config": { + "type": "object", + "description": "Key/value pairs to provide settings for this webhook. [These are defined below](https://developer.github.com/v3/orgs/hooks/#create-hook-config-params).", + "properties": { + "url": { + "type": "string", + "description": "The URL to which the payloads will be delivered." + }, + "content_type": { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`." + }, + "secret": { + "type": "string", + "description": "If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value in the [`X-Hub-Signature`](https://developer.github.com/webhooks/#delivery-headers) header." + }, + "insecure_ssl": { + "type": "string", + "description": "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": [ + "url" + ] + }, + "events": { + "type": "array", + "description": "Determines what [events](https://developer.github.com/v3/activity/events/types/) the hook is triggered for.", + "default": [ + "push" + ], + "items": { + "type": "string" + } + }, + "active": { + "type": "boolean", + "description": "Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications.", + "default": true + } + }, + "required": [ + "name", + "config" + ] + }, + "example": { + "name": "web", + "active": true, + "events": [ + "push", + "pull_request" + ], + "config": { + "url": "http://example.com/webhook", + "content_type": "json" + } + } + } + } + } + } + }, + "/orgs/{org}/hooks/{hook_id}": { + "get": { + "summary": "Get single hook", + "description": "", + "operationId": "orgs/get-hook", + "tags": [ + "orgs" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/orgs/hooks/#get-single-hook" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "hook_id", + "description": "hook_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "url": { + "type": "string" + }, + "ping_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "events": { + "type": "array", + "items": { + "type": "string" + } + }, + "active": { + "type": "boolean" + }, + "config": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "content_type": { + "type": "string" + } + } + }, + "updated_at": { + "type": "string" + }, + "created_at": { + "type": "string" + } + } + }, + "example": { + "id": 1, + "url": "https://api.github.com/orgs/octocat/hooks/1", + "ping_url": "https://api.github.com/orgs/octocat/hooks/1/pings", + "name": "web", + "events": [ + "push", + "pull_request" + ], + "active": true, + "config": { + "url": "http://example.com", + "content_type": "json" + }, + "updated_at": "2011-09-06T20:39:23Z", + "created_at": "2011-09-06T17:26:27Z" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/hooks/42" + }, + { + "lang": "JS", + "source": "octokit.orgs.getHook({\n org: 'org',\n hook_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.hook(\n 'org',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "patch": { + "summary": "Edit a hook", + "description": "", + "operationId": "orgs/update-hook", + "tags": [ + "orgs" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/orgs/hooks/#edit-a-hook" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "hook_id", + "description": "hook_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "url": { + "type": "string" + }, + "ping_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "events": { + "type": "array", + "items": { + "type": "string" + } + }, + "active": { + "type": "boolean" + }, + "config": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "content_type": { + "type": "string" + } + } + }, + "updated_at": { + "type": "string" + }, + "created_at": { + "type": "string" + } + } + }, + "example": { + "id": 1, + "url": "https://api.github.com/orgs/octocat/hooks/1", + "ping_url": "https://api.github.com/orgs/octocat/hooks/1/pings", + "name": "web", + "events": [ + "pull_request" + ], + "active": true, + "config": { + "url": "http://example.com", + "content_type": "json" + }, + "updated_at": "2011-09-06T20:39:23Z", + "created_at": "2011-09-06T17:26:27Z" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\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\"}}'" + }, + { + "lang": "JS", + "source": "octokit.orgs.updateHook({\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})" + }, + { + "lang": "Ruby", + "source": "octokit.update_hook(\n 'org',\n 42,\n {\n url: 'url',\n content_type: 'content_type',\n secret: 'secret',\n insecure_ssl: 'insecure_ssl'\n }\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "config": { + "type": "object", + "description": "Key/value pairs to provide settings for this webhook. [These are defined below](https://developer.github.com/v3/orgs/hooks/#update-hook-config-params).", + "properties": { + "url": { + "type": "string", + "description": "The URL to which the payloads will be delivered." + }, + "content_type": { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`." + }, + "secret": { + "type": "string", + "description": "If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value in the [`X-Hub-Signature`](https://developer.github.com/webhooks/#delivery-headers) header." + }, + "insecure_ssl": { + "type": "string", + "description": "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": [ + "url" + ] + }, + "events": { + "type": "array", + "description": "Determines what [events](https://developer.github.com/v3/activity/events/types/) the hook is triggered for.", + "default": [ + "push" + ], + "items": { + "type": "string" + } + }, + "active": { + "type": "boolean", + "description": "Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications.", + "default": true + } + } + }, + "example": { + "active": true, + "events": [ + "pull_request" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete a hook", + "description": "", + "operationId": "orgs/delete-hook", + "tags": [ + "orgs" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/orgs/hooks/#delete-a-hook" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "hook_id", + "description": "hook_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/hooks/42" + }, + { + "lang": "JS", + "source": "octokit.orgs.deleteHook({\n org: 'org',\n hook_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_hook(\n 'org',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/orgs/{org}/hooks/{hook_id}/pings": { + "post": { + "summary": "Ping a hook", + "description": "This will trigger a [ping event](https://developer.github.com/webhooks/#ping-event) to be sent to the hook.", + "operationId": "orgs/ping-hook", + "tags": [ + "orgs" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/orgs/hooks/#ping-a-hook" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "hook_id", + "description": "hook_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/hooks/42/pings" + }, + { + "lang": "JS", + "source": "octokit.orgs.pingHook({\n org: 'org',\n hook_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.ping_hook(\n 'org',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/orgs/{org}/installation": { + "get": { + "summary": "Get an organization installation", + "description": "Enables an authenticated GitHub App to find the organization's installation information.\n\nYou must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.", + "operationId": "apps/get-org-installation", + "tags": [ + "apps" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/apps/#get-an-organization-installation" + }, + "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 + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "account": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "repository_selection": { + "type": "string" + }, + "access_tokens_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "app_id": { + "type": "number" + }, + "target_id": { + "type": "number" + }, + "target_type": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "checks": { + "type": "string" + }, + "metadata": { + "type": "string" + }, + "contents": { + "type": "string" + } + } + }, + "events": { + "type": "array", + "items": { + "type": "string" + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "single_file_name": { + "type": "string" + } + } + }, + "example": { + "id": 1, + "account": { + "login": "github", + "id": 1, + "avatar_url": "https://github.com/images/error/hubot_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/orgs/github", + "html_url": "https://github.com/github", + "followers_url": "https://api.github.com/users/github/followers", + "following_url": "https://api.github.com/users/github/following{/other_user}", + "gists_url": "https://api.github.com/users/github/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github/subscriptions", + "organizations_url": "https://api.github.com/users/github/orgs", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "received_events_url": "https://api.github.com/users/github/received_events", + "type": "Organization", + "site_admin": false + }, + "repository_selection": "all", + "access_tokens_url": "https://api.github.com/installations/1/access_tokens", + "repositories_url": "https://api.github.com/installation/repositories", + "html_url": "https://github.com/organizations/github/settings/installations/1", + "app_id": 1, + "target_id": 1, + "target_type": "Organization", + "permissions": { + "checks": "write", + "metadata": "read", + "contents": "read" + }, + "events": [ + "push", + "pull_request" + ], + "created_at": "2018-02-09T20:51:14Z", + "updated_at": "2018-02-09T20:51:14Z", + "single_file_name": null + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.machine-man-preview+json\" \\\n https://api.github.com/orgs/ORG/installation" + }, + { + "lang": "JS", + "source": "octokit.apps.getOrgInstallation({\n org: 'org'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.org_installation(\n 'org'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [ + { + "name": "machine-man", + "note": "To access the API with your GitHub App, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` Header for your requests.\n\n`application/vnd.github.machine-man-preview+json`", + "required": true + } + ] + }, + "x-changes": [ + { + "type": "operation", + "date": "2019-04-10", + "note": "\"Find organization installation\" renamed to \"Get an organization installation\"", + "before": { + "operationId": "apps/find-org-installation" + }, + "after": { + "operationId": "apps/get-org-installation" + } + } + ] + } + }, + "/orgs/{org}/installations": { + "get": { + "summary": "List installations for an organization", + "description": "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.", + "operationId": "orgs/list-installations", + "tags": [ + "orgs" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/orgs/#list-installations-for-an-organization" + }, + "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 + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": "object", + "properties": { + "total_count": { + "type": "number" + }, + "installations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "account": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "repository_selection": { + "type": "string" + }, + "access_tokens_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "app_id": { + "type": "number" + }, + "target_id": { + "type": "number" + }, + "target_type": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "deployments": { + "type": "string" + }, + "metadata": { + "type": "string" + }, + "pull_requests": { + "type": "string" + }, + "statuses": { + "type": "string" + } + } + }, + "events": { + "type": "array", + "items": { + "type": "string" + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "single_file_name": { + "type": "string" + } + } + } + } + } + }, + "example": { + "total_count": 2, + "installations": [ + { + "id": 25381, + "account": { + "login": "octo-org", + "id": 6811672, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjY4MTE2NzI=", + "avatar_url": "https://avatars3.githubusercontent.com/u/6811672?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/octo-org", + "html_url": "https://github.com/octo-org", + "followers_url": "https://api.github.com/users/octo-org/followers", + "following_url": "https://api.github.com/users/octo-org/following{/other_user}", + "gists_url": "https://api.github.com/users/octo-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octo-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octo-org/subscriptions", + "organizations_url": "https://api.github.com/users/octo-org/orgs", + "repos_url": "https://api.github.com/users/octo-org/repos", + "events_url": "https://api.github.com/users/octo-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/octo-org/received_events", + "type": "Organization", + "site_admin": false + }, + "repository_selection": "selected", + "access_tokens_url": "https://api.github.com/app/installations/25381/access_tokens", + "repositories_url": "https://api.github.com/installation/repositories", + "html_url": "https://github.com/organizations/octo-org/settings/installations/25381", + "app_id": 2218, + "target_id": 6811672, + "target_type": "Organization", + "permissions": { + "deployments": "write", + "metadata": "read", + "pull_requests": "read", + "statuses": "read" + }, + "events": [ + "deployment", + "deployment_status" + ], + "created_at": "2017-05-16T08:47:09.000-07:00", + "updated_at": "2017-06-06T11:23:23.000-07:00", + "single_file_name": null + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.machine-man-preview+json\" \\\n https://api.github.com/orgs/ORG/installations" + }, + { + "lang": "JS", + "source": "octokit.orgs.listInstallations({\n org: 'org'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.installations(\n 'org'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "machine-man", + "note": "To access the API with your GitHub App, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` Header for your requests.\n\n`application/vnd.github.machine-man-preview+json`", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/orgs/{org}/interaction-limits": { + "get": { + "summary": "Get interaction restrictions for an organization", + "description": "Shows which group of GitHub users can interact with this organization and when the restriction expires. If there are no restrictions, you will see an empty response.", + "operationId": "interactions/get-restrictions-for-org", + "tags": [ + "interactions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/interactions/orgs/#get-interaction-restrictions-for-an-organization" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.sombra-preview+json" + }, + "required": true + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "limit": { + "type": "string" + }, + "origin": { + "type": "string" + }, + "expires_at": { + "type": "string" + } + } + }, + "example": { + "limit": "collaborators_only", + "origin": "organization", + "expires_at": "2018-08-17T04:18:39Z" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.sombra-preview+json\" \\\n https://api.github.com/orgs/ORG/interaction-limits" + }, + { + "lang": "JS", + "source": "octokit.interactions.getRestrictionsForOrg({\n org: 'org'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.restrictions_for_org(\n 'org'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "sombra", + "note": "The Interactions API is currently in public preview. See the [blog post](https://developer.github.com/changes/2018-12-18-interactions-preview) preview for more details. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.sombra-preview\n\n```", + "required": true + } + ] + }, + "x-changes": [] + }, + "put": { + "summary": "Add or update interaction restrictions for an organization", + "description": "Temporarily restricts interactions to certain GitHub users in any public repository in the given organization. You must be an organization owner to set these restrictions.", + "operationId": "interactions/add-or-update-restrictions-for-org", + "tags": [ + "interactions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/interactions/orgs/#add-or-update-interaction-restrictions-for-an-organization" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.sombra-preview+json" + }, + "required": true + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "limit": { + "type": "string" + }, + "origin": { + "type": "string" + }, + "expires_at": { + "type": "string" + } + } + }, + "example": { + "limit": "collaborators_only", + "origin": "organization", + "expires_at": "2018-08-17T04:18:39Z" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\n -H\"Accept: application/vnd.github.sombra-preview+json\" \\\n https://api.github.com/orgs/ORG/interaction-limits \\\n -d '{\"limit\":\"limit\"}'" + }, + { + "lang": "JS", + "source": "octokit.interactions.addOrUpdateRestrictionsForOrg({\n org: 'org',\n limit: 'limit'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.add_or_update_restrictions_for_org(\n 'org',\n 'limit'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "sombra", + "note": "The Interactions API is currently in public preview. See the [blog post](https://developer.github.com/changes/2018-12-18-interactions-preview) preview for more details. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.sombra-preview\n\n```", + "required": true + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "limit": { + "type": "string", + "description": "Specifies the group of GitHub users who can comment, open issues, or create pull requests in public repositories for the given organization. Must be one of: `existing_users`, `contributors_only`, or `collaborators_only`.", + "enum": [ + "existing_users", + "contributors_only", + "collaborators_only" + ] + } + }, + "required": [ + "limit" + ] + }, + "example": { + "limit": "collaborators_only" + } + } + } + } + }, + "delete": { + "summary": "Remove interaction restrictions for an organization", + "description": "Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions.", + "operationId": "interactions/remove-restrictions-for-org", + "tags": [ + "interactions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/interactions/orgs/#remove-interaction-restrictions-for-an-organization" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.sombra-preview+json" + }, + "required": true + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.sombra-preview+json\" \\\n https://api.github.com/orgs/ORG/interaction-limits" + }, + { + "lang": "JS", + "source": "octokit.interactions.removeRestrictionsForOrg({\n org: 'org'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.remove_restrictions_for_org(\n 'org'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "sombra", + "note": "The Interactions API is currently in public preview. See the [blog post](https://developer.github.com/changes/2018-12-18-interactions-preview) preview for more details. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.sombra-preview\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/orgs/{org}/invitations": { + "get": { + "summary": "List pending organization invitations", + "description": "The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`.", + "operationId": "orgs/list-pending-invitations", + "tags": [ + "orgs" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/orgs/members/#list-pending-organization-invitations" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "id": { + "type": "number" + }, + "login": { + "type": "string" + }, + "email": { + "type": "string" + }, + "role": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "inviter": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "team_count": { + "type": "number" + }, + "invitation_team_url": { + "type": "string" + } + } + } + }, + "example": [ + { + "id": 1, + "login": "monalisa", + "email": "octocat@github.com", + "role": "direct_member", + "created_at": "2016-11-30T06:46:10-08:00", + "inviter": { + "login": "other_user", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/other_user_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/other_user", + "html_url": "https://github.com/other_user", + "followers_url": "https://api.github.com/users/other_user/followers", + "following_url": "https://api.github.com/users/other_user/following{/other_user}", + "gists_url": "https://api.github.com/users/other_user/gists{/gist_id}", + "starred_url": "https://api.github.com/users/other_user/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/other_user/subscriptions", + "organizations_url": "https://api.github.com/users/other_user/orgs", + "repos_url": "https://api.github.com/users/other_user/repos", + "events_url": "https://api.github.com/users/other_user/events{/privacy}", + "received_events_url": "https://api.github.com/users/other_user/received_events", + "type": "User", + "site_admin": false + }, + "team_count": 2, + "invitation_team_url": "https://api.github.com/organizations/2/invitations/1/teams" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/invitations" + }, + { + "lang": "JS", + "source": "octokit.orgs.listPendingInvitations({\n org: 'org'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.pending_invitations(\n 'org'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "post": { + "summary": "Create organization invitation", + "description": "Invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner.\n\nThis endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See \"[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)\" and \"[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)\" for details.", + "operationId": "orgs/create-invitation", + "tags": [ + "orgs" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/orgs/members/#create-organization-invitation" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "login": { + "type": "string" + }, + "email": { + "type": "string" + }, + "role": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "inviter": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "team_count": { + "type": "number" + }, + "invitation_team_url": { + "type": "string" + } + } + }, + "example": { + "id": 1, + "login": "monalisa", + "email": "octocat@github.com", + "role": "direct_member", + "created_at": "2016-11-30T06:46:10-08:00", + "inviter": { + "login": "other_user", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/other_user_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/other_user", + "html_url": "https://github.com/other_user", + "followers_url": "https://api.github.com/users/other_user/followers", + "following_url": "https://api.github.com/users/other_user/following{/other_user}", + "gists_url": "https://api.github.com/users/other_user/gists{/gist_id}", + "starred_url": "https://api.github.com/users/other_user/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/other_user/subscriptions", + "organizations_url": "https://api.github.com/users/other_user/orgs", + "repos_url": "https://api.github.com/users/other_user/repos", + "events_url": "https://api.github.com/users/other_user/events{/privacy}", + "received_events_url": "https://api.github.com/users/other_user/received_events", + "type": "User", + "site_admin": false + }, + "team_count": 2, + "invitation_team_url": "https://api.github.com/organizations/2/invitations/1/teams" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/invitations \\\n -d '{\"invitee_id\":42}'" + }, + { + "lang": "JS", + "source": "octokit.orgs.createInvitation({\n org: 'org',\n invitee_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_invitation(\n 'org',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [], + "triggersNotification": true + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "invitee_id": { + "type": "integer", + "description": "**Required unless you provide `email`**. GitHub user ID for the person you are inviting." + }, + "email": { + "type": "string", + "description": "**Required unless you provide `invitee_id`**. Email address of the person you are inviting, which can be an existing GitHub user." + }, + "role": { + "type": "string", + "description": "Specify role for new member. Can be one of: \n\\* `admin` - Organization owners with full administrative rights to the organization and complete access to all repositories and teams. \n\\* `direct_member` - Non-owner organization members with ability to see other members and join teams by invitation. \n\\* `billing_manager` - Non-owner organization members with ability to manage the billing settings of your organization.", + "enum": [ + "admin", + "direct_member", + "billing_manager" + ], + "default": "direct_member" + }, + "team_ids": { + "type": "array", + "description": "Specify IDs for the teams you want to invite new members to.", + "items": { + "type": "integer" + } + } + } + }, + "example": { + "email": "octocat@github.com", + "role": "direct_member", + "team_ids": [ + 12, + 26 + ] + } + } + } + } + } + }, + "/orgs/{org}/invitations/{invitation_id}/teams": { + "get": { + "summary": "List organization invitation teams", + "description": "List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner.", + "operationId": "orgs/list-invitation-teams", + "tags": [ + "orgs" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/orgs/members/#list-organization-invitation-teams" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "invitation_id", + "description": "invitation_id parameter", + "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": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "privacy": { + "type": "string" + }, + "permission": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + }, + "parent": { + "type": "string" + } + } + } + }, + "example": [ + { + "id": 1, + "node_id": "MDQ6VGVhbTE=", + "url": "https://api.github.com/teams/1", + "html_url": "https://api.github.com/teams/justice-league", + "name": "Justice League", + "slug": "justice-league", + "description": "A great team.", + "privacy": "closed", + "permission": "admin", + "members_url": "https://api.github.com/teams/1/members{/member}", + "repositories_url": "https://api.github.com/teams/1/repos", + "parent": null + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/invitations/42/teams" + }, + { + "lang": "JS", + "source": "octokit.orgs.listInvitationTeams({\n org: 'org',\n invitation_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.invitation_teams(\n 'org',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/orgs/{org}/issues": { + "get": { + "summary": "List all issues for a given organization assigned to the authenticated user", + "description": "**Note**: 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.\n\nBe 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](https://developer.github.com/v3/pulls/#list-pull-requests)\" endpoint.\n\n", + "operationId": "issues/list-for-org", + "tags": [ + "issues" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/issues/#list-issues" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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" + } + }, + { + "name": "state", + "description": "Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "open", + "closed", + "all" + ], + "default": "open" + } + }, + { + "name": "labels", + "description": "A list of comma separated label names. Example: `bug,ui,@high`", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sort", + "description": "What to sort results by. Can be either `created`, `updated`, `comments`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "created", + "updated", + "comments" + ], + "default": "created" + } + }, + { + "name": "direction", + "description": "The direction of the sort. Can be either `asc` or `desc`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "default": "desc" + } + }, + { + "name": "since", + "description": "Only issues updated at or after this time are returned. 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" + } + }, + { + "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": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repository_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "color": { + "type": "string" + }, + "default": { + "type": "boolean" + } + } + } + }, + "assignee": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "assignees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "milestone": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "open_issues": { + "type": "number" + }, + "closed_issues": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "closed_at": { + "type": "string" + }, + "due_on": { + "type": "string" + } + } + }, + "locked": { + "type": "boolean" + }, + "active_lock_reason": { + "type": "string" + }, + "comments": { + "type": "number" + }, + "pull_request": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "diff_url": { + "type": "string" + }, + "patch_url": { + "type": "string" + } + } + }, + "closed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "repository": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + } + } + } + }, + "example": [ + { + "id": 1, + "node_id": "MDU6SXNzdWUx", + "url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", + "repository_url": "https://api.github.com/repos/octocat/Hello-World", + "labels_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}", + "comments_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/comments", + "events_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/events", + "html_url": "https://github.com/octocat/Hello-World/issues/1347", + "number": 1347, + "state": "open", + "title": "Found a bug", + "body": "I'm having a problem with this.", + "user": { + "login": "octocat", + "id": 1, + "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 + }, + "labels": [ + { + "id": 208045946, + "node_id": "MDU6TGFiZWwyMDgwNDU5NDY=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", + "name": "bug", + "description": "Something isn't working", + "color": "f29513", + "default": true + } + ], + "assignee": { + "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 + }, + "assignees": [ + { + "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 + } + ], + "milestone": { + "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1", + "html_url": "https://github.com/octocat/Hello-World/milestones/v1.0", + "labels_url": "https://api.github.com/repos/octocat/Hello-World/milestones/1/labels", + "id": 1002604, + "node_id": "MDk6TWlsZXN0b25lMTAwMjYwNA==", + "number": 1, + "state": "open", + "title": "v1.0", + "description": "Tracking milestone for version 1.0", + "creator": { + "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 + }, + "open_issues": 4, + "closed_issues": 8, + "created_at": "2011-04-10T20:09:31Z", + "updated_at": "2014-03-03T18:58:10Z", + "closed_at": "2013-02-12T13:22:01Z", + "due_on": "2012-10-09T23:39:01Z" + }, + "locked": true, + "active_lock_reason": "too heated", + "comments": 0, + "pull_request": { + "url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347", + "html_url": "https://github.com/octocat/Hello-World/pull/1347", + "diff_url": "https://github.com/octocat/Hello-World/pull/1347.diff", + "patch_url": "https://github.com/octocat/Hello-World/pull/1347.patch" + }, + "closed_at": null, + "created_at": "2011-04-22T13:33:48Z", + "updated_at": "2011-04-22T13:33:48Z", + "repository": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/issues" + }, + { + "lang": "JS", + "source": "octokit.issues.listForOrg({\n org: 'org'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.for_org(\n 'org'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [ + { + "name": "machine-man", + "note": "If an issue is opened via a GitHub App, the response will include the `performed_via_github_app` object with information about the GitHub App. For more information, see the [related blog post](https://developer.github.com/changes/2016-09-14-Integrations-Early-Access).\n\nTo receive the `performed_via_github_app` object is the response, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.machine-man-preview\n\n```", + "required": false + }, + { + "name": "squirrel-girl", + "note": "An additional `reactions` object in the issue 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://developer.github.com/v3/media) in the `Accept` header:\n\n```\n application/vnd.github.squirrel-girl-preview\n\n```\n\nThe `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions.", + "required": false + } + ] + }, + "x-changes": [] + } + }, + "/orgs/{org}/members": { + "get": { + "summary": "Members list", + "description": "List all users who are members of an organization. If the authenticated user is also a member of this organization then both concealed and public members will be returned.\n\n", + "operationId": "orgs/list-members", + "tags": [ + "orgs" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/orgs/members/#members-list" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "filter", + "description": "Filter members returned in the list. Can be one of: \n\\* `2fa_disabled` - Members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled. Available for organization owners. \n\\* `all` - All members the authenticated user can see.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "2fa_disabled", + "all" + ], + "default": "all" + } + }, + { + "name": "role", + "description": "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.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "all", + "admin", + "member" + ], + "default": "all" + } + }, + { + "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": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "example": [ + { + "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 + } + ] + } + } + }, + "302": { + "description": "Response if requester is not an organization member" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/members" + }, + { + "lang": "JS", + "source": "octokit.orgs.listMembers({\n org: 'org'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.members(\n 'org'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/orgs/{org}/members/{username}": { + "get": { + "summary": "Check membership", + "description": "Check if a user is, publicly or privately, a member of the organization.", + "operationId": "orgs/check-membership", + "tags": [ + "orgs" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/orgs/members/#check-membership" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Response if requester is an organization member and user is a member" + }, + "302": { + "description": "Response if requester is not an organization member" + }, + "404": { + "description": "Response if requester is an organization member and user is not a member" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/members/USERNAME" + }, + { + "lang": "JS", + "source": "octokit.orgs.checkMembership({\n org: 'org',\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.check_membership(\n 'org',\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "delete": { + "summary": "Remove a member", + "description": "Removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories.", + "operationId": "orgs/remove-member", + "tags": [ + "orgs" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/orgs/members/#remove-a-member" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/members/USERNAME" + }, + { + "lang": "JS", + "source": "octokit.orgs.removeMember({\n org: 'org',\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.remove_member(\n 'org',\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/orgs/{org}/memberships/{username}": { + "get": { + "summary": "Get organization membership", + "description": "In order to get a user's membership with an organization, the authenticated user must be an organization member.", + "operationId": "orgs/get-membership", + "tags": [ + "orgs" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/orgs/members/#get-organization-membership" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "state": { + "type": "string" + }, + "role": { + "type": "string" + }, + "organization_url": { + "type": "string" + }, + "organization": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "public_members_url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + } + }, + "examples": { + "response-if-user-has-an-active-admin-membership-with-organization": { + "summary": "Response if user has an active admin membership with organization", + "value": { + "url": "https://api.github.com/orgs/octocat/memberships/defunkt", + "state": "active", + "role": "admin", + "organization_url": "https://api.github.com/orgs/octocat", + "organization": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization" + }, + "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 + } + } + }, + "response-if-user-has-an-active-membership-with-organization": { + "summary": "Response if user has an active membership with organization", + "value": { + "url": "https://api.github.com/orgs/octocat/memberships/defunkt", + "state": "active", + "role": "member", + "organization_url": "https://api.github.com/orgs/octocat", + "organization": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization" + }, + "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 + } + } + }, + "response-if-user-has-a-pending-membership-with-organization": { + "summary": "Response if user has a pending membership with organization", + "value": { + "url": "https://api.github.com/orgs/invitocat/memberships/defunkt", + "state": "pending", + "role": "member", + "organization_url": "https://api.github.com/orgs/invitocat", + "organization": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization" + }, + "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 + } + } + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/memberships/USERNAME" + }, + { + "lang": "JS", + "source": "octokit.orgs.getMembership({\n org: 'org',\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.membership(\n 'org',\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "put": { + "summary": "Add or update organization membership", + "description": "Only authenticated organization owners can add a member to the organization or update the member's role.\n\n* If the authenticated user is _adding_ a member to the organization, the invited user will receive an email inviting them to the organization. The user's [membership status](https://developer.github.com/v3/orgs/members/#get-organization-membership) will be `pending` until they accept the invitation.\n \n* Authenticated users can _update_ a user's membership by passing the `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.\n\n**Rate limits**\n\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.", + "operationId": "orgs/add-or-update-membership", + "tags": [ + "orgs" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/orgs/members/#add-or-update-organization-membership" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "state": { + "type": "string" + }, + "role": { + "type": "string" + }, + "organization_url": { + "type": "string" + }, + "organization": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "public_members_url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + } + }, + "examples": { + "response-if-user-was-previously-unaffiliated-with-organization": { + "summary": "Response if user was previously unaffiliated with organization", + "value": { + "url": "https://api.github.com/orgs/invitocat/memberships/defunkt", + "state": "pending", + "role": "admin", + "organization_url": "https://api.github.com/orgs/invitocat", + "organization": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization" + }, + "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 + } + } + }, + "response-if-user-already-had-membership-with-organization": { + "summary": "Response if user already had membership with organization", + "value": { + "url": "https://api.github.com/orgs/octocat/memberships/defunkt", + "state": "active", + "role": "admin", + "organization_url": "https://api.github.com/orgs/octocat", + "organization": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization" + }, + "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 + } + } + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/memberships/USERNAME \\\n -d '{\"role\":\"role\"}'" + }, + { + "lang": "JS", + "source": "octokit.orgs.addOrUpdateMembership({\n org: 'org',\n username: 'username',\n role: 'role'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.add_or_update_membership(\n 'org',\n 'username',\n 'role'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "role": { + "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.", + "enum": [ + "admin", + "member" + ], + "default": "member" + } + } + } + } + } + } + }, + "delete": { + "summary": "Remove organization membership", + "description": "In order to remove a user's membership with an organization, the authenticated user must be an organization owner.\n\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.", + "operationId": "orgs/remove-membership", + "tags": [ + "orgs" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/orgs/members/#remove-organization-membership" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/memberships/USERNAME" + }, + { + "lang": "JS", + "source": "octokit.orgs.removeMembership({\n org: 'org',\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.remove_membership(\n 'org',\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/orgs/{org}/migrations": { + "post": { + "summary": "Start an organization migration", + "description": "Initiates the generation of a migration archive.", + "operationId": "migrations/start-for-org", + "tags": [ + "migrations" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/migrations/orgs/#start-an-organization-migration" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "public_members_url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "guid": { + "type": "string" + }, + "state": { + "type": "string" + }, + "lock_repositories": { + "type": "boolean" + }, + "exclude_attachments": { + "type": "boolean" + }, + "repositories": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + } + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + }, + "example": { + "id": 79, + "owner": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization" + }, + "guid": "0b989ba4-242f-11e5-81e1-c7b6966d2516", + "state": "pending", + "lock_repositories": true, + "exclude_attachments": false, + "repositories": [ + { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + ], + "url": "https://api.github.com/orgs/octo-org/migrations/79", + "created_at": "2015-07-06T15:33:38-07:00", + "updated_at": "2015-07-06T15:33:38-07:00" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/migrations \\\n -d '{\"repositories\":[\"repositories\"]}'" + }, + { + "lang": "JS", + "source": "octokit.migrations.startForOrg({\n org: 'org',\n repositories: [\n 'repositories'\n ]\n})" + }, + { + "lang": "Ruby", + "source": "octokit.start_for_org(\n 'org',\n [\n 'repositories'\n ]\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "repositories": { + "type": "array", + "description": "A list of arrays indicating which repositories should be migrated.", + "items": { + "type": "string" + } + }, + "lock_repositories": { + "type": "boolean", + "description": "Indicates whether repositories should be locked (to prevent manipulation) while migrating data.", + "default": false + }, + "exclude_attachments": { + "type": "boolean", + "description": "Indicates whether attachments should be excluded from the migration (to reduce migration archive file size).", + "default": false + } + }, + "required": [ + "repositories" + ] + }, + "example": { + "repositories": [ + "github/Hello-World" + ], + "lock_repositories": true + } + } + } + } + }, + "get": { + "summary": "List organization migrations", + "description": "Lists the most recent migrations.", + "operationId": "migrations/list-for-org", + "tags": [ + "migrations" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/migrations/orgs/#list-organization-migrations" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.wyandotte-preview+json" + }, + "required": true + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "id": { + "type": "number" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "public_members_url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "guid": { + "type": "string" + }, + "state": { + "type": "string" + }, + "lock_repositories": { + "type": "boolean" + }, + "exclude_attachments": { + "type": "boolean" + }, + "repositories": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + } + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + } + }, + "example": [ + { + "id": 79, + "owner": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization" + }, + "guid": "0b989ba4-242f-11e5-81e1-c7b6966d2516", + "state": "pending", + "lock_repositories": true, + "exclude_attachments": false, + "repositories": [ + { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + ], + "url": "https://api.github.com/orgs/octo-org/migrations/79", + "created_at": "2015-07-06T15:33:38-07:00", + "updated_at": "2015-07-06T15:33:38-07:00" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.wyandotte-preview+json\" \\\n https://api.github.com/orgs/ORG/migrations" + }, + { + "lang": "JS", + "source": "octokit.migrations.listForOrg({\n org: 'org'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.for_org(\n 'org'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [ + { + "name": "wyandotte", + "note": "To access the Migrations API, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.wyandotte-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/orgs/{org}/migrations/{migration_id}": { + "get": { + "summary": "Get the status of an organization migration", + "description": "Fetches the status of a migration.\n\nThe `state` of a migration can be one of the following values:\n\n* `pending`, which means the migration hasn't started yet.\n* `exporting`, which means the migration is in progress.\n* `exported`, which means the migration finished successfully.\n* `failed`, which means the migration failed.", + "operationId": "migrations/get-status-for-org", + "tags": [ + "migrations" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/migrations/orgs/#get-the-status-of-an-organization-migration" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.wyandotte-preview+json" + }, + "required": true + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "migration_id", + "description": "migration_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "* `pending`, which means the migration hasn't started yet.\n* `exporting`, which means the migration is in progress.\n* `exported`, which means the migration finished successfully.\n* `failed`, which means the migration failed.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "public_members_url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "guid": { + "type": "string" + }, + "state": { + "type": "string" + }, + "lock_repositories": { + "type": "boolean" + }, + "exclude_attachments": { + "type": "boolean" + }, + "repositories": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + } + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + }, + "example": { + "id": 79, + "owner": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization" + }, + "guid": "0b989ba4-242f-11e5-81e1-c7b6966d2516", + "state": "exported", + "lock_repositories": true, + "exclude_attachments": false, + "repositories": [ + { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + ], + "url": "https://api.github.com/orgs/octo-org/migrations/79", + "created_at": "2015-07-06T15:33:38-07:00", + "updated_at": "2015-07-06T15:33:38-07:00" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.wyandotte-preview+json\" \\\n https://api.github.com/orgs/ORG/migrations/42" + }, + { + "lang": "JS", + "source": "octokit.migrations.getStatusForOrg({\n org: 'org',\n migration_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.status_for_org(\n 'org',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [ + { + "name": "wyandotte", + "note": "To access the Migrations API, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.wyandotte-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/orgs/{org}/migrations/{migration_id}/archive": { + "get": { + "summary": "Download an organization migration archive", + "description": "Fetches the URL to a migration archive.\n\n", + "operationId": "migrations/download-archive-for-org", + "tags": [ + "migrations" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/migrations/orgs/#download-an-organization-migration-archive" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.wyandotte-preview+json" + }, + "required": true + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "migration_id", + "description": "migration_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "302": { + "description": "response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.wyandotte-preview+json\" \\\n https://api.github.com/orgs/ORG/migrations/42/archive" + }, + { + "lang": "JS", + "source": "octokit.migrations.downloadArchiveForOrg({\n org: 'org',\n migration_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.download_archive_for_org(\n 'org',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [ + { + "name": "wyandotte", + "note": "To access the Migrations API, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.wyandotte-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [ + { + "type": "operation", + "date": "2020-01-27", + "note": "\"migrations/get-archive-for-org\" operation ID is now \"migrations/download-archive-for-org\"", + "before": { + "operationId": "migrations/get-archive-for-org" + }, + "after": { + "operationId": "migrations/download-archive-for-org" + } + } + ] + }, + "delete": { + "summary": "Delete an organization migration archive", + "description": "Deletes a previous migration archive. Migration archives are automatically deleted after seven days.", + "operationId": "migrations/delete-archive-for-org", + "tags": [ + "migrations" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/migrations/orgs/#delete-an-organization-migration-archive" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.wyandotte-preview+json" + }, + "required": true + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "migration_id", + "description": "migration_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.wyandotte-preview+json\" \\\n https://api.github.com/orgs/ORG/migrations/42/archive" + }, + { + "lang": "JS", + "source": "octokit.migrations.deleteArchiveForOrg({\n org: 'org',\n migration_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_archive_for_org(\n 'org',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [ + { + "name": "wyandotte", + "note": "To access the Migrations API, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.wyandotte-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock": { + "delete": { + "summary": "Unlock an organization repository", + "description": "Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://developer.github.com/v3/repos/#delete-a-repository) when the migration is complete and you no longer need the source data.", + "operationId": "migrations/unlock-repo-for-org", + "tags": [ + "migrations" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/migrations/orgs/#unlock-an-organization-repository" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.wyandotte-preview+json" + }, + "required": true + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "migration_id", + "description": "migration_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "repo_name", + "description": "repo_name parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.wyandotte-preview+json\" \\\n https://api.github.com/orgs/ORG/migrations/42/repos/REPO_NAME/lock" + }, + { + "lang": "JS", + "source": "octokit.migrations.unlockRepoForOrg({\n org: 'org',\n migration_id: 42,\n repo_name: 'repo_name'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.unlock_repo_for_org(\n 'org',\n 42,\n 'repo_name'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [ + { + "name": "wyandotte", + "note": "To access the Migrations API, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.wyandotte-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/orgs/{org}/migrations/{migration_id}/repositories": { + "get": { + "summary": "List repositories in an organization migration", + "description": "List all the repositories for this organization migration.", + "operationId": "migrations/list-repos-for-org", + "tags": [ + "migrations" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/migrations/orgs/#list-repositories-in-an-organization-migration" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.wyandotte-preview+json" + }, + "required": true + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "migration_id", + "description": "migration_id parameter", + "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": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + }, + "license": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "spdx_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "node_id": { + "type": "string" + } + } + } + } + } + }, + "example": [ + { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "subscribers_count": 42, + "network_count": 0, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZW1pdA==" + } + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.wyandotte-preview+json\" \\\n https://api.github.com/orgs/ORG/migrations/42/repositories" + }, + { + "lang": "JS", + "source": "octokit.migrations.listReposForOrg({\n org: 'org',\n migration_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.repos_for_org(\n 'org',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [ + { + "name": "wyandotte", + "note": "To access the Migrations API, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.wyandotte-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/orgs/{org}/outside_collaborators": { + "get": { + "summary": "List outside collaborators", + "description": "List all users who are outside collaborators of an organization.\n\n", + "operationId": "orgs/list-outside-collaborators", + "tags": [ + "orgs" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/orgs/outside_collaborators/#list-outside-collaborators" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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" + } + }, + { + "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": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "example": [ + { + "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 + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/outside_collaborators" + }, + { + "lang": "JS", + "source": "octokit.orgs.listOutsideCollaborators({\n org: 'org'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.outside_collaborators(\n 'org'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/orgs/{org}/outside_collaborators/{username}": { + "delete": { + "summary": "Remove outside collaborator", + "description": "Removing a user from this list will remove them from all the organization's repositories.", + "operationId": "orgs/remove-outside-collaborator", + "tags": [ + "orgs" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/orgs/outside_collaborators/#remove-outside-collaborator" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + }, + "422": { + "description": "Response if user is a member of the organization", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + } + } + }, + "examples": { + "response-if-user-is-a-member-of-the-organization": { + "value": { + "message": "You cannot specify an organization member to remove as an outside collaborator.", + "documentation_url": "https://developer.github.com/v3/orgs/outside_collaborators/#remove-outside-collaborator" + } + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/outside_collaborators/USERNAME" + }, + { + "lang": "JS", + "source": "octokit.orgs.removeOutsideCollaborator({\n org: 'org',\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.remove_outside_collaborator(\n 'org',\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "put": { + "summary": "Convert member to outside collaborator", + "description": "When 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](https://help.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)\".", + "operationId": "orgs/convert-member-to-outside-collaborator", + "tags": [ + "orgs" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/orgs/outside_collaborators/#convert-member-to-outside-collaborator" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + }, + "403": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + } + } + }, + "examples": { + "response-if-user-is-the-last-owner-of-the-organization": { + "summary": "Response if user is the last owner of the organization", + "value": { + "message": "Cannot convert the last owner to an outside collaborator", + "documentation_url": "https://developer.github.com/v3/orgs/outside_collaborators/#convert-member-to-outside-collaborator" + } + }, + "response-if-user-is-not-a-member-of-the-organization": { + "summary": "Response if user is not a member of the organization", + "value": { + "message": " is not a member of the organization.", + "documentation_url": "https://developer.github.com/v3/orgs/outside_collaborators/#convert-member-to-outside-collaborator" + } + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/outside_collaborators/USERNAME" + }, + { + "lang": "JS", + "source": "octokit.orgs.convertMemberToOutsideCollaborator({\n org: 'org',\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.convert_member_to_outside_collaborator(\n 'org',\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/orgs/{org}/projects": { + "get": { + "summary": "List organization projects", + "description": "Lists 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\ns", + "operationId": "projects/list-for-org", + "tags": [ + "projects" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/projects/#list-organization-projects" + }, + "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 + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "state", + "description": "Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "open", + "closed", + "all" + ], + "default": "open" + } + }, + { + "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": { + "owner_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "columns_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + } + }, + "example": [ + { + "owner_url": "https://api.github.com/orgs/octocat", + "url": "https://api.github.com/projects/1002605", + "html_url": "https://github.com/orgs/api-playground/projects/1", + "columns_url": "https://api.github.com/projects/1002605/columns", + "id": 1002605, + "node_id": "MDc6UHJvamVjdDEwMDI2MDU=", + "name": "Organization Roadmap", + "body": "High-level roadmap for the upcoming year.", + "number": 1, + "state": "open", + "creator": { + "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 + }, + "created_at": "2011-04-11T20:09:31Z", + "updated_at": "2014-03-04T18:58:10Z" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/orgs/ORG/projects" + }, + { + "lang": "JS", + "source": "octokit.projects.listForOrg({\n org: 'org'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.for_org(\n 'org'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.inertia-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + }, + "post": { + "summary": "Create an organization project", + "description": "Creates 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.", + "operationId": "projects/create-for-org", + "tags": [ + "projects" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/projects/#create-an-organization-project" + }, + "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 + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "owner_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "columns_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + }, + "example": { + "owner_url": "https://api.github.com/orgs/octocat", + "url": "https://api.github.com/projects/1002605", + "html_url": "https://github.com/orgs/api-playground/projects/1", + "columns_url": "https://api.github.com/projects/1002605/columns", + "id": 1002605, + "node_id": "MDc6UHJvamVjdDEwMDI2MDU=", + "name": "Organization Roadmap", + "body": "High-level roadmap for the upcoming year.", + "number": 1, + "state": "open", + "creator": { + "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 + }, + "created_at": "2011-04-11T20:09:31Z", + "updated_at": "2014-03-04T18:58:10Z" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/orgs/ORG/projects \\\n -d '{\"name\":\"name\"}'" + }, + { + "lang": "JS", + "source": "octokit.projects.createForOrg({\n org: 'org',\n name: 'name'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_for_org(\n 'org',\n 'name'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.inertia-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the project." + }, + "body": { + "type": "string", + "description": "The description of the project." + } + }, + "required": [ + "name" + ] + }, + "example": { + "name": "Organization Roadmap", + "body": "High-level roadmap for the upcoming year." + } + } + } + } + } + }, + "/orgs/{org}/public_members": { + "get": { + "summary": "Public members list", + "description": "Members of an organization can choose to have their membership publicized or not.", + "operationId": "orgs/list-public-members", + "tags": [ + "orgs" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/orgs/members/#public-members-list" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "example": [ + { + "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 + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/public_members" + }, + { + "lang": "JS", + "source": "octokit.orgs.listPublicMembers({\n org: 'org'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.public_members(\n 'org'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/orgs/{org}/public_members/{username}": { + "get": { + "summary": "Check public membership", + "description": "", + "operationId": "orgs/check-public-membership", + "tags": [ + "orgs" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/orgs/members/#check-public-membership" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Response if user is a public member" + }, + "404": { + "description": "Response if user is not a public member" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/public_members/USERNAME" + }, + { + "lang": "JS", + "source": "octokit.orgs.checkPublicMembership({\n org: 'org',\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.check_public_membership(\n 'org',\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "put": { + "summary": "Publicize a user's membership", + "description": "The user can publicize their own membership. (A user cannot publicize the membership for another user.)\n\nNote that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP verbs](https://developer.github.com/v3/#http-verbs).\"", + "operationId": "orgs/publicize-membership", + "tags": [ + "orgs" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/orgs/members/#publicize-a-users-membership" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/public_members/USERNAME" + }, + { + "lang": "JS", + "source": "octokit.orgs.publicizeMembership({\n org: 'org',\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.publicize_membership(\n 'org',\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "delete": { + "summary": "Conceal a user's membership", + "description": "", + "operationId": "orgs/conceal-membership", + "tags": [ + "orgs" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/orgs/members/#conceal-a-users-membership" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/public_members/USERNAME" + }, + { + "lang": "JS", + "source": "octokit.orgs.concealMembership({\n org: 'org',\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.conceal_membership(\n 'org',\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/orgs/{org}/repos": { + "get": { + "summary": "List organization repositories", + "description": "Lists repositories for the specified organization.", + "operationId": "repos/list-for-org", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/#list-organization-repositories" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "type", + "description": "Specifies 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`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "all", + "public", + "private", + "forks", + "sources", + "member", + "internal" + ] + } + }, + { + "name": "sort", + "description": "Can be one of `created`, `updated`, `pushed`, `full_name`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "created", + "updated", + "pushed", + "full_name" + ], + "default": "created" + } + }, + { + "name": "direction", + "description": "Can be one of `asc` or `desc`. Default: when using `full_name`: `asc`, otherwise `desc`", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "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": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + }, + "license": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "spdx_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "node_id": { + "type": "string" + } + } + } + } + } + }, + "example": [ + { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "subscribers_count": 42, + "network_count": 0, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZW1pdA==" + } + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/repos" + }, + { + "lang": "JS", + "source": "octokit.repos.listForOrg({\n org: 'org'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.for_org(\n 'org'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "nebula", + "note": "You can set the visibility of a repository using the new `visibility` parameter in the [Repositories API](https://developer.github.com/v3/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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.nebula-preview+json\n\n```", + "required": false + }, + { + "name": "baptiste", + "note": "The `is_template` and `template_repository` keys are currently available for developer to preview. See [Create repository using a repository template](https://developer.github.com/v3/repos/#create-repository-using-a-repository-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](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.baptiste-preview+json\n\n```", + "required": false + } + ] + }, + "x-changes": [] + }, + "post": { + "summary": "Creates a new repository in the specified organization", + "description": "Creates a new repository for the authenticated user.\n\n**OAuth scope requirements**\n\nWhen using [OAuth](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include:\n\n* `public_repo` scope or `repo` scope to create a public repository\n* `repo` scope to create a private repository", + "operationId": "repos/create-in-org", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/#create" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + }, + "example": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/repos \\\n -d '{\"name\":\"name\"}'" + }, + { + "lang": "JS", + "source": "octokit.repos.createInOrg({\n org: 'org',\n name: 'name'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_in_org(\n 'org',\n 'name'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "nebula", + "note": "You can set the visibility of a repository using the new `visibility` parameter in the [Repositories API](https://developer.github.com/v3/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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.nebula-preview+json\n\n```", + "required": false + }, + { + "name": "baptiste", + "note": "The `is_template` and `template_repository` keys are currently available for developer to preview. See [Create repository using a repository template](https://developer.github.com/v3/repos/#create-repository-using-a-repository-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](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.baptiste-preview+json\n\n```", + "required": false + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the repository." + }, + "description": { + "type": "string", + "description": "A short description of the repository." + }, + "homepage": { + "type": "string", + "description": "A URL with more information about the repository." + }, + "private": { + "type": "boolean", + "description": "Either `true` to create a private repository or `false` to create a public one. Creating private repositories requires a paid GitHub account.", + "default": false + }, + "visibility": { + "type": "string", + "description": "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](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-repository-visibility#about-internal-repositories)\" in the GitHub Help documentation. \nThe `visibility` parameter overrides the `private` parameter when you use both parameters with the `nebula-preview` preview header.", + "enum": [ + "public", + "private", + "visibility", + "internal" + ] + }, + "has_issues": { + "type": "boolean", + "description": "Either `true` to enable issues for this repository or `false` to disable them.", + "default": true + }, + "has_projects": { + "type": "boolean", + "description": "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.", + "default": true + }, + "has_wiki": { + "type": "boolean", + "description": "Either `true` to enable the wiki for this repository or `false` to disable it.", + "default": true + }, + "is_template": { + "type": "boolean", + "description": "Either `true` to make this repo available as a template repository or `false` to prevent it.", + "default": false + }, + "team_id": { + "type": "integer", + "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." + }, + "auto_init": { + "type": "boolean", + "description": "Pass `true` to create an initial commit with empty README.", + "default": false + }, + "gitignore_template": { + "type": "string", + "description": "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\"." + }, + "license_template": { + "type": "string", + "description": "Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://help.github.com/articles/licensing-a-repository/#searching-github-by-license-type) as the `license_template` string. For example, \"mit\" or \"mpl-2.0\"." + }, + "allow_squash_merge": { + "type": "boolean", + "description": "Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging.", + "default": true + }, + "allow_merge_commit": { + "type": "boolean", + "description": "Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits.", + "default": true + }, + "allow_rebase_merge": { + "type": "boolean", + "description": "Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging.", + "default": true + }, + "delete_branch_on_merge": { + "type": "boolean", + "description": "Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion.", + "default": false + } + }, + "required": [ + "name" + ] + }, + "example": { + "name": "Hello-World", + "description": "This is your first repository", + "homepage": "https://github.com", + "private": false, + "has_issues": true, + "has_projects": true, + "has_wiki": true + } + } + } + } + } + }, + "/orgs/{org}/team-sync/groups": { + "get": { + "summary": "List IdP groups in an organization", + "description": "Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nList IdP groups available in an organization. You can limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see \"[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89).\"\n\nThe `per_page` parameter provides pagination for a list of IdP groups the authenticated user can access in an organization. For example, if the user `octocat` wants to see two groups per page in `octo-org` via cURL, it would look like this:", + "operationId": "teams/list-id-p-groups-for-org", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/team_sync/#list-idp-groups-in-an-organization" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": "object", + "properties": { + "groups": { + "type": "array", + "items": { + "type": "object", + "properties": { + "group_id": { + "type": "string" + }, + "group_name": { + "type": "string" + }, + "group_description": { + "type": "string" + } + }, + "required": [ + "group_id", + "group_name", + "group_description" + ] + } + } + } + }, + "example": { + "groups": [ + { + "group_id": "123", + "group_name": "Octocat admins", + "group_description": "The people who configure your octoworld." + }, + { + "group_id": "456", + "group_name": "Octocat docs members", + "group_description": "The people who make your octoworld come to life." + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/team-sync/groups" + }, + { + "lang": "JS", + "source": "octokit.teams.listIdPGroupsForOrg({\n org: 'org'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.id_p_groups_for_org(\n 'org'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": true, + "previews": [] + }, + "x-changes": [] + } + }, + "/orgs/{org}/teams": { + "get": { + "summary": "List teams", + "description": "Lists all teams in an organization that are visible to the authenticated user.", + "operationId": "teams/list", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/#list-teams" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "privacy": { + "type": "string" + }, + "permission": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + }, + "parent": { + "type": "string" + } + } + } + }, + "example": [ + { + "id": 1, + "node_id": "MDQ6VGVhbTE=", + "url": "https://api.github.com/teams/1", + "html_url": "https://api.github.com/teams/justice-league", + "name": "Justice League", + "slug": "justice-league", + "description": "A great team.", + "privacy": "closed", + "permission": "admin", + "members_url": "https://api.github.com/teams/1/members{/member}", + "repositories_url": "https://api.github.com/teams/1/repos", + "parent": null + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams" + }, + { + "lang": "JS", + "source": "octokit.teams.list({\n org: 'org'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.list(\n 'org'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "post": { + "summary": "Create team", + "description": "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](https://help.github.com/en/articles/setting-team-creation-permissions-in-your-organization).\"\n\nWhen 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](https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/about-teams)\" in the GitHub Help documentation.", + "operationId": "teams/create", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/#create-team" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "privacy": { + "type": "string" + }, + "permission": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + }, + "parent": { + "type": "string" + }, + "members_count": { + "type": "number" + }, + "repos_count": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "organization": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "public_members_url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "company": { + "type": "string" + }, + "blog": { + "type": "string" + }, + "location": { + "type": "string" + }, + "email": { + "type": "string" + }, + "is_verified": { + "type": "boolean" + }, + "has_organization_projects": { + "type": "boolean" + }, + "has_repository_projects": { + "type": "boolean" + }, + "public_repos": { + "type": "number" + }, + "public_gists": { + "type": "number" + }, + "followers": { + "type": "number" + }, + "following": { + "type": "number" + }, + "html_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "type": { + "type": "string" + } + } + } + } + }, + "example": { + "id": 1, + "node_id": "MDQ6VGVhbTE=", + "url": "https://api.github.com/teams/1", + "html_url": "https://api.github.com/teams/justice-league", + "name": "Justice League", + "slug": "justice-league", + "description": "A great team.", + "privacy": "closed", + "permission": "admin", + "members_url": "https://api.github.com/teams/1/members{/member}", + "repositories_url": "https://api.github.com/teams/1/repos", + "parent": null, + "members_count": 3, + "repos_count": 10, + "created_at": "2017-07-14T16:53:42Z", + "updated_at": "2017-08-17T12:37:15Z", + "organization": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization", + "name": "github", + "company": "GitHub", + "blog": "https://github.com/blog", + "location": "San Francisco", + "email": "octocat@github.com", + "is_verified": true, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 2, + "public_gists": 1, + "followers": 20, + "following": 0, + "html_url": "https://github.com/octocat", + "created_at": "2008-01-14T04:33:35Z", + "type": "Organization" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams \\\n -d '{\"name\":\"name\"}'" + }, + { + "lang": "JS", + "source": "octokit.teams.create({\n org: 'org',\n name: 'name'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create(\n 'org',\n 'name'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the team." + }, + "description": { + "type": "string", + "description": "The description of the team." + }, + "maintainers": { + "type": "array", + "description": "List GitHub IDs for organization members who will become team maintainers.", + "items": { + "type": "string" + } + }, + "repo_names": { + "type": "array", + "description": "The full name (e.g., \"organization-name/repository-name\") of repositories to add the team to.", + "items": { + "type": "string" + } + }, + "privacy": { + "type": "string", + "description": "The level of privacy this team should have. The options are: \n**For 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` \n**For a parent or child team:** \n\\* `closed` - visible to all members of this organization. \nDefault for child team: `closed`", + "enum": [ + "secret", + "closed" + ] + }, + "permission": { + "type": "string", + "description": "**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.", + "enum": [ + "pull", + "push", + "admin" + ], + "default": "pull" + }, + "parent_team_id": { + "type": "integer", + "description": "The ID of a team to set as the parent team." + } + }, + "required": [ + "name" + ] + }, + "example": { + "name": "Justice League", + "description": "A great team", + "permission": "admin", + "privacy": "closed" + } + } + } + } + } + }, + "/orgs/{org}/teams/{team_slug}": { + "get": { + "summary": "Get team by name", + "description": "Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id`.", + "operationId": "teams/get-by-name", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/#get-team-by-name" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_slug", + "description": "team_slug parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "privacy": { + "type": "string" + }, + "permission": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + }, + "parent": { + "type": "string" + }, + "members_count": { + "type": "number" + }, + "repos_count": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "organization": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "public_members_url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "company": { + "type": "string" + }, + "blog": { + "type": "string" + }, + "location": { + "type": "string" + }, + "email": { + "type": "string" + }, + "is_verified": { + "type": "boolean" + }, + "has_organization_projects": { + "type": "boolean" + }, + "has_repository_projects": { + "type": "boolean" + }, + "public_repos": { + "type": "number" + }, + "public_gists": { + "type": "number" + }, + "followers": { + "type": "number" + }, + "following": { + "type": "number" + }, + "html_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "type": { + "type": "string" + } + } + } + } + }, + "example": { + "id": 1, + "node_id": "MDQ6VGVhbTE=", + "url": "https://api.github.com/teams/1", + "html_url": "https://api.github.com/teams/justice-league", + "name": "Justice League", + "slug": "justice-league", + "description": "A great team.", + "privacy": "closed", + "permission": "admin", + "members_url": "https://api.github.com/teams/1/members{/member}", + "repositories_url": "https://api.github.com/teams/1/repos", + "parent": null, + "members_count": 3, + "repos_count": 10, + "created_at": "2017-07-14T16:53:42Z", + "updated_at": "2017-08-17T12:37:15Z", + "organization": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization", + "name": "github", + "company": "GitHub", + "blog": "https://github.com/blog", + "location": "San Francisco", + "email": "octocat@github.com", + "is_verified": true, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 2, + "public_gists": 1, + "followers": 20, + "following": 0, + "html_url": "https://github.com/octocat", + "created_at": "2008-01-14T04:33:35Z", + "type": "Organization" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG" + }, + { + "lang": "JS", + "source": "octokit.teams.getByName({\n org: 'org',\n team_slug: 'team_slug'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.by_name(\n 'org',\n 'team_slug'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "patch": { + "summary": "Edit team", + "description": "To edit a team, the authenticated user must either be an organization owner or a team maintainer.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/:org_id/team/:team_id`.", + "operationId": "teams/update-in-org", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/#edit-team" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_slug", + "description": "team_slug parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "privacy": { + "type": "string" + }, + "permission": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + }, + "parent": { + "type": "string" + }, + "members_count": { + "type": "number" + }, + "repos_count": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "organization": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "public_members_url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "company": { + "type": "string" + }, + "blog": { + "type": "string" + }, + "location": { + "type": "string" + }, + "email": { + "type": "string" + }, + "is_verified": { + "type": "boolean" + }, + "has_organization_projects": { + "type": "boolean" + }, + "has_repository_projects": { + "type": "boolean" + }, + "public_repos": { + "type": "number" + }, + "public_gists": { + "type": "number" + }, + "followers": { + "type": "number" + }, + "following": { + "type": "number" + }, + "html_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "type": { + "type": "string" + } + } + } + } + }, + "example": { + "id": 1, + "node_id": "MDQ6VGVhbTE=", + "url": "https://api.github.com/teams/1", + "html_url": "https://api.github.com/teams/justice-league", + "name": "Justice League", + "slug": "justice-league", + "description": "A great team.", + "privacy": "closed", + "permission": "admin", + "members_url": "https://api.github.com/teams/1/members{/member}", + "repositories_url": "https://api.github.com/teams/1/repos", + "parent": null, + "members_count": 3, + "repos_count": 10, + "created_at": "2017-07-14T16:53:42Z", + "updated_at": "2017-08-17T12:37:15Z", + "organization": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization", + "name": "github", + "company": "GitHub", + "blog": "https://github.com/blog", + "location": "San Francisco", + "email": "octocat@github.com", + "is_verified": true, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 2, + "public_gists": 1, + "followers": 20, + "following": 0, + "html_url": "https://github.com/octocat", + "created_at": "2008-01-14T04:33:35Z", + "type": "Organization" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG \\\n -d '{\"name\":\"name\"}'" + }, + { + "lang": "JS", + "source": "octokit.teams.updateInOrg({\n org: 'org',\n team_slug: 'team_slug',\n name: 'name'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.update_in_org(\n 'org',\n 'team_slug',\n 'name'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the team." + }, + "description": { + "type": "string", + "description": "The description of the team." + }, + "privacy": { + "type": "string", + "description": "The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. When a team is nested, the `privacy` for parent teams cannot be `secret`. The options are: \n**For 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. \n**For a parent or child team:** \n\\* `closed` - visible to all members of this organization.", + "enum": [ + "secret", + "closed" + ] + }, + "permission": { + "type": "string", + "description": "**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.", + "enum": [ + "pull", + "push", + "admin" + ], + "default": "pull" + }, + "parent_team_id": { + "type": "integer", + "description": "The ID of a team to set as the parent team." + } + }, + "required": [ + "name" + ] + }, + "example": { + "name": "new team name", + "description": "new team description", + "privacy": "closed" + } + } + } + } + }, + "delete": { + "summary": "Delete team", + "description": "To delete a team, the authenticated user must be an organization owner or team maintainer.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/:org_id/team/:team_id`.\n\nIf you are an organization owner, deleting a parent team will delete all of its child teams as well.", + "operationId": "teams/delete-in-org", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/#delete-team" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_slug", + "description": "team_slug parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG" + }, + { + "lang": "JS", + "source": "octokit.teams.deleteInOrg({\n org: 'org',\n team_slug: 'team_slug'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_in_org(\n 'org',\n 'team_slug'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/orgs/{org}/teams/{team_slug}/discussions": { + "get": { + "summary": "List discussions", + "description": "List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions`.", + "operationId": "teams/list-discussions-in-org", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/discussions/#list-discussions" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_slug", + "description": "team_slug parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "direction", + "description": "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`.", + "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": { + "type": "object", + "properties": { + "author": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "body": { + "type": "string" + }, + "body_html": { + "type": "string" + }, + "body_version": { + "type": "string" + }, + "comments_count": { + "type": "number" + }, + "comments_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "last_edited_at": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "number": { + "type": "number" + }, + "pinned": { + "type": "boolean" + }, + "private": { + "type": "boolean" + }, + "team_url": { + "type": "string" + }, + "title": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "url": { + "type": "string" + }, + "reactions": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "total_count": { + "type": "number" + }, + "+1": { + "type": "number" + }, + "-1": { + "type": "number" + }, + "laugh": { + "type": "number" + }, + "confused": { + "type": "number" + }, + "heart": { + "type": "number" + }, + "hooray": { + "type": "number" + } + } + } + } + } + }, + "example": [ + { + "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 + } + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions" + }, + { + "lang": "JS", + "source": "octokit.teams.listDiscussionsInOrg({\n org: 'org',\n team_slug: 'team_slug'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.discussions_in_org(\n 'org',\n 'team_slug'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "The [reactions API](https://developer.github.com/v3/reactions/) is available for developers to preview. The `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions. See the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To receive the `reactions` object in the response for this endpoint you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.squirrel-girl-preview\n\n```", + "required": false + } + ] + }, + "x-changes": [] + }, + "post": { + "summary": "Create a discussion", + "description": "Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).\n\nThis endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See \"[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)\" and \"[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)\" for details.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions`.", + "operationId": "teams/create-discussion-in-org", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/discussions/#create-a-discussion" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_slug", + "description": "team_slug parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "author": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "body": { + "type": "string" + }, + "body_html": { + "type": "string" + }, + "body_version": { + "type": "string" + }, + "comments_count": { + "type": "number" + }, + "comments_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "last_edited_at": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "number": { + "type": "number" + }, + "pinned": { + "type": "boolean" + }, + "private": { + "type": "boolean" + }, + "team_url": { + "type": "string" + }, + "title": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "url": { + "type": "string" + }, + "reactions": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "total_count": { + "type": "number" + }, + "+1": { + "type": "number" + }, + "-1": { + "type": "number" + }, + "laugh": { + "type": "number" + }, + "confused": { + "type": "number" + }, + "heart": { + "type": "number" + }, + "hooray": { + "type": "number" + } + } + } + } + }, + "example": { + "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 + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'" + }, + { + "lang": "JS", + "source": "octokit.teams.createDiscussionInOrg({\n org: 'org',\n team_slug: 'team_slug',\n title: 'title',\n body: 'body'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_discussion_in_org(\n 'org',\n 'team_slug',\n 'title',\n 'body'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "The [reactions API](https://developer.github.com/v3/reactions/) is available for developers to preview. The `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions. See the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To receive the `reactions` object in the response for this endpoint you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.squirrel-girl-preview\n\n```", + "required": false + } + ], + "triggersNotification": true + }, + "x-changes": [], + "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." + } + } + } + } + } + }, + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": { + "get": { + "summary": "Get a single discussion", + "description": "Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number`.", + "operationId": "teams/get-discussion-in-org", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/discussions/#get-a-single-discussion" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_slug", + "description": "team_slug parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "discussion_number", + "description": "discussion_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "author": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "body": { + "type": "string" + }, + "body_html": { + "type": "string" + }, + "body_version": { + "type": "string" + }, + "comments_count": { + "type": "number" + }, + "comments_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "last_edited_at": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "number": { + "type": "number" + }, + "pinned": { + "type": "boolean" + }, + "private": { + "type": "boolean" + }, + "team_url": { + "type": "string" + }, + "title": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "url": { + "type": "string" + }, + "reactions": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "total_count": { + "type": "number" + }, + "+1": { + "type": "number" + }, + "-1": { + "type": "number" + }, + "laugh": { + "type": "number" + }, + "confused": { + "type": "number" + }, + "heart": { + "type": "number" + }, + "hooray": { + "type": "number" + } + } + } + } + }, + "example": { + "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 + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42" + }, + { + "lang": "JS", + "source": "octokit.teams.getDiscussionInOrg({\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.discussion_in_org(\n 'org',\n 'team_slug',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "The [reactions API](https://developer.github.com/v3/reactions/) is available for developers to preview. The `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions. See the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To receive the `reactions` object in the response for this endpoint you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.squirrel-girl-preview\n\n```", + "required": false + } + ] + }, + "x-changes": [] + }, + "patch": { + "summary": "Edit 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://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/:org_id/team/:team_id/discussions/:discussion_number`.", + "operationId": "teams/update-discussion-in-org", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/discussions/#edit-a-discussion" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_slug", + "description": "team_slug parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "discussion_number", + "description": "discussion_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "author": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "body": { + "type": "string" + }, + "body_html": { + "type": "string" + }, + "body_version": { + "type": "string" + }, + "comments_count": { + "type": "number" + }, + "comments_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "last_edited_at": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "number": { + "type": "number" + }, + "pinned": { + "type": "boolean" + }, + "private": { + "type": "boolean" + }, + "team_url": { + "type": "string" + }, + "title": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "url": { + "type": "string" + }, + "reactions": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "total_count": { + "type": "number" + }, + "+1": { + "type": "number" + }, + "-1": { + "type": "number" + }, + "laugh": { + "type": "number" + }, + "confused": { + "type": "number" + }, + "heart": { + "type": "number" + }, + "hooray": { + "type": "number" + } + } + } + } + }, + "example": { + "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 + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42 \\\n -d '{\"title\":\"title\"}'" + }, + { + "lang": "JS", + "source": "octokit.teams.updateDiscussionInOrg({\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42,\n title: 'title'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.update_discussion_in_org(\n 'org',\n 'team_slug',\n 42,\n 'title'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "The [reactions API](https://developer.github.com/v3/reactions/) is available for developers to preview. The `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions. See the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To receive the `reactions` object in the response for this endpoint you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.squirrel-girl-preview\n\n```", + "required": false + } + ] + }, + "x-changes": [], + "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" + } + } + } + } + }, + "delete": { + "summary": "Delete a discussion", + "description": "Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number`.", + "operationId": "teams/delete-discussion-in-org", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/discussions/#delete-a-discussion" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_slug", + "description": "team_slug parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "discussion_number", + "description": "discussion_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42" + }, + { + "lang": "JS", + "source": "octokit.teams.deleteDiscussionInOrg({\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_discussion_in_org(\n 'org',\n 'team_slug',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": { + "get": { + "summary": "List comments", + "description": "List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments`.", + "operationId": "teams/list-discussion-comments-in-org", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/discussion_comments/#list-comments" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_slug", + "description": "team_slug parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "discussion_number", + "description": "discussion_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "direction", + "description": "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`.", + "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": { + "type": "object", + "properties": { + "author": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "body": { + "type": "string" + }, + "body_html": { + "type": "string" + }, + "body_version": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "last_edited_at": { + "type": "string" + }, + "discussion_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "number": { + "type": "number" + }, + "updated_at": { + "type": "string" + }, + "url": { + "type": "string" + }, + "reactions": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "total_count": { + "type": "number" + }, + "+1": { + "type": "number" + }, + "-1": { + "type": "number" + }, + "laugh": { + "type": "number" + }, + "confused": { + "type": "number" + }, + "heart": { + "type": "number" + }, + "hooray": { + "type": "number" + } + } + } + } + } + }, + "example": [ + { + "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 + } + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42/comments" + }, + { + "lang": "JS", + "source": "octokit.teams.listDiscussionCommentsInOrg({\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.discussion_comments_in_org(\n 'org',\n 'team_slug',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "The [reactions API](https://developer.github.com/v3/reactions/) is available for developers to preview. The `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions. See the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To receive the `reactions` object in the response for this endpoint you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.squirrel-girl-preview\n\n```", + "required": false + } + ] + }, + "x-changes": [] + }, + "post": { + "summary": "Create a comment", + "description": "Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).\n\nThis endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See \"[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)\" and \"[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)\" for details.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments`.", + "operationId": "teams/create-discussion-comment-in-org", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/discussion_comments/#create-a-comment" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_slug", + "description": "team_slug parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "discussion_number", + "description": "discussion_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "author": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "body": { + "type": "string" + }, + "body_html": { + "type": "string" + }, + "body_version": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "last_edited_at": { + "type": "string" + }, + "discussion_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "number": { + "type": "number" + }, + "updated_at": { + "type": "string" + }, + "url": { + "type": "string" + }, + "reactions": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "total_count": { + "type": "number" + }, + "+1": { + "type": "number" + }, + "-1": { + "type": "number" + }, + "laugh": { + "type": "number" + }, + "confused": { + "type": "number" + }, + "heart": { + "type": "number" + }, + "hooray": { + "type": "number" + } + } + } + } + }, + "example": { + "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 + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42/comments \\\n -d '{\"body\":\"body\"}'" + }, + { + "lang": "JS", + "source": "octokit.teams.createDiscussionCommentInOrg({\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42,\n body: 'body'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_discussion_comment_in_org(\n 'org',\n 'team_slug',\n 42,\n 'body'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "The [reactions API](https://developer.github.com/v3/reactions/) is available for developers to preview. The `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions. See the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To receive the `reactions` object in the response for this endpoint you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.squirrel-girl-preview\n\n```", + "required": false + } + ], + "triggersNotification": true + }, + "x-changes": [], + "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?" + } + } + } + } + } + }, + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": { + "get": { + "summary": "Get a single comment", + "description": "Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number`.", + "operationId": "teams/get-discussion-comment-in-org", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/discussion_comments/#get-a-single-comment" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_slug", + "description": "team_slug parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "discussion_number", + "description": "discussion_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "comment_number", + "description": "comment_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "author": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "body": { + "type": "string" + }, + "body_html": { + "type": "string" + }, + "body_version": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "last_edited_at": { + "type": "string" + }, + "discussion_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "number": { + "type": "number" + }, + "updated_at": { + "type": "string" + }, + "url": { + "type": "string" + }, + "reactions": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "total_count": { + "type": "number" + }, + "+1": { + "type": "number" + }, + "-1": { + "type": "number" + }, + "laugh": { + "type": "number" + }, + "confused": { + "type": "number" + }, + "heart": { + "type": "number" + }, + "hooray": { + "type": "number" + } + } + } + } + }, + "example": { + "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 + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42/comments/42" + }, + { + "lang": "JS", + "source": "octokit.teams.getDiscussionCommentInOrg({\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42,\n comment_number: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.discussion_comment_in_org(\n 'org',\n 'team_slug',\n 42,\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "The [reactions API](https://developer.github.com/v3/reactions/) is available for developers to preview. The `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions. See the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To receive the `reactions` object in the response for this endpoint you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.squirrel-girl-preview\n\n```", + "required": false + } + ] + }, + "x-changes": [] + }, + "patch": { + "summary": "Edit a comment", + "description": "Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number`.", + "operationId": "teams/update-discussion-comment-in-org", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/discussion_comments/#edit-a-comment" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_slug", + "description": "team_slug parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "discussion_number", + "description": "discussion_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "comment_number", + "description": "comment_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "author": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "body": { + "type": "string" + }, + "body_html": { + "type": "string" + }, + "body_version": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "last_edited_at": { + "type": "string" + }, + "discussion_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "number": { + "type": "number" + }, + "updated_at": { + "type": "string" + }, + "url": { + "type": "string" + }, + "reactions": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "total_count": { + "type": "number" + }, + "+1": { + "type": "number" + }, + "-1": { + "type": "number" + }, + "laugh": { + "type": "number" + }, + "confused": { + "type": "number" + }, + "heart": { + "type": "number" + }, + "hooray": { + "type": "number" + } + } + } + } + }, + "example": { + "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 + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42/comments/42 \\\n -d '{\"body\":\"body\"}'" + }, + { + "lang": "JS", + "source": "octokit.teams.updateDiscussionCommentInOrg({\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42,\n comment_number: 42,\n body: 'body'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.update_discussion_comment_in_org(\n 'org',\n 'team_slug',\n 42,\n 42,\n 'body'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "The [reactions API](https://developer.github.com/v3/reactions/) is available for developers to preview. The `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions. See the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To receive the `reactions` object in the response for this endpoint you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.squirrel-girl-preview\n\n```", + "required": false + } + ] + }, + "x-changes": [], + "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?" + } + } + } + } + }, + "delete": { + "summary": "Delete a comment", + "description": "Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number`.", + "operationId": "teams/delete-discussion-comment-in-org", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/discussion_comments/#delete-a-comment" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_slug", + "description": "team_slug parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "discussion_number", + "description": "discussion_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "comment_number", + "description": "comment_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42/comments/42" + }, + { + "lang": "JS", + "source": "octokit.teams.deleteDiscussionCommentInOrg({\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42,\n comment_number: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_discussion_comment_in_org(\n 'org',\n 'team_slug',\n 42,\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/orgs/{org}/teams/{team_slug}/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://developer.github.com/v3/teams/discussion_comments/). OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`.", + "operationId": "reactions/list-for-team-discussion-comment-in-org", + "tags": [ + "reactions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/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.squirrel-girl-preview+json" + }, + "required": true + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_slug", + "description": "team_slug parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "discussion_number", + "description": "discussion_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "comment_number", + "description": "comment_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "content", + "description": "Returns a single [reaction type](https://developer.github.com/v3/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": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "content": { + "type": "string" + }, + "created_at": { + "type": "string" + } + } + } + }, + "example": [ + { + "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" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42/comments/42/reactions" + }, + { + "lang": "JS", + "source": "octokit.reactions.listForTeamDiscussionCommentInOrg({\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42,\n comment_number: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.for_team_discussion_comment_in_org(\n 'org',\n 'team_slug',\n 42,\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "APIs for managing reactions are currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\n application/vnd.github.squirrel-girl-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + }, + "post": { + "summary": "Create reaction for a team discussion comment", + "description": "Create a reaction to a [team discussion comment](https://developer.github.com/v3/teams/discussion_comments/). OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with a `Status: 200 OK` means that you already added the reaction type to this team discussion comment.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`.", + "operationId": "reactions/create-for-team-discussion-comment-in-org", + "tags": [ + "reactions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/reactions/#create-reaction-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.squirrel-girl-preview+json" + }, + "required": true + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_slug", + "description": "team_slug parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "discussion_number", + "description": "discussion_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "comment_number", + "description": "comment_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "content": { + "type": "string" + }, + "created_at": { + "type": "string" + } + } + }, + "example": { + "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" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42/comments/42/reactions \\\n -d '{\"content\":\"content\"}'" + }, + { + "lang": "JS", + "source": "octokit.reactions.createForTeamDiscussionCommentInOrg({\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42,\n comment_number: 42,\n content: 'content'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_for_team_discussion_comment_in_org(\n 'org',\n 'team_slug',\n 42,\n 42,\n 'content'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "APIs for managing reactions are currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\n application/vnd.github.squirrel-girl-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the team discussion comment.", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ] + } + }, + "required": [ + "content" + ] + }, + "example": { + "content": "heart" + } + } + } + } + } + }, + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}": { + "delete": { + "summary": "Delete team discussion comment reaction", + "description": "**Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`.\n\nDelete a reaction to a [team discussion comment](https://developer.github.com/v3/teams/discussion_comments/). OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).", + "operationId": "reactions/delete-for-team-discussion-comment", + "tags": [ + "reactions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/reactions/#delete-team-discussion-comment-reaction" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.squirrel-girl-preview+json" + }, + "required": true + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_slug", + "description": "team_slug parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "discussion_number", + "description": "discussion_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "comment_number", + "description": "comment_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "reaction_id", + "description": "reaction_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42/comments/42/reactions/42" + }, + { + "lang": "JS", + "source": "octokit.reactions.deleteForTeamDiscussionComment({\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42,\n comment_number: 42,\n reaction_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_for_team_discussion_comment(\n 'org',\n 'team_slug',\n 42,\n 42,\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "APIs for managing reactions are currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\n application/vnd.github.squirrel-girl-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": { + "get": { + "summary": "List reactions for a team discussion", + "description": "List the reactions to a [team discussion](https://developer.github.com/v3/teams/discussions/). OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`.", + "operationId": "reactions/list-for-team-discussion-in-org", + "tags": [ + "reactions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/reactions/#list-reactions-for-a-team-discussion" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.squirrel-girl-preview+json" + }, + "required": true + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_slug", + "description": "team_slug parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "discussion_number", + "description": "discussion_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "content", + "description": "Returns a single [reaction type](https://developer.github.com/v3/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" + ] + } + }, + { + "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": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "content": { + "type": "string" + }, + "created_at": { + "type": "string" + } + } + } + }, + "example": [ + { + "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" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42/reactions" + }, + { + "lang": "JS", + "source": "octokit.reactions.listForTeamDiscussionInOrg({\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.for_team_discussion_in_org(\n 'org',\n 'team_slug',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "APIs for managing reactions are currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\n application/vnd.github.squirrel-girl-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + }, + "post": { + "summary": "Create reaction for a team discussion", + "description": "Create a reaction to a [team discussion](https://developer.github.com/v3/teams/discussions/). OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with a `Status: 200 OK` means that you already added the reaction type to this team discussion.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`.", + "operationId": "reactions/create-for-team-discussion-in-org", + "tags": [ + "reactions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/reactions/#create-reaction-for-a-team-discussion" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.squirrel-girl-preview+json" + }, + "required": true + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_slug", + "description": "team_slug parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "discussion_number", + "description": "discussion_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "content": { + "type": "string" + }, + "created_at": { + "type": "string" + } + } + }, + "example": { + "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" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42/reactions \\\n -d '{\"content\":\"content\"}'" + }, + { + "lang": "JS", + "source": "octokit.reactions.createForTeamDiscussionInOrg({\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42,\n content: 'content'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_for_team_discussion_in_org(\n 'org',\n 'team_slug',\n 42,\n 'content'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "APIs for managing reactions are currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\n application/vnd.github.squirrel-girl-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the team discussion.", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ] + } + }, + "required": [ + "content" + ] + }, + "example": { + "content": "heart" + } + } + } + } + } + }, + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}": { + "delete": { + "summary": "Delete team discussion reaction", + "description": "**Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`.\n\nDelete a reaction to a [team discussion](https://developer.github.com/v3/teams/discussions/). OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).", + "operationId": "reactions/delete-for-team-discussion", + "tags": [ + "reactions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/reactions/#delete-team-discussion-reaction" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.squirrel-girl-preview+json" + }, + "required": true + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_slug", + "description": "team_slug parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "discussion_number", + "description": "discussion_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "reaction_id", + "description": "reaction_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42/reactions/42" + }, + { + "lang": "JS", + "source": "octokit.reactions.deleteForTeamDiscussion({\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42,\n reaction_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_for_team_discussion(\n 'org',\n 'team_slug',\n 42,\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "APIs for managing reactions are currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\n application/vnd.github.squirrel-girl-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/orgs/{org}/teams/{team_slug}/invitations": { + "get": { + "summary": "List pending team invitations", + "description": "The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/invitations`.", + "operationId": "teams/list-pending-invitations-in-org", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/members/#list-pending-team-invitations" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_slug", + "description": "team_slug parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "id": { + "type": "number" + }, + "login": { + "type": "string" + }, + "email": { + "type": "string" + }, + "role": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "inviter": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "team_count": { + "type": "number" + }, + "invitation_team_url": { + "type": "string" + } + } + } + }, + "example": [ + { + "id": 1, + "login": "monalisa", + "email": "octocat@github.com", + "role": "direct_member", + "created_at": "2016-11-30T06:46:10-08:00", + "inviter": { + "login": "other_user", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/other_user_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/other_user", + "html_url": "https://github.com/other_user", + "followers_url": "https://api.github.com/users/other_user/followers", + "following_url": "https://api.github.com/users/other_user/following{/other_user}", + "gists_url": "https://api.github.com/users/other_user/gists{/gist_id}", + "starred_url": "https://api.github.com/users/other_user/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/other_user/subscriptions", + "organizations_url": "https://api.github.com/users/other_user/orgs", + "repos_url": "https://api.github.com/users/other_user/repos", + "events_url": "https://api.github.com/users/other_user/events{/privacy}", + "received_events_url": "https://api.github.com/users/other_user/received_events", + "type": "User", + "site_admin": false + }, + "team_count": 2, + "invitation_team_url": "https://api.github.com/organizations/2/invitations/1/teams" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/invitations" + }, + { + "lang": "JS", + "source": "octokit.teams.listPendingInvitationsInOrg({\n org: 'org',\n team_slug: 'team_slug'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.pending_invitations_in_org(\n 'org',\n 'team_slug'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/orgs/{org}/teams/{team_slug}/members": { + "get": { + "summary": "List team members", + "description": "Team members will include the members of child teams.\n\nTo list members in a team, the team must be visible to the authenticated user.", + "operationId": "teams/list-members-in-org", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/members/#list-team-members" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_slug", + "description": "team_slug parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "role", + "description": "Filters 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.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "member", + "maintainer", + "all" + ], + "default": "all" + } + }, + { + "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": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "example": [ + { + "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 + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/members" + }, + { + "lang": "JS", + "source": "octokit.teams.listMembersInOrg({\n org: 'org',\n team_slug: 'team_slug'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.members_in_org(\n 'org',\n 'team_slug'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/orgs/{org}/teams/{team_slug}/memberships/{username}": { + "get": { + "summary": "Get team membership", + "description": "Team members will include the members of child teams.\n\nTo get a user's membership with a team, the team must be visible to the authenticated user.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/memberships/:username`.\n\n**Note:** The `role` for organization owners returns as `maintainer`. For more information about `maintainer` roles, see [Create team](https://developer.github.com/v3/teams#create-team).", + "operationId": "teams/get-membership-in-org", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/members/#get-team-membership" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_slug", + "description": "team_slug parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "role": { + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "examples": { + "response-if-user-has-an-active-membership-with-team": { + "summary": "Response if user has an active membership with team", + "value": { + "url": "https://api.github.com/teams/1/memberships/octocat", + "role": "member", + "state": "active" + } + }, + "response-if-user-is-a-team-maintainer": { + "summary": "Response if user is a team maintainer", + "value": { + "url": "https://api.github.com/teams/1/memberships/octocat", + "role": "maintainer", + "state": "active" + } + }, + "response-if-user-has-a-pending-membership-with-team": { + "summary": "Response if user has a pending membership with team", + "value": { + "url": "https://api.github.com/teams/1/memberships/octocat", + "role": "member", + "state": "pending" + } + } + } + } + } + }, + "404": { + "description": "Response if user has no team membership" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/memberships/USERNAME" + }, + { + "lang": "JS", + "source": "octokit.teams.getMembershipInOrg({\n org: 'org',\n team_slug: 'team_slug',\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.membership_in_org(\n 'org',\n 'team_slug',\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "put": { + "summary": "Add or update team membership", + "description": "Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nAdds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team.\n\n**Note:** 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 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](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/).\"\n\nAn organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the \"pending\" state until the person 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.\n\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.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/:org_id/team/:team_id/memberships/:username`.", + "operationId": "teams/add-or-update-membership-in-org", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/members/#add-or-update-team-membership" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_slug", + "description": "team_slug parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "role": { + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "examples": { + "response-if-users-membership-with-team-is-now-active": { + "summary": "Response if user's membership with team is now active", + "value": { + "url": "https://api.github.com/teams/1/memberships/octocat", + "role": "member", + "state": "active" + } + }, + "response-if-users-membership-with-team-is-now-pending": { + "summary": "Response if user's membership with team is now pending", + "value": { + "url": "https://api.github.com/teams/1/memberships/octocat", + "role": "member", + "state": "pending" + } + } + } + } + } + }, + "403": { + "description": "Response if team synchronization is set up" + }, + "422": { + "description": "Response if you attempt to add an organization to a team", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "field": { + "type": "string" + }, + "resource": { + "type": "string" + } + } + } + } + } + }, + "examples": { + "response-if-you-attempt-to-add-an-organization-to-a-team": { + "value": { + "message": "Cannot add an organization as a member.", + "errors": [ + { + "code": "org", + "field": "user", + "resource": "TeamMember" + } + ] + } + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/memberships/USERNAME \\\n -d '{\"role\":\"role\"}'" + }, + { + "lang": "JS", + "source": "octokit.teams.addOrUpdateMembershipInOrg({\n org: 'org',\n team_slug: 'team_slug',\n username: 'username',\n role: 'role'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.add_or_update_membership_in_org(\n 'org',\n 'team_slug',\n 'username',\n 'role'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "role": { + "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.", + "enum": [ + "member", + "maintainer" + ], + "default": "member" + } + } + } + } + } + } + }, + "delete": { + "summary": "Remove team membership", + "description": "Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\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.\n\n**Note:** 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 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](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/).\"\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/:org_id/team/:team_id/memberships/:username`.", + "operationId": "teams/remove-membership-in-org", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/members/#remove-team-membership" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_slug", + "description": "team_slug parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + }, + "403": { + "description": "Response if team synchronization is set up" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/memberships/USERNAME" + }, + { + "lang": "JS", + "source": "octokit.teams.removeMembershipInOrg({\n org: 'org',\n team_slug: 'team_slug',\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.remove_membership_in_org(\n 'org',\n 'team_slug',\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/orgs/{org}/teams/{team_slug}/projects": { + "get": { + "summary": "List team projects", + "description": "Lists the organization projects for a team.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/projects`.", + "operationId": "teams/list-projects-in-org", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/#list-team-projects" + }, + "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 + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_slug", + "description": "team_slug parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "owner_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "columns_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "organization_permission": { + "type": "string" + }, + "private": { + "type": "boolean" + }, + "permissions": { + "type": "object", + "properties": { + "read": { + "type": "boolean" + }, + "write": { + "type": "boolean" + }, + "admin": { + "type": "boolean" + } + } + } + } + } + }, + "example": [ + { + "owner_url": "https://api.github.com/orgs/octocat", + "url": "https://api.github.com/projects/1002605", + "html_url": "https://github.com/orgs/api-playground/projects/1", + "columns_url": "https://api.github.com/projects/1002605/columns", + "id": 1002605, + "node_id": "MDc6UHJvamVjdDEwMDI2MDU=", + "name": "Organization Roadmap", + "body": "High-level roadmap for the upcoming year.", + "number": 1, + "state": "open", + "creator": { + "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 + }, + "created_at": "2011-04-11T20:09:31Z", + "updated_at": "2014-03-04T18:58:10Z", + "organization_permission": "write", + "private": false, + "permissions": { + "read": true, + "write": true, + "admin": false + } + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/projects" + }, + { + "lang": "JS", + "source": "octokit.teams.listProjectsInOrg({\n org: 'org',\n team_slug: 'team_slug'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.projects_in_org(\n 'org',\n 'team_slug'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.inertia-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/orgs/{org}/teams/{team_slug}/projects/{project_id}": { + "get": { + "summary": "Review a team project", + "description": "Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/projects/:project_id`.", + "operationId": "teams/review-project-in-org", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/#review-a-team-project" + }, + "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 + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_slug", + "description": "team_slug parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "project_id", + "description": "project_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "owner_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "columns_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "organization_permission": { + "type": "string" + }, + "private": { + "type": "boolean" + }, + "permissions": { + "type": "object", + "properties": { + "read": { + "type": "boolean" + }, + "write": { + "type": "boolean" + }, + "admin": { + "type": "boolean" + } + } + } + } + }, + "example": { + "owner_url": "https://api.github.com/orgs/octocat", + "url": "https://api.github.com/projects/1002605", + "html_url": "https://github.com/orgs/api-playground/projects/1", + "columns_url": "https://api.github.com/projects/1002605/columns", + "id": 1002605, + "node_id": "MDc6UHJvamVjdDEwMDI2MDU=", + "name": "Organization Roadmap", + "body": "High-level roadmap for the upcoming year.", + "number": 1, + "state": "open", + "creator": { + "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 + }, + "created_at": "2011-04-11T20:09:31Z", + "updated_at": "2014-03-04T18:58:10Z", + "organization_permission": "write", + "private": false, + "permissions": { + "read": true, + "write": true, + "admin": false + } + } + } + } + }, + "404": { + "description": "Response if project is not managed by this team" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/projects/42" + }, + { + "lang": "JS", + "source": "octokit.teams.reviewProjectInOrg({\n org: 'org',\n team_slug: 'team_slug',\n project_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.review_project_in_org(\n 'org',\n 'team_slug',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.inertia-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + }, + "put": { + "summary": "Add or update team project", + "description": "Adds 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.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/:org_id/team/:team_id/projects/:project_id`.", + "operationId": "teams/add-or-update-project-in-org", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/#add-or-update-team-project" + }, + "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 + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_slug", + "description": "team_slug parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "project_id", + "description": "project_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + }, + "403": { + "description": "Response if the project is not owned by the organization", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + } + } + }, + "examples": { + "response-if-the-project-is-not-owned-by-the-organization": { + "value": { + "message": "Must have admin rights to Repository.", + "documentation_url": "https://developer.github.com/v3/teams/#add-or-update-team-project" + } + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\n -H\"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/projects/42 \\\n -d '{\"permission\":\"permission\"}'" + }, + { + "lang": "JS", + "source": "octokit.teams.addOrUpdateProjectInOrg({\n org: 'org',\n team_slug: 'team_slug',\n project_id: 42,\n permission: 'permission'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.add_or_update_project_in_org(\n 'org',\n 'team_slug',\n 42,\n 'permission'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.inertia-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "permission": { + "type": "string", + "description": "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](https://developer.github.com/v3/#http-verbs).\"", + "enum": [ + "read", + "write", + "admin" + ] + } + } + } + } + } + } + }, + "delete": { + "summary": "Remove team project", + "description": "Removes 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. This endpoint removes the project from the team, but does not delete the project.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/:org_id/team/:team_id/projects/:project_id`.", + "operationId": "teams/remove-project-in-org", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/#remove-team-project" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_slug", + "description": "team_slug parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "project_id", + "description": "project_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/projects/42" + }, + { + "lang": "JS", + "source": "octokit.teams.removeProjectInOrg({\n org: 'org',\n team_slug: 'team_slug',\n project_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.remove_project_in_org(\n 'org',\n 'team_slug',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/orgs/{org}/teams/{team_slug}/repos": { + "get": { + "summary": "List team repos", + "description": "Lists a team's repositories visible to the authenticated user.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/repos`.", + "operationId": "teams/list-repos-in-org", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/#list-team-repos" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_slug", + "description": "team_slug parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + }, + "license": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "spdx_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "node_id": { + "type": "string" + } + } + } + } + } + }, + "example": [ + { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "subscribers_count": 42, + "network_count": 0, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZW1pdA==" + } + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/repos" + }, + { + "lang": "JS", + "source": "octokit.teams.listReposInOrg({\n org: 'org',\n team_slug: 'team_slug'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.repos_in_org(\n 'org',\n 'team_slug'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": { + "get": { + "summary": "Check if a team manages a repository", + "description": "Checks whether a team has `admin`, `push`, or `pull` permission for a repository. Repositories inherited through a parent team will also be checked.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/repos/:owner/:repo`.\n\nYou can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://developer.github.com/v3/media/) via the `Accept` header:", + "operationId": "teams/check-manages-repo-in-org", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/#check-if-a-team-manages-a-repository" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_slug", + "description": "team_slug parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Alternative response with repository permissions", + "content": { + "application/vnd.github.v3.repository+json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + }, + "examples": { + "alternative-response-with-repository-permissions": { + "summary": "Alternative response with repository permissions", + "value": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + } + } + } + } + }, + "204": { + "description": "Response if team has permission for the repository" + }, + "404": { + "description": "Response if team does not have permission for the repository" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/repos/octocat/hello-world" + }, + { + "lang": "JS", + "source": "octokit.teams.checkManagesRepoInOrg({\n org: 'org',\n team_slug: 'team_slug',\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.check_manages_repo_in_org(\n 'org',\n 'team_slug',\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "put": { + "summary": "Add or update team repository", + "description": "To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. 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](https://developer.github.com/v3/#http-verbs).\"\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/:org_id/team/:team_id/repos/:owner/:repo`.", + "operationId": "teams/add-or-update-repo-in-org", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/#add-or-update-team-repository" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_slug", + "description": "team_slug parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/repos/octocat/hello-world \\\n -d '{\"permission\":\"permission\"}'" + }, + { + "lang": "JS", + "source": "octokit.teams.addOrUpdateRepoInOrg({\n org: 'org',\n team_slug: 'team_slug',\n owner: 'octocat',\n repo: 'hello-world',\n permission: 'permission'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.add_or_update_repo_in_org(\n 'org',\n 'team_slug',\n 'hello-world',\n 'permission'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "permission": { + "type": "string", + "description": "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. \n \nIf no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository.", + "enum": [ + "pull", + "push", + "admin" + ] + } + } + } + } + } + } + }, + "delete": { + "summary": "Remove team repository", + "description": "If 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. This does not delete the repository, it just removes it from the team.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/:org_id/team/:team_id/repos/:owner/:repo`.", + "operationId": "teams/remove-repo-in-org", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/#remove-team-repository" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_slug", + "description": "team_slug parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/repos/octocat/hello-world" + }, + { + "lang": "JS", + "source": "octokit.teams.removeRepoInOrg({\n org: 'org',\n team_slug: 'team_slug',\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.remove_repo_in_org(\n 'org',\n 'team_slug',\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/orgs/{org}/teams/{team_slug}/team-sync/group-mappings": { + "get": { + "summary": "List IdP groups for a team", + "description": "Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nList IdP groups connected to a team on GitHub.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/team-sync/group-mappings`.", + "operationId": "teams/list-id-p-groups-in-org", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/team_sync/#list-idp-groups-for-a-team" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_slug", + "description": "team_slug parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "groups": { + "type": "array", + "items": { + "type": "object", + "properties": { + "group_id": { + "type": "string" + }, + "group_name": { + "type": "string" + }, + "group_description": { + "type": "string" + } + }, + "required": [ + "group_id", + "group_name", + "group_description" + ] + } + } + } + }, + "example": { + "groups": [ + { + "group_id": "123", + "group_name": "Octocat admins", + "group_description": "The people who configure your octoworld." + }, + { + "group_id": "456", + "group_name": "Octocat docs members", + "group_description": "The people who make your octoworld come to life." + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/team-sync/group-mappings" + }, + { + "lang": "JS", + "source": "octokit.teams.listIdPGroupsInOrg({\n org: 'org',\n team_slug: 'team_slug'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.id_p_groups_in_org(\n 'org',\n 'team_slug'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": true, + "previews": [] + }, + "x-changes": [] + }, + "patch": { + "summary": "Create or update IdP group connections", + "description": "Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nCreates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/:org_id/team/:team_id/team-sync/group-mappings`.", + "operationId": "teams/create-or-update-id-p-group-connections-in-org", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/team_sync/#create-or-update-idp-group-connections" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_slug", + "description": "team_slug parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "groups": { + "type": "object", + "properties": { + "group_id": { + "type": "string" + }, + "group_name": { + "type": "string" + }, + "group_description": { + "type": "string" + } + } + } + } + }, + "example": { + "groups": { + "group_id": "123", + "group_name": "Octocat admins", + "group_description": "The people who configure your octoworld." + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/team-sync/group-mappings \\\n -d '{\"groups\":[{\"group_id\":\"group_id\",\"group_name\":\"group_name\",\"group_description\":\"group_description\"}]}'" + }, + { + "lang": "JS", + "source": "octokit.teams.createOrUpdateIdPGroupConnectionsInOrg({\n org: 'org',\n team_slug: 'team_slug',\n groups: [\n {\n group_id: 'group_id',\n group_name: 'group_name',\n group_description: 'group_description'\n }\n ]\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_or_update_id_p_group_connections_in_org(\n 'org',\n 'team_slug',\n [\n {\n group_id: 'group_id',\n group_name: 'group_name',\n group_description: 'group_description'\n }\n ]\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": true, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "groups": { + "type": "array", + "description": "The IdP groups you want to connect to a GitHub team. When updating, the new `groups` object will replace the original one. You must include any existing groups that you don't want to remove.", + "items": { + "type": "object", + "properties": { + "group_id": { + "type": "string", + "description": "ID of the IdP group." + }, + "group_name": { + "type": "string", + "description": "Name of the IdP group." + }, + "group_description": { + "type": "string", + "description": "Description of the IdP group." + } + }, + "required": [ + "group_id", + "group_name", + "group_description" + ] + } + } + }, + "required": [ + "groups" + ] + }, + "example": { + "groups": [ + { + "group_id": "123", + "group_name": "Octocat admins", + "description": "The people who configure your octoworld." + } + ] + } + } + } + } + } + }, + "/orgs/{org}/teams/{team_slug}/teams": { + "get": { + "summary": "List child teams", + "description": "Lists the child teams of the team requested by `:team_slug`.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/teams`.\n\n", + "operationId": "teams/list-child-in-org", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/#list-child-teams" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_slug", + "description": "team_slug parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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 if child teams exist", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "privacy": { + "type": "string" + }, + "permission": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + }, + "parent": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "privacy": { + "type": "string" + }, + "permission": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + } + } + } + } + } + }, + "examples": { + "response-if-child-teams-exist": { + "value": [ + { + "id": 2, + "node_id": "MDQ6VGVhbTI=", + "url": "https://api.github.com/teams/2", + "name": "Original Roster", + "slug": "original-roster", + "description": "Started it all.", + "privacy": "closed", + "permission": "admin", + "members_url": "https://api.github.com/teams/2/members{/member}", + "repositories_url": "https://api.github.com/teams/2/repos", + "parent": { + "id": 1, + "node_id": "MDQ6VGVhbTE=", + "url": "https://api.github.com/teams/1", + "html_url": "https://api.github.com/teams/justice-league", + "name": "Justice League", + "slug": "justice-league", + "description": "A great team.", + "privacy": "closed", + "permission": "admin", + "members_url": "https://api.github.com/teams/1/members{/member}", + "repositories_url": "https://api.github.com/teams/1/repos" + } + } + ] + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/teams" + }, + { + "lang": "JS", + "source": "octokit.teams.listChildInOrg({\n org: 'org',\n team_slug: 'team_slug'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.child_in_org(\n 'org',\n 'team_slug'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/projects/columns/cards/{card_id}": { + "get": { + "summary": "Get a project card", + "description": "", + "operationId": "projects/get-card", + "tags": [ + "projects" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/projects/cards/#get-a-project-card" + }, + "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 + }, + { + "name": "card_id", + "description": "card_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/vnd.github.inertia-preview+json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "note": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "archived": { + "type": "boolean" + }, + "column_url": { + "type": "string" + }, + "content_url": { + "type": "string" + }, + "project_url": { + "type": "string" + } + } + }, + "example": { + "url": "https://api.github.com/projects/columns/cards/1478", + "id": 1478, + "node_id": "MDExOlByb2plY3RDYXJkMTQ3OA==", + "note": "Add payload for delete Project column", + "creator": { + "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 + }, + "created_at": "2016-09-05T14:21:06Z", + "updated_at": "2016-09-05T14:20:22Z", + "archived": false, + "column_url": "https://api.github.com/projects/columns/367", + "content_url": "https://api.github.com/repos/api-playground/projects-test/issues/3", + "project_url": "https://api.github.com/projects/120" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/columns/cards/42" + }, + { + "lang": "JS", + "source": "octokit.projects.getCard({\n card_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.card(\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.inertia-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + }, + "patch": { + "summary": "Update a project card", + "description": "", + "operationId": "projects/update-card", + "tags": [ + "projects" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/projects/cards/#update-a-project-card" + }, + "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 + }, + { + "name": "card_id", + "description": "card_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/vnd.github.inertia-preview+json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "note": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "archived": { + "type": "boolean" + }, + "column_url": { + "type": "string" + }, + "content_url": { + "type": "string" + }, + "project_url": { + "type": "string" + } + } + }, + "example": { + "url": "https://api.github.com/projects/columns/cards/1478", + "id": 1478, + "node_id": "MDExOlByb2plY3RDYXJkMTQ3OA==", + "note": "Add payload for delete Project column", + "creator": { + "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 + }, + "created_at": "2016-09-05T14:21:06Z", + "updated_at": "2016-09-05T14:20:22Z", + "archived": false, + "column_url": "https://api.github.com/projects/columns/367", + "content_url": "https://api.github.com/repos/api-playground/projects-test/issues/3", + "project_url": "https://api.github.com/projects/120" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\n -H\"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/columns/cards/42 \\\n -d '{\"note\":\"note\"}'" + }, + { + "lang": "JS", + "source": "octokit.projects.updateCard({\n card_id: 42,\n note: 'note'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.update_card(\n 42,\n 'note'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.inertia-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "note": { + "type": "string", + "description": "The card's note content. Only valid for cards without another type of content, so this cannot be specified if the card already has a `content_id` and `content_type`." + }, + "archived": { + "type": "boolean", + "description": "Use `true` to archive a project card. Specify `false` if you need to restore a previously archived project card." + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete a project card", + "description": "", + "operationId": "projects/delete-card", + "tags": [ + "projects" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/projects/cards/#delete-a-project-card" + }, + "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 + }, + { + "name": "card_id", + "description": "card_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/columns/cards/42" + }, + { + "lang": "JS", + "source": "octokit.projects.deleteCard({\n card_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_card(\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.inertia-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/projects/columns/cards/{card_id}/moves": { + "post": { + "summary": "Move a project card", + "description": "", + "operationId": "projects/move-card", + "tags": [ + "projects" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/projects/cards/#move-a-project-card" + }, + "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 + }, + { + "name": "card_id", + "description": "card_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "201": { + "description": "response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/columns/cards/42/moves \\\n -d '{\"position\":\"position\"}'" + }, + { + "lang": "JS", + "source": "octokit.projects.moveCard({\n card_id: 42,\n position: 'position'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.move_card(\n 42,\n 'position'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.inertia-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "position": { + "type": "string", + "description": "Can be one of `top`, `bottom`, or `after:`, where `` is the `id` value of a card in the same column, or in the new column specified by `column_id`.", + "pattern": "^(top|bottom|after:\\d+)$" + }, + "column_id": { + "type": "integer", + "description": "The `id` value of a column in the same project." + } + }, + "required": [ + "position" + ] + }, + "example": { + "position": "after:3", + "column_id": 5 + } + } + } + } + } + }, + "/projects/columns/{column_id}": { + "get": { + "summary": "Get a project column", + "description": "", + "operationId": "projects/get-column", + "tags": [ + "projects" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/projects/columns/#get-a-project-column" + }, + "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 + }, + { + "name": "column_id", + "description": "column_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/vnd.github.inertia-preview+json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "project_url": { + "type": "string" + }, + "cards_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + }, + "example": { + "url": "https://api.github.com/projects/columns/367", + "project_url": "https://api.github.com/projects/120", + "cards_url": "https://api.github.com/projects/columns/367/cards", + "id": 367, + "node_id": "MDEzOlByb2plY3RDb2x1bW4zNjc=", + "name": "To Do", + "created_at": "2016-09-05T14:18:44Z", + "updated_at": "2016-09-05T14:22:28Z" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/columns/42" + }, + { + "lang": "JS", + "source": "octokit.projects.getColumn({\n column_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.column(\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.inertia-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + }, + "patch": { + "summary": "Update a project column", + "description": "", + "operationId": "projects/update-column", + "tags": [ + "projects" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/projects/columns/#update-a-project-column" + }, + "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 + }, + { + "name": "column_id", + "description": "column_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/vnd.github.inertia-preview+json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "project_url": { + "type": "string" + }, + "cards_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + }, + "example": { + "url": "https://api.github.com/projects/columns/367", + "project_url": "https://api.github.com/projects/120", + "cards_url": "https://api.github.com/projects/columns/367/cards", + "id": 367, + "node_id": "MDEzOlByb2plY3RDb2x1bW4zNjc=", + "name": "To Do", + "created_at": "2016-09-05T14:18:44Z", + "updated_at": "2016-09-05T14:22:28Z" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\n -H\"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/columns/42 \\\n -d '{\"name\":\"name\"}'" + }, + { + "lang": "JS", + "source": "octokit.projects.updateColumn({\n column_id: 42,\n name: 'name'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.update_column(\n 42,\n 'name'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.inertia-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The new name of the column." + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete a project column", + "description": "", + "operationId": "projects/delete-column", + "tags": [ + "projects" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/projects/columns/#delete-a-project-column" + }, + "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 + }, + { + "name": "column_id", + "description": "column_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/columns/42" + }, + { + "lang": "JS", + "source": "octokit.projects.deleteColumn({\n column_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_column(\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.inertia-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/projects/columns/{column_id}/cards": { + "get": { + "summary": "List project cards", + "description": "", + "operationId": "projects/list-cards", + "tags": [ + "projects" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/projects/cards/#list-project-cards" + }, + "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 + }, + { + "name": "column_id", + "description": "column_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "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" + } + }, + { + "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": { + "url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "note": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "archived": { + "type": "boolean" + }, + "column_url": { + "type": "string" + }, + "content_url": { + "type": "string" + }, + "project_url": { + "type": "string" + } + } + } + }, + "example": [ + { + "url": "https://api.github.com/projects/columns/cards/1478", + "id": 1478, + "node_id": "MDExOlByb2plY3RDYXJkMTQ3OA==", + "note": "Add payload for delete Project column", + "creator": { + "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 + }, + "created_at": "2016-09-05T14:21:06Z", + "updated_at": "2016-09-05T14:20:22Z", + "archived": false, + "column_url": "https://api.github.com/projects/columns/367", + "content_url": "https://api.github.com/repos/api-playground/projects-test/issues/3", + "project_url": "https://api.github.com/projects/120" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/columns/42/cards" + }, + { + "lang": "JS", + "source": "octokit.projects.listCards({\n column_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.cards(\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.inertia-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + }, + "post": { + "summary": "Create a project card", + "description": "**Note**: 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.\n\nBe 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](https://developer.github.com/v3/pulls/#list-pull-requests)\" endpoint.", + "operationId": "projects/create-card", + "tags": [ + "projects" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/projects/cards/#create-a-project-card" + }, + "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 + }, + { + "name": "column_id", + "description": "column_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "note": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "archived": { + "type": "boolean" + }, + "column_url": { + "type": "string" + }, + "content_url": { + "type": "string" + }, + "project_url": { + "type": "string" + } + } + }, + "example": { + "url": "https://api.github.com/projects/columns/cards/1478", + "id": 1478, + "node_id": "MDExOlByb2plY3RDYXJkMTQ3OA==", + "note": "Add payload for delete Project column", + "creator": { + "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 + }, + "created_at": "2016-09-05T14:21:06Z", + "updated_at": "2016-09-05T14:20:22Z", + "archived": false, + "column_url": "https://api.github.com/projects/columns/367", + "content_url": "https://api.github.com/repos/api-playground/projects-test/issues/3", + "project_url": "https://api.github.com/projects/120" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/columns/42/cards \\\n -d '{\"note\":\"note\"}'" + }, + { + "lang": "JS", + "source": "octokit.projects.createCard({\n column_id: 42,\n note: 'note'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_card(\n 42,\n 'note'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.inertia-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "note": { + "type": "string", + "description": "The card's note content. Only valid for cards without another type of content, so you must omit when specifying `content_id` and `content_type`." + }, + "content_id": { + "type": "integer", + "description": "The issue or pull request id you want to associate with this card. You can use the [List issues for a repository](https://developer.github.com/v3/issues/#list-issues-for-a-repository) and [List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests) endpoints to find this id. \n**Note:** Depending on whether you use the issue id or pull request id, you will need to specify `Issue` or `PullRequest` as the `content_type`." + }, + "content_type": { + "type": "string", + "description": "**Required if you provide `content_id`**. The type of content you want to associate with this card. Use `Issue` when `content_id` is an issue id and use `PullRequest` when `content_id` is a pull request id." + } + } + } + } + } + } + } + }, + "/projects/columns/{column_id}/moves": { + "post": { + "summary": "Move a project column", + "description": "", + "operationId": "projects/move-column", + "tags": [ + "projects" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/projects/columns/#move-a-project-column" + }, + "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 + }, + { + "name": "column_id", + "description": "column_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "201": { + "description": "response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/columns/42/moves \\\n -d '{\"position\":\"position\"}'" + }, + { + "lang": "JS", + "source": "octokit.projects.moveColumn({\n column_id: 42,\n position: 'position'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.move_column(\n 42,\n 'position'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.inertia-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "position": { + "type": "string", + "description": "Can be one of `first`, `last`, or `after:`, where `` is the `id` value of a column in the same project.", + "pattern": "^(first|last|after:\\d+)$" + } + }, + "required": [ + "position" + ] + }, + "example": { + "position": "after:3" + } + } + } + } + } + }, + "/projects/{project_id}": { + "get": { + "summary": "Get a project", + "description": "Gets 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.", + "operationId": "projects/get", + "tags": [ + "projects" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/projects/#get-a-project" + }, + "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 + }, + { + "name": "project_id", + "description": "project_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "owner_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "columns_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + }, + "example": { + "owner_url": "https://api.github.com/repos/api-playground/projects-test", + "url": "https://api.github.com/projects/1002604", + "html_url": "https://github.com/api-playground/projects-test/projects/1", + "columns_url": "https://api.github.com/projects/1002604/columns", + "id": 1002604, + "node_id": "MDc6UHJvamVjdDEwMDI2MDQ=", + "name": "Projects Documentation", + "body": "Developer documentation project for the developer site.", + "number": 1, + "state": "open", + "creator": { + "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 + }, + "created_at": "2011-04-10T20:09:31Z", + "updated_at": "2014-03-03T18:58:10Z" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/42" + }, + { + "lang": "JS", + "source": "octokit.projects.get({\n project_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.get(\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.inertia-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + }, + "patch": { + "summary": "Update a project", + "description": "Updates 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.", + "operationId": "projects/update", + "tags": [ + "projects" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/projects/#update-a-project" + }, + "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 + }, + { + "name": "project_id", + "description": "project_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "owner_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "columns_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + }, + "example": { + "owner_url": "https://api.github.com/repos/api-playground/projects-test", + "url": "https://api.github.com/projects/1002604", + "html_url": "https://github.com/api-playground/projects-test/projects/1", + "columns_url": "https://api.github.com/projects/1002604/columns", + "id": 1002604, + "node_id": "MDc6UHJvamVjdDEwMDI2MDQ=", + "name": "Projects Documentation", + "body": "Developer documentation project for the developer site.", + "number": 1, + "state": "open", + "creator": { + "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 + }, + "created_at": "2011-04-10T20:09:31Z", + "updated_at": "2014-03-03T18:58:10Z" + } + } + } + }, + "404": { + "description": "Response if the authenticated user does not have access to the project" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\n -H\"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/42 \\\n -d '{\"name\":\"name\"}'" + }, + { + "lang": "JS", + "source": "octokit.projects.update({\n project_id: 42,\n name: 'name'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.update(\n 42,\n 'name'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.inertia-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the project." + }, + "body": { + "type": "string", + "description": "The description of the project." + }, + "state": { + "type": "string", + "description": "State of the project. Either `open` or `closed`.", + "enum": [ + "open", + "closed" + ] + }, + "organization_permission": { + "type": "string", + "description": "The permission level that determines whether all members of the project's organization can see and/or make changes to the project. Setting `organization_permission` is only available for organization projects. If an organization member belongs to a team with a higher level of access or is a collaborator with a higher level of access, their permission level is not lowered by `organization_permission`. For information on changing access for a team or collaborator, see [Add or update team project](https://developer.github.com/v3/teams/#add-or-update-team-project) or [Add user as a collaborator](https://developer.github.com/v3/projects/collaborators/#add-user-as-a-collaborator). \n \n**Note:** Updating a project's `organization_permission` requires `admin` access to the project. \n \nCan be one of: \n\\* `read` - Organization members can read, but not write to or administer this project. \n\\* `write` - Organization members can read and write, but not administer this project. \n\\* `admin` - Organization members can read, write and administer this project. \n\\* `none` - Organization members can only see this project if it is public." + }, + "private": { + "type": "boolean", + "description": "Sets the visibility of a project board. Setting `private` is only available for organization and user projects. **Note:** Updating a project's visibility requires `admin` access to the project. \n \nCan be one of: \n\\* `false` - Anyone can see the project. \n\\* `true` - Only the user can view a project board created on a user account. Organization members with the appropriate `organization_permission` can see project boards in an organization account." + } + } + }, + "example": { + "name": "Outcomes Tracker", + "body": "The board to track work for the Outcomes application." + } + } + } + } + }, + "delete": { + "summary": "Delete a project", + "description": "Deletes a project board. Returns a `404 Not Found` status if projects are disabled.", + "operationId": "projects/delete", + "tags": [ + "projects" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/projects/#delete-a-project" + }, + "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 + }, + { + "name": "project_id", + "description": "project_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "418": { + "description": "Response definition missing" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/42" + }, + { + "lang": "JS", + "source": "octokit.projects.delete({\n project_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete(\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.inertia-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/projects/{project_id}/collaborators": { + "get": { + "summary": "List collaborators", + "description": "Lists 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.", + "operationId": "projects/list-collaborators", + "tags": [ + "projects" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/projects/collaborators/#list-collaborators" + }, + "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 + }, + { + "name": "project_id", + "description": "project_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "affiliation", + "description": "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.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "outside", + "direct", + "all" + ], + "default": "all" + } + }, + { + "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": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "example": [ + { + "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 + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/42/collaborators" + }, + { + "lang": "JS", + "source": "octokit.projects.listCollaborators({\n project_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.collaborators(\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.inertia-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/projects/{project_id}/collaborators/{username}": { + "put": { + "summary": "Add user as a collaborator", + "description": "Adds a collaborator to a an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator.", + "operationId": "projects/add-collaborator", + "tags": [ + "projects" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/projects/collaborators/#add-user-as-a-collaborator" + }, + "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 + }, + { + "name": "project_id", + "description": "project_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\n -H\"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/42/collaborators/USERNAME \\\n -d '{\"permission\":\"permission\"}'" + }, + { + "lang": "JS", + "source": "octokit.projects.addCollaborator({\n project_id: 42,\n username: 'username',\n permission: 'permission'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.add_collaborator(\n 42,\n 'username',\n 'permission'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.inertia-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "permission": { + "type": "string", + "description": "The permission to grant the collaborator. 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](https://developer.github.com/v3/#http-verbs).\" Can be one of: \n\\* `read` - can read, but not write to or administer this project. \n\\* `write` - can read and write, but not administer this project. \n\\* `admin` - can read, write and administer this project.", + "enum": [ + "read", + "write", + "admin" + ], + "default": "write" + } + } + } + } + } + } + }, + "delete": { + "summary": "Remove user as a collaborator", + "description": "Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator.", + "operationId": "projects/remove-collaborator", + "tags": [ + "projects" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/projects/collaborators/#remove-user-as-a-collaborator" + }, + "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 + }, + { + "name": "project_id", + "description": "project_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/42/collaborators/USERNAME" + }, + { + "lang": "JS", + "source": "octokit.projects.removeCollaborator({\n project_id: 42,\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.remove_collaborator(\n 42,\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.inertia-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/projects/{project_id}/collaborators/{username}/permission": { + "get": { + "summary": "Review a user's permission level", + "description": "Returns 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.", + "operationId": "projects/review-user-permission-level", + "tags": [ + "projects" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/projects/collaborators/#review-a-users-permission-level" + }, + "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 + }, + { + "name": "project_id", + "description": "project_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "permission": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + } + }, + "example": { + "permission": "admin", + "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 + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/42/collaborators/USERNAME/permission" + }, + { + "lang": "JS", + "source": "octokit.projects.reviewUserPermissionLevel({\n project_id: 42,\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.review_user_permission_level(\n 42,\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.inertia-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/projects/{project_id}/columns": { + "get": { + "summary": "List project columns", + "description": "", + "operationId": "projects/list-columns", + "tags": [ + "projects" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/projects/columns/#list-project-columns" + }, + "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 + }, + { + "name": "project_id", + "description": "project_id parameter", + "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": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "project_url": { + "type": "string" + }, + "cards_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + } + }, + "example": [ + { + "url": "https://api.github.com/projects/columns/367", + "project_url": "https://api.github.com/projects/120", + "cards_url": "https://api.github.com/projects/columns/367/cards", + "id": 367, + "node_id": "MDEzOlByb2plY3RDb2x1bW4zNjc=", + "name": "To Do", + "created_at": "2016-09-05T14:18:44Z", + "updated_at": "2016-09-05T14:22:28Z" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/42/columns" + }, + { + "lang": "JS", + "source": "octokit.projects.listColumns({\n project_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.columns(\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.inertia-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + }, + "post": { + "summary": "Create a project column", + "description": "", + "operationId": "projects/create-column", + "tags": [ + "projects" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/projects/columns/#create-a-project-column" + }, + "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 + }, + { + "name": "project_id", + "description": "project_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/vnd.github.inertia-preview+json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "project_url": { + "type": "string" + }, + "cards_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + }, + "example": { + "url": "https://api.github.com/projects/columns/367", + "project_url": "https://api.github.com/projects/120", + "cards_url": "https://api.github.com/projects/columns/367/cards", + "id": 367, + "node_id": "MDEzOlByb2plY3RDb2x1bW4zNjc=", + "name": "To Do", + "created_at": "2016-09-05T14:18:44Z", + "updated_at": "2016-09-05T14:22:28Z" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/42/columns \\\n -d '{\"name\":\"name\"}'" + }, + { + "lang": "JS", + "source": "octokit.projects.createColumn({\n project_id: 42,\n name: 'name'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_column(\n 42,\n 'name'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.inertia-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the column." + } + }, + "required": [ + "name" + ] + } + } + } + } + } + }, + "/rate_limit": { + "get": { + "summary": "Get your current rate limit status", + "description": "**Note:** Accessing this endpoint does not count against your REST API rate limit.\n\n**Understanding your rate limit status**\n\nThe Search API has a [custom rate limit](https://developer.github.com/v3/search/#rate-limit), separate from the rate limit governing the rest of the REST API. The GraphQL API also has a [custom rate limit](https://developer.github.com/v4/guides/resource-limitations/#rate-limit) that is separate from and calculated differently than rate limits in the REST API.\n\nFor these reasons, the Rate Limit API response categorizes your rate limit. Under `resources`, you'll see four objects:\n\n* The `core` object provides your rate limit status for all non-search-related resources in the REST API.\n* The `search` object provides your rate limit status for the [Search API](https://developer.github.com/v3/search/).\n* The `graphql` object provides your rate limit status for the [GraphQL API](https://developer.github.com/v4/).\n* The `integration_manifest` object provides your rate limit status for the [GitHub App Manifest code conversion](https://developer.github.com/apps/building-github-apps/creating-github-apps-from-a-manifest/#3-you-exchange-the-temporary-code-to-retrieve-the-app-configuration) endpoint.\n\nFor more information on the headers and values in the rate limit response, see \"[Rate limiting](https://developer.github.com/v3/#rate-limiting).\"\n\nThe `rate` object (shown at the bottom of the response above) is deprecated.\n\nIf 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.", + "operationId": "rate-limit/get", + "tags": [ + "rate-limit" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/rate_limit/#get-your-current-rate-limit-status" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "resources": { + "type": "object", + "properties": { + "core": { + "type": "object", + "properties": { + "limit": { + "type": "number" + }, + "remaining": { + "type": "number" + }, + "reset": { + "type": "number" + } + } + }, + "search": { + "type": "object", + "properties": { + "limit": { + "type": "number" + }, + "remaining": { + "type": "number" + }, + "reset": { + "type": "number" + } + } + }, + "graphql": { + "type": "object", + "properties": { + "limit": { + "type": "number" + }, + "remaining": { + "type": "number" + }, + "reset": { + "type": "number" + } + } + }, + "integration_manifest": { + "type": "object", + "properties": { + "limit": { + "type": "number" + }, + "remaining": { + "type": "number" + }, + "reset": { + "type": "number" + } + } + } + } + }, + "rate": { + "type": "object", + "properties": { + "limit": { + "type": "number" + }, + "remaining": { + "type": "number" + }, + "reset": { + "type": "number" + } + }, + "deprecated": true + } + } + }, + "example": { + "resources": { + "core": { + "limit": 5000, + "remaining": 4999, + "reset": 1372700873 + }, + "search": { + "limit": 30, + "remaining": 18, + "reset": 1372697452 + }, + "graphql": { + "limit": 5000, + "remaining": 4993, + "reset": 1372700389 + }, + "integration_manifest": { + "limit": 5000, + "remaining": 4999, + "reset": 1551806725 + } + }, + "rate": { + "limit": 5000, + "remaining": 4999, + "reset": 1372700873 + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/rate_limit" + }, + { + "lang": "JS", + "source": "octokit.rateLimit.get()" + }, + { + "lang": "Ruby", + "source": "octokit.get()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/reactions/{reaction_id}": { + "delete": { + "summary": "Delete a reaction (Legacy)", + "description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Reactions API. We recommend migrating your existing code to use the new delete reactions endpoints. For more information, see this [blog post](https://developer.github.com/changes/2020-02-26-new-delete-reactions-endpoints/).\n\nOAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), when deleting a [team discussion](https://developer.github.com/v3/teams/discussions/) or [team discussion comment](https://developer.github.com/v3/teams/discussion_comments/).", + "operationId": "reactions/delete-legacy", + "tags": [ + "reactions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/reactions/#delete-a-reaction-legacy" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.squirrel-girl-preview+json" + }, + "required": true + }, + { + "name": "reaction_id", + "description": "reaction_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n https://api.github.com/reactions/42" + }, + { + "lang": "JS", + "source": "octokit.reactions.deleteLegacy({\n reaction_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_legacy(\n 42\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "APIs for managing reactions are currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\n application/vnd.github.squirrel-girl-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [ + { + "type": "operation", + "date": "2020-02-26", + "note": "\"reactions/delete\" operation ID is now \"reactions/delete-legacy\"", + "before": { + "operationId": "reactions/delete" + }, + "after": { + "operationId": "reactions/delete-legacy" + } + } + ], + "deprecated": true + } + }, + "/repos/{owner}/{repo}": { + "get": { + "summary": "Get", + "description": "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.", + "operationId": "repos/get", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/#get" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "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.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + }, + "license": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "spdx_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "node_id": { + "type": "string" + } + } + }, + "organization": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "parent": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + }, + "source": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + } + } + }, + "example": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZW1pdA==" + }, + "organization": { + "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": "Organization", + "site_admin": false + }, + "parent": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + }, + "source": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world" + }, + { + "lang": "JS", + "source": "octokit.repos.get({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.get(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "nebula", + "note": "You can set the visibility of a repository using the new `visibility` parameter in the [Repositories API](https://developer.github.com/v3/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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.nebula-preview+json\n\n```", + "required": false + } + ] + }, + "x-changes": [] + }, + "patch": { + "summary": "Edit", + "description": "**Note**: To edit a repository's topics, use the [`topics` endpoint](https://developer.github.com/v3/repos/#replace-all-topics-for-a-repository).", + "operationId": "repos/update", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/#edit" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + }, + "organization": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "parent": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + }, + "source": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + } + } + }, + "example": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0, + "organization": { + "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": "Organization", + "site_admin": false + }, + "parent": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + }, + "source": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world \\\n -d '{\"name\":\"name\"}'" + }, + { + "lang": "JS", + "source": "octokit.repos.update({\n owner: 'octocat',\n repo: 'hello-world',\n name: 'name'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.update(\n 'hello-world',\n 'name'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "nebula", + "note": "You can set the visibility of a repository using the new `visibility` parameter in the [Repositories API](https://developer.github.com/v3/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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.nebula-preview+json\n\n```", + "required": false + }, + { + "name": "baptiste", + "note": "The `is_template` and `template_repository` keys are currently available for developer to preview. See [Create repository using a repository template](https://developer.github.com/v3/repos/#create-repository-using-a-repository-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](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.baptiste-preview+json\n\n```", + "required": false + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the repository." + }, + "description": { + "type": "string", + "description": "A short description of the repository." + }, + "homepage": { + "type": "string", + "description": "A URL with more information about the repository." + }, + "private": { + "type": "boolean", + "description": "Either `true` to make the repository private or `false` to make it public. Creating private repositories requires a paid GitHub account. Default: `false`. \n**Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://help.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) 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](https://help.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private.", + "default": false + }, + "visibility": { + "type": "string", + "description": "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.", + "enum": [ + "public", + "private", + "visibility", + "internal" + ] + }, + "has_issues": { + "type": "boolean", + "description": "Either `true` to enable issues for this repository or `false` to disable them.", + "default": true + }, + "has_projects": { + "type": "boolean", + "description": "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.", + "default": true + }, + "has_wiki": { + "type": "boolean", + "description": "Either `true` to enable the wiki for this repository or `false` to disable it.", + "default": true + }, + "is_template": { + "type": "boolean", + "description": "Either `true` to make this repo available as a template repository or `false` to prevent it.", + "default": false + }, + "default_branch": { + "type": "string", + "description": "Updates the default branch for this repository." + }, + "allow_squash_merge": { + "type": "boolean", + "description": "Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging.", + "default": true + }, + "allow_merge_commit": { + "type": "boolean", + "description": "Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits.", + "default": true + }, + "allow_rebase_merge": { + "type": "boolean", + "description": "Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging.", + "default": true + }, + "delete_branch_on_merge": { + "type": "boolean", + "description": "Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion.", + "default": false + }, + "archived": { + "type": "boolean", + "description": "`true` to archive this repository. **Note**: You cannot unarchive repositories through the API.", + "default": false + } + } + }, + "example": { + "name": "Hello-World", + "description": "This is your first repository", + "homepage": "https://github.com", + "private": true, + "has_issues": true, + "has_projects": true, + "has_wiki": true + } + } + } + } + }, + "delete": { + "summary": "Delete a repository", + "description": "Deleting a repository requires admin access. If OAuth is used, the `delete_repo` scope is required.\n\nIf an organization owner has configured the organization to prevent members from deleting organization-owned repositories, a member will get this response:", + "operationId": "repos/delete", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/#delete-a-repository" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + }, + "403": { + "description": "If an organization owner has configured the organization to prevent members from deleting organization-owned repositories, a member will get this response:", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + } + } + }, + "example": { + "message": "Organization members cannot delete repositories.", + "documentation_url": "https://developer.github.com/v3/repos/#delete-a-repository" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world" + }, + { + "lang": "JS", + "source": "octokit.repos.delete({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/actions/artifacts": { + "get": { + "summary": "List artifacts for a repository", + "description": "Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint.", + "operationId": "actions/list-artifacts-for-repo", + "tags": [ + "actions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/actions/artifacts/#list-artifacts-for-a-repository" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": "object", + "properties": { + "total_count": { + "type": "number" + }, + "artifacts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "size_in_bytes": { + "type": "number" + }, + "url": { + "type": "string" + }, + "archive_download_url": { + "type": "string" + }, + "expired": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "expires_at": { + "type": "string" + } + }, + "required": [ + "id", + "node_id", + "name", + "size_in_bytes", + "url", + "archive_download_url", + "expired", + "created_at", + "expires_at" + ] + } + } + } + }, + "example": { + "total_count": 2, + "artifacts": [ + { + "id": 11, + "node_id": "MDg6QXJ0aWZhY3QxMQ==", + "name": "Rails", + "size_in_bytes": 556, + "url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/11", + "archive_download_url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/11/zip", + "expired": "false", + "created_at": "2020-01-10T14:59:22Z", + "expires_at": "2020-01-21T14:59:22Z" + }, + { + "id": 13, + "node_id": "MDg6QXJ0aWZhY3QxMw==", + "name": "", + "size_in_bytes": 453, + "url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13", + "archive_download_url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13/zip", + "expired": "false", + "created_at": "2020-01-10T14:59:22Z", + "expires_at": "2020-01-21T14:59:22Z" + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/artifacts" + }, + { + "lang": "JS", + "source": "octokit.actions.listArtifactsForRepo({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.artifacts_for_repo(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/actions/artifacts/{artifact_id}": { + "get": { + "summary": "Get an artifact", + "description": "Gets a specific artifact for a workflow run. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint.", + "operationId": "actions/get-artifact", + "tags": [ + "actions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/actions/artifacts/#get-an-artifact" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "artifact_id", + "description": "artifact_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "size_in_bytes": { + "type": "number" + }, + "url": { + "type": "string" + }, + "archive_download_url": { + "type": "string" + }, + "expired": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "expires_at": { + "type": "string" + } + } + }, + "example": { + "id": 11, + "node_id": "MDg6QXJ0aWZhY3QxMQ==", + "name": "Rails", + "size_in_bytes": 556, + "url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/11", + "archive_download_url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/11/zip", + "expired": "false", + "created_at": "2020-01-10T14:59:22Z", + "expires_at": "2020-01-21T14:59:22Z" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/artifacts/42" + }, + { + "lang": "JS", + "source": "octokit.actions.getArtifact({\n owner: 'octocat',\n repo: 'hello-world',\n artifact_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.artifact(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "delete": { + "summary": "Delete an artifact", + "description": "Deletes an artifact for a workflow run. Anyone with write access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint.", + "operationId": "actions/delete-artifact", + "tags": [ + "actions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/actions/artifacts/#delete-an-artifact" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "artifact_id", + "description": "artifact_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/artifacts/42" + }, + { + "lang": "JS", + "source": "octokit.actions.deleteArtifact({\n owner: 'octocat',\n repo: 'hello-world',\n artifact_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_artifact(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}": { + "get": { + "summary": "Download an artifact", + "description": "Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in the response header to find the URL for the download. The `:archive_format` must be `zip`. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint.\n\nCall this endpoint using the `-v` flag, which enables verbose output and allows you to see the download URL in the header. To download the file into the current working directory, specify the filename using the `-o` flag.", + "operationId": "actions/download-artifact", + "tags": [ + "actions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/actions/artifacts/#download-an-artifact" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "artifact_id", + "description": "artifact_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "archive_format", + "description": "archive_format parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "302": { + "description": "response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/artifacts/42/ARCHIVE_FORMAT" + }, + { + "lang": "JS", + "source": "octokit.actions.downloadArtifact({\n owner: 'octocat',\n repo: 'hello-world',\n artifact_id: 42,\n archive_format: 'archive_format'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.download_artifact(\n 'hello-world',\n 42,\n 'archive_format'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/actions/jobs/{job_id}": { + "get": { + "summary": "Get a workflow job", + "description": "Gets a specific job in a workflow run. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint.", + "operationId": "actions/get-workflow-job", + "tags": [ + "actions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/actions/workflow_jobs/#get-a-workflow-job" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "job_id", + "description": "job_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "202": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "run_id": { + "type": "number" + }, + "run_url": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "head_sha": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "status": { + "type": "string" + }, + "conclusion": { + "type": "string" + }, + "started_at": { + "type": "string" + }, + "completed_at": { + "type": "string" + }, + "name": { + "type": "string" + }, + "steps": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "status": { + "type": "string" + }, + "conclusion": { + "type": "string" + }, + "number": { + "type": "number" + }, + "started_at": { + "type": "string" + }, + "completed_at": { + "type": "string" + } + }, + "required": [ + "name", + "status", + "conclusion", + "number", + "started_at", + "completed_at" + ] + } + }, + "check_run_url": { + "type": "string" + } + } + }, + "example": { + "id": 399444496, + "run_id": 29679449, + "run_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/29679449", + "node_id": "MDEyOldvcmtmbG93IEpvYjM5OTQ0NDQ5Ng==", + "head_sha": "f83a356604ae3c5d03e1b46ef4d1ca77d64a90b0", + "url": "https://api.github.com/repos/octo-org/octo-repo/actions/jobs/399444496", + "html_url": "https://github.com/octo-org/octo-repo/runs/399444496", + "status": "completed", + "conclusion": "success", + "started_at": "2020-01-20T17:42:40Z", + "completed_at": "2020-01-20T17:44:39Z", + "name": "build", + "steps": [ + { + "name": "Set up job", + "status": "completed", + "conclusion": "success", + "number": 1, + "started_at": "2020-01-20T09:42:40.000-08:00", + "completed_at": "2020-01-20T09:42:41.000-08:00" + }, + { + "name": "Run actions/checkout@v2", + "status": "completed", + "conclusion": "success", + "number": 2, + "started_at": "2020-01-20T09:42:41.000-08:00", + "completed_at": "2020-01-20T09:42:45.000-08:00" + }, + { + "name": "Set up Ruby", + "status": "completed", + "conclusion": "success", + "number": 3, + "started_at": "2020-01-20T09:42:45.000-08:00", + "completed_at": "2020-01-20T09:42:45.000-08:00" + }, + { + "name": "Run actions/cache@v2", + "status": "completed", + "conclusion": "success", + "number": 4, + "started_at": "2020-01-20T09:42:45.000-08:00", + "completed_at": "2020-01-20T09:42:48.000-08:00" + }, + { + "name": "Install Bundler", + "status": "completed", + "conclusion": "success", + "number": 5, + "started_at": "2020-01-20T09:42:48.000-08:00", + "completed_at": "2020-01-20T09:42:52.000-08:00" + }, + { + "name": "Install Gems", + "status": "completed", + "conclusion": "success", + "number": 6, + "started_at": "2020-01-20T09:42:52.000-08:00", + "completed_at": "2020-01-20T09:42:53.000-08:00" + }, + { + "name": "Run Tests", + "status": "completed", + "conclusion": "success", + "number": 7, + "started_at": "2020-01-20T09:42:53.000-08:00", + "completed_at": "2020-01-20T09:42:59.000-08:00" + }, + { + "name": "Deploy to Heroku", + "status": "completed", + "conclusion": "success", + "number": 8, + "started_at": "2020-01-20T09:42:59.000-08:00", + "completed_at": "2020-01-20T09:44:39.000-08:00" + }, + { + "name": "Post actions/cache@v2", + "status": "completed", + "conclusion": "success", + "number": 16, + "started_at": "2020-01-20T09:44:39.000-08:00", + "completed_at": "2020-01-20T09:44:39.000-08:00" + }, + { + "name": "Complete job", + "status": "completed", + "conclusion": "success", + "number": 17, + "started_at": "2020-01-20T09:44:39.000-08:00", + "completed_at": "2020-01-20T09:44:39.000-08:00" + } + ], + "check_run_url": "https://api.github.com/repos/octo-org/octo-repo/check-runs/399444496" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/jobs/42" + }, + { + "lang": "JS", + "source": "octokit.actions.getWorkflowJob({\n owner: 'octocat',\n repo: 'hello-world',\n job_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.workflow_job(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/actions/jobs/{job_id}/logs": { + "get": { + "summary": "List workflow job logs", + "description": "Gets a redirect URL to download a plain text file of logs for a workflow job. This link expires after 1 minute. Look for `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint.\n\nCall this endpoint using the `-v` flag, which enables verbose output and allows you to see the download URL in the header. To download the file into the current working directory, specify the filename using the `-o` flag.", + "operationId": "actions/list-workflow-job-logs", + "tags": [ + "actions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/actions/workflow_jobs/#list-workflow-job-logs" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "job_id", + "description": "job_id parameter", + "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": { + "302": { + "description": "response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/jobs/42/logs" + }, + { + "lang": "JS", + "source": "octokit.actions.listWorkflowJobLogs({\n owner: 'octocat',\n repo: 'hello-world',\n job_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.workflow_job_logs(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/actions/runners": { + "get": { + "summary": "List self-hosted runners for a repository", + "description": "Lists all self-hosted runners for a repository. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration` permission to use this endpoint.", + "operationId": "actions/list-self-hosted-runners-for-repo", + "tags": [ + "actions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/actions/self_hosted_runners/#list-self-hosted-runners-for-a-repository" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "os": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + }, + "example": [ + [ + { + "id": 23, + "name": "MBP", + "os": "macos", + "status": "online" + }, + { + "id": 24, + "name": "iMac", + "os": "macos", + "status": "offline" + } + ] + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runners" + }, + { + "lang": "JS", + "source": "octokit.actions.listSelfHostedRunnersForRepo({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.self_hosted_runners_for_repo(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/actions/runners/downloads": { + "get": { + "summary": "List downloads for the self-hosted runner application", + "description": "Lists binaries for the self-hosted runner application that you can download and run. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration` permission to use this endpoint.", + "operationId": "actions/list-downloads-for-self-hosted-runner-application", + "tags": [ + "actions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/actions/self_hosted_runners/#list-downloads-for-the-self-hosted-runner-application" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "os": { + "type": "string" + }, + "architecture": { + "type": "string" + }, + "download_url": { + "type": "string" + }, + "filename": { + "type": "string" + } + } + } + }, + "example": [ + { + "os": "osx", + "architecture": "x64", + "download_url": "https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-osx-x64-2.164.0.tar.gz", + "filename": "actions-runner-osx-x64-2.164.0.tar.gz" + }, + { + "os": "linux", + "architecture": "x64", + "download_url": "https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-linux-x64-2.164.0.tar.gz", + "filename": "actions-runner-linux-x64-2.164.0.tar.gz" + }, + { + "os": "linux", + "architecture": "arm", + "download_url": "https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-linux-arm-2.164.0.tar.gz", + "filename": "actions-runner-linux-arm-2.164.0.tar.gz" + }, + { + "os": "win", + "architecture": "x64", + "download_url": "https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-win-x64-2.164.0.zip", + "filename": "actions-runner-win-x64-2.164.0.zip" + }, + { + "os": "linux", + "architecture": "arm64", + "download_url": "https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-linux-arm64-2.164.0.tar.gz", + "filename": "actions-runner-linux-arm64-2.164.0.tar.gz" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runners/downloads" + }, + { + "lang": "JS", + "source": "octokit.actions.listDownloadsForSelfHostedRunnerApplication({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.downloads_for_self_hosted_runner_application(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/actions/runners/registration-token": { + "post": { + "summary": "Create a registration token", + "description": "Returns a token that you can pass to the `config` script. The token expires after one hour. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration` permission to use this endpoint.\n\nConfigure your self-hosted runner, replacing TOKEN with the registration token provided by this endpoint.\n\n", + "operationId": "actions/create-registration-token", + "tags": [ + "actions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/actions/self_hosted_runners/#create-a-registration-token" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "token": { + "type": "string" + }, + "expires_at": { + "type": "string" + } + } + }, + "example": { + "token": "LLBF3JGZDX3P5PMEXLND6TS6FCWO6", + "expires_at": "2020-01-22T12:13:35.123-08:00" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runners/registration-token" + }, + { + "lang": "JS", + "source": "octokit.actions.createRegistrationToken({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_registration_token(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/actions/runners/remove-token": { + "post": { + "summary": "Create a remove token", + "description": "Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration` permission to use this endpoint.\n\nRemove your self-hosted runner from a repository, replacing TOKEN with the remove token provided by this endpoint.\n\n", + "operationId": "actions/create-remove-token", + "tags": [ + "actions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/actions/self_hosted_runners/#create-a-remove-token" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "token": { + "type": "string" + }, + "expires_at": { + "type": "string" + } + } + }, + "example": { + "token": "AABF3JGZDX3P5PMEXLND6TS6FCWO6", + "expires_at": "2020-01-29T12:13:35.123-08:00" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runners/remove-token" + }, + { + "lang": "JS", + "source": "octokit.actions.createRemoveToken({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_remove_token(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/actions/runners/{runner_id}": { + "get": { + "summary": "Get a self-hosted runner", + "description": "Gets a specific self-hosted runner. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration` permission to use this endpoint.", + "operationId": "actions/get-self-hosted-runner", + "tags": [ + "actions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/actions/self_hosted_runners/#get-a-self-hosted-runner" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "runner_id", + "description": "runner_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "os": { + "type": "string" + }, + "status": { + "type": "string" + } + } + }, + "example": { + "id": 23, + "name": "MBP", + "os": "macos", + "status": "online" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runners/42" + }, + { + "lang": "JS", + "source": "octokit.actions.getSelfHostedRunner({\n owner: 'octocat',\n repo: 'hello-world',\n runner_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.self_hosted_runner(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "delete": { + "summary": "Remove a self-hosted runner", + "description": "Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration` permission to use this endpoint.", + "operationId": "actions/remove-self-hosted-runner", + "tags": [ + "actions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/actions/self_hosted_runners/#remove-a-self-hosted-runner" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "runner_id", + "description": "runner_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runners/42" + }, + { + "lang": "JS", + "source": "octokit.actions.removeSelfHostedRunner({\n owner: 'octocat',\n repo: 'hello-world',\n runner_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.remove_self_hosted_runner(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/actions/runs": { + "get": { + "summary": "List repository workflow runs", + "description": "Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://developer.github.com/v3/#parameters).\n\nAnyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint.", + "operationId": "actions/list-repo-workflow-runs", + "tags": [ + "actions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/actions/workflow_runs/#list-repository-workflow-runs" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "actor", + "description": "Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run.", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "branch", + "description": "Returns workflow runs associated with a branch. Use the name of the branch of the `push`.", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "event", + "description": "Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see \"[Events that trigger workflows](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)\" in the GitHub Help documentation.", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "status", + "description": "Returns workflow runs associated with the check run `status` or `conclusion` you specify. For example, a conclusion can be `success` or a status can be `completed`. For more information, see the `status` and `conclusion` options available in \"[Create a check run](https://developer.github.com/v3/checks/runs/#create-a-check-run).\"", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "completed", + "status", + "conclusion" + ] + } + }, + { + "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": "object", + "properties": { + "total_count": { + "type": "number" + }, + "workflow_runs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "head_branch": { + "type": "string" + }, + "head_sha": { + "type": "string" + }, + "run_number": { + "type": "number" + }, + "event": { + "type": "string" + }, + "status": { + "type": "string" + }, + "conclusion": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "pull_requests": { + "type": "array", + "items": {} + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "jobs_url": { + "type": "string" + }, + "logs_url": { + "type": "string" + }, + "check_suite_url": { + "type": "string" + }, + "artifacts_url": { + "type": "string" + }, + "cancel_url": { + "type": "string" + }, + "rerun_url": { + "type": "string" + }, + "workflow_url": { + "type": "string" + }, + "head_commit": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "tree_id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "timestamp": { + "type": "string" + }, + "author": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + } + } + }, + "committer": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + } + } + } + } + }, + "repository": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + } + } + }, + "head_repository": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "private": { + "type": "boolean" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + } + } + } + } + } + } + } + }, + "example": { + "total_count": 1, + "workflow_runs": [ + { + "id": 30433642, + "node_id": "MDEyOldvcmtmbG93IFJ1bjI2OTI4OQ==", + "head_branch": "master", + "head_sha": "acb5820ced9479c074f688cc328bf03f341a511d", + "run_number": 562, + "event": "push", + "status": "queued", + "conclusion": null, + "url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642", + "html_url": "https://github.com/octo-org/octo-repo/actions/runs/30433642", + "pull_requests": [], + "created_at": "2020-01-22T19:33:08Z", + "updated_at": "2020-01-22T19:33:08Z", + "jobs_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/jobs", + "logs_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/logs", + "check_suite_url": "https://api.github.com/repos/octo-org/octo-repo/check-suites/414944374", + "artifacts_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/artifacts", + "cancel_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/cancel", + "rerun_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/rerun", + "workflow_url": "https://api.github.com/repos/octo-org/octo-repo/actions/workflows/30433642", + "head_commit": { + "id": "acb5820ced9479c074f688cc328bf03f341a511d", + "tree_id": "d23f6eedb1e1b9610bbc754ddb5197bfe7271223", + "message": "Create linter.yml", + "timestamp": "2020-01-22T19:33:05Z", + "author": { + "name": "Octo Cat", + "email": "octocat@github.com" + }, + "committer": { + "name": "GitHub", + "email": "noreply@github.com" + } + }, + "repository": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}" + }, + "head_repository": { + "id": 217723378, + "node_id": "MDEwOlJlcG9zaXRvcnkyMTc3MjMzNzg=", + "name": "octo-repo", + "full_name": "octo-org/octo-repo", + "private": true, + "owner": { + "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 + }, + "html_url": "https://github.com/octo-org/octo-repo", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/octo-org/octo-repo", + "forks_url": "https://api.github.com/repos/octo-org/octo-repo/forks", + "keys_url": "https://api.github.com/repos/octo-org/octo-repo/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/octo-org/octo-repo/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/octo-org/octo-repo/teams", + "hooks_url": "https://api.github.com/repos/octo-org/octo-repo/hooks", + "issue_events_url": "https://api.github.com/repos/octo-org/octo-repo/issues/events{/number}", + "events_url": "https://api.github.com/repos/octo-org/octo-repo/events", + "assignees_url": "https://api.github.com/repos/octo-org/octo-repo/assignees{/user}", + "branches_url": "https://api.github.com/repos/octo-org/octo-repo/branches{/branch}", + "tags_url": "https://api.github.com/repos/octo-org/octo-repo/tags", + "blobs_url": "https://api.github.com/repos/octo-org/octo-repo/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/octo-org/octo-repo/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/octo-org/octo-repo/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/octo-org/octo-repo/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/octo-org/octo-repo/statuses/{sha}", + "languages_url": "https://api.github.com/repos/octo-org/octo-repo/languages", + "stargazers_url": "https://api.github.com/repos/octo-org/octo-repo/stargazers", + "contributors_url": "https://api.github.com/repos/octo-org/octo-repo/contributors", + "subscribers_url": "https://api.github.com/repos/octo-org/octo-repo/subscribers", + "subscription_url": "https://api.github.com/repos/octo-org/octo-repo/subscription", + "commits_url": "https://api.github.com/repos/octo-org/octo-repo/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/octo-org/octo-repo/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/octo-org/octo-repo/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/octo-org/octo-repo/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/octo-org/octo-repo/contents/{+path}", + "compare_url": "https://api.github.com/repos/octo-org/octo-repo/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/octo-org/octo-repo/merges", + "archive_url": "https://api.github.com/repos/octo-org/octo-repo/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/octo-org/octo-repo/downloads", + "issues_url": "https://api.github.com/repos/octo-org/octo-repo/issues{/number}", + "pulls_url": "https://api.github.com/repos/octo-org/octo-repo/pulls{/number}", + "milestones_url": "https://api.github.com/repos/octo-org/octo-repo/milestones{/number}", + "notifications_url": "https://api.github.com/repos/octo-org/octo-repo/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/octo-org/octo-repo/labels{/name}", + "releases_url": "https://api.github.com/repos/octo-org/octo-repo/releases{/id}", + "deployments_url": "https://api.github.com/repos/octo-org/octo-repo/deployments" + } + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runs" + }, + { + "lang": "JS", + "source": "octokit.actions.listRepoWorkflowRuns({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.repo_workflow_runs(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/actions/runs/{run_id}": { + "get": { + "summary": "Get a workflow run", + "description": "Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint.", + "operationId": "actions/get-workflow-run", + "tags": [ + "actions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/actions/workflow_runs/#get-a-workflow-run" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "run_id", + "description": "run_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "head_branch": { + "type": "string" + }, + "head_sha": { + "type": "string" + }, + "run_number": { + "type": "number" + }, + "event": { + "type": "string" + }, + "status": { + "type": "string" + }, + "conclusion": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "pull_requests": { + "type": "array", + "items": {} + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "jobs_url": { + "type": "string" + }, + "logs_url": { + "type": "string" + }, + "check_suite_url": { + "type": "string" + }, + "artifacts_url": { + "type": "string" + }, + "cancel_url": { + "type": "string" + }, + "rerun_url": { + "type": "string" + }, + "workflow_url": { + "type": "string" + }, + "head_commit": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "tree_id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "timestamp": { + "type": "string" + }, + "author": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + } + } + }, + "committer": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + } + } + } + } + }, + "repository": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + } + } + }, + "head_repository": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "private": { + "type": "boolean" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + } + } + } + } + }, + "example": { + "id": 30433642, + "node_id": "MDEyOldvcmtmbG93IFJ1bjI2OTI4OQ==", + "head_branch": "master", + "head_sha": "acb5820ced9479c074f688cc328bf03f341a511d", + "run_number": 562, + "event": "push", + "status": "queued", + "conclusion": null, + "url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642", + "html_url": "https://github.com/octo-org/octo-repo/actions/runs/30433642", + "pull_requests": [], + "created_at": "2020-01-22T19:33:08Z", + "updated_at": "2020-01-22T19:33:08Z", + "jobs_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/jobs", + "logs_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/logs", + "check_suite_url": "https://api.github.com/repos/octo-org/octo-repo/check-suites/414944374", + "artifacts_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/artifacts", + "cancel_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/cancel", + "rerun_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/rerun", + "workflow_url": "https://api.github.com/repos/octo-org/octo-repo/actions/workflows/30433642", + "head_commit": { + "id": "acb5820ced9479c074f688cc328bf03f341a511d", + "tree_id": "d23f6eedb1e1b9610bbc754ddb5197bfe7271223", + "message": "Create linter.yml", + "timestamp": "2020-01-22T19:33:05Z", + "author": { + "name": "Octo Cat", + "email": "octocat@github.com" + }, + "committer": { + "name": "GitHub", + "email": "noreply@github.com" + } + }, + "repository": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}" + }, + "head_repository": { + "id": 217723378, + "node_id": "MDEwOlJlcG9zaXRvcnkyMTc3MjMzNzg=", + "name": "octo-repo", + "full_name": "octo-org/octo-repo", + "private": true, + "owner": { + "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 + }, + "html_url": "https://github.com/octo-org/octo-repo", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/octo-org/octo-repo", + "forks_url": "https://api.github.com/repos/octo-org/octo-repo/forks", + "keys_url": "https://api.github.com/repos/octo-org/octo-repo/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/octo-org/octo-repo/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/octo-org/octo-repo/teams", + "hooks_url": "https://api.github.com/repos/octo-org/octo-repo/hooks", + "issue_events_url": "https://api.github.com/repos/octo-org/octo-repo/issues/events{/number}", + "events_url": "https://api.github.com/repos/octo-org/octo-repo/events", + "assignees_url": "https://api.github.com/repos/octo-org/octo-repo/assignees{/user}", + "branches_url": "https://api.github.com/repos/octo-org/octo-repo/branches{/branch}", + "tags_url": "https://api.github.com/repos/octo-org/octo-repo/tags", + "blobs_url": "https://api.github.com/repos/octo-org/octo-repo/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/octo-org/octo-repo/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/octo-org/octo-repo/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/octo-org/octo-repo/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/octo-org/octo-repo/statuses/{sha}", + "languages_url": "https://api.github.com/repos/octo-org/octo-repo/languages", + "stargazers_url": "https://api.github.com/repos/octo-org/octo-repo/stargazers", + "contributors_url": "https://api.github.com/repos/octo-org/octo-repo/contributors", + "subscribers_url": "https://api.github.com/repos/octo-org/octo-repo/subscribers", + "subscription_url": "https://api.github.com/repos/octo-org/octo-repo/subscription", + "commits_url": "https://api.github.com/repos/octo-org/octo-repo/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/octo-org/octo-repo/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/octo-org/octo-repo/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/octo-org/octo-repo/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/octo-org/octo-repo/contents/{+path}", + "compare_url": "https://api.github.com/repos/octo-org/octo-repo/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/octo-org/octo-repo/merges", + "archive_url": "https://api.github.com/repos/octo-org/octo-repo/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/octo-org/octo-repo/downloads", + "issues_url": "https://api.github.com/repos/octo-org/octo-repo/issues{/number}", + "pulls_url": "https://api.github.com/repos/octo-org/octo-repo/pulls{/number}", + "milestones_url": "https://api.github.com/repos/octo-org/octo-repo/milestones{/number}", + "notifications_url": "https://api.github.com/repos/octo-org/octo-repo/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/octo-org/octo-repo/labels{/name}", + "releases_url": "https://api.github.com/repos/octo-org/octo-repo/releases{/id}", + "deployments_url": "https://api.github.com/repos/octo-org/octo-repo/deployments" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runs/42" + }, + { + "lang": "JS", + "source": "octokit.actions.getWorkflowRun({\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.workflow_run(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts": { + "get": { + "summary": "List workflow run artifacts", + "description": "Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint.", + "operationId": "actions/list-workflow-run-artifacts", + "tags": [ + "actions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/actions/artifacts/#list-workflow-run-artifacts" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "run_id", + "description": "run_id parameter", + "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": "object", + "properties": { + "total_count": { + "type": "number" + }, + "artifacts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "size_in_bytes": { + "type": "number" + }, + "url": { + "type": "string" + }, + "archive_download_url": { + "type": "string" + }, + "expired": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "expires_at": { + "type": "string" + } + }, + "required": [ + "id", + "node_id", + "name", + "size_in_bytes", + "url", + "archive_download_url", + "expired", + "created_at", + "expires_at" + ] + } + } + } + }, + "example": { + "total_count": 2, + "artifacts": [ + { + "id": 11, + "node_id": "MDg6QXJ0aWZhY3QxMQ==", + "name": "Rails", + "size_in_bytes": 556, + "url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/11", + "archive_download_url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/11/zip", + "expired": "false", + "created_at": "2020-01-10T14:59:22Z", + "expires_at": "2020-01-21T14:59:22Z" + }, + { + "id": 13, + "node_id": "MDg6QXJ0aWZhY3QxMw==", + "name": "", + "size_in_bytes": 453, + "url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13", + "archive_download_url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13/zip", + "expired": "false", + "created_at": "2020-01-10T14:59:22Z", + "expires_at": "2020-01-21T14:59:22Z" + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runs/42/artifacts" + }, + { + "lang": "JS", + "source": "octokit.actions.listWorkflowRunArtifacts({\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.workflow_run_artifacts(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/actions/runs/{run_id}/cancel": { + "post": { + "summary": "Cancel a workflow run", + "description": "Cancels a workflow run using its `id`. Anyone with write access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint.", + "operationId": "actions/cancel-workflow-run", + "tags": [ + "actions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/actions/workflow_runs/#cancel-a-workflow-run" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "run_id", + "description": "run_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "202": { + "description": "response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runs/42/cancel" + }, + { + "lang": "JS", + "source": "octokit.actions.cancelWorkflowRun({\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.cancel_workflow_run(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/actions/runs/{run_id}/jobs": { + "get": { + "summary": "List jobs for a workflow run", + "description": "Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint.", + "operationId": "actions/list-jobs-for-workflow-run", + "tags": [ + "actions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/actions/workflow_jobs/#list-jobs-for-a-workflow-run" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "run_id", + "description": "run_id parameter", + "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": "object", + "properties": { + "total_count": { + "type": "number" + }, + "jobs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "run_id": { + "type": "number" + }, + "run_url": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "head_sha": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "status": { + "type": "string" + }, + "conclusion": { + "type": "string" + }, + "started_at": { + "type": "string" + }, + "completed_at": { + "type": "string" + }, + "name": { + "type": "string" + }, + "steps": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "status": { + "type": "string" + }, + "conclusion": { + "type": "string" + }, + "number": { + "type": "number" + }, + "started_at": { + "type": "string" + }, + "completed_at": { + "type": "string" + } + }, + "required": [ + "name", + "status", + "conclusion", + "number", + "started_at", + "completed_at" + ] + } + }, + "check_run_url": { + "type": "string" + } + } + } + } + } + }, + "example": { + "total_count": 1, + "jobs": [ + { + "id": 399444496, + "run_id": 29679449, + "run_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/29679449", + "node_id": "MDEyOldvcmtmbG93IEpvYjM5OTQ0NDQ5Ng==", + "head_sha": "f83a356604ae3c5d03e1b46ef4d1ca77d64a90b0", + "url": "https://api.github.com/repos/octo-org/octo-repo/actions/jobs/399444496", + "html_url": "https://github.com/octo-org/octo-repo/runs/399444496", + "status": "completed", + "conclusion": "success", + "started_at": "2020-01-20T17:42:40Z", + "completed_at": "2020-01-20T17:44:39Z", + "name": "build", + "steps": [ + { + "name": "Set up job", + "status": "completed", + "conclusion": "success", + "number": 1, + "started_at": "2020-01-20T09:42:40.000-08:00", + "completed_at": "2020-01-20T09:42:41.000-08:00" + }, + { + "name": "Run actions/checkout@v2", + "status": "completed", + "conclusion": "success", + "number": 2, + "started_at": "2020-01-20T09:42:41.000-08:00", + "completed_at": "2020-01-20T09:42:45.000-08:00" + }, + { + "name": "Set up Ruby", + "status": "completed", + "conclusion": "success", + "number": 3, + "started_at": "2020-01-20T09:42:45.000-08:00", + "completed_at": "2020-01-20T09:42:45.000-08:00" + }, + { + "name": "Run actions/cache@v2", + "status": "completed", + "conclusion": "success", + "number": 4, + "started_at": "2020-01-20T09:42:45.000-08:00", + "completed_at": "2020-01-20T09:42:48.000-08:00" + }, + { + "name": "Install Bundler", + "status": "completed", + "conclusion": "success", + "number": 5, + "started_at": "2020-01-20T09:42:48.000-08:00", + "completed_at": "2020-01-20T09:42:52.000-08:00" + }, + { + "name": "Install Gems", + "status": "completed", + "conclusion": "success", + "number": 6, + "started_at": "2020-01-20T09:42:52.000-08:00", + "completed_at": "2020-01-20T09:42:53.000-08:00" + }, + { + "name": "Run Tests", + "status": "completed", + "conclusion": "success", + "number": 7, + "started_at": "2020-01-20T09:42:53.000-08:00", + "completed_at": "2020-01-20T09:42:59.000-08:00" + }, + { + "name": "Deploy to Heroku", + "status": "completed", + "conclusion": "success", + "number": 8, + "started_at": "2020-01-20T09:42:59.000-08:00", + "completed_at": "2020-01-20T09:44:39.000-08:00" + }, + { + "name": "Post actions/cache@v2", + "status": "completed", + "conclusion": "success", + "number": 16, + "started_at": "2020-01-20T09:44:39.000-08:00", + "completed_at": "2020-01-20T09:44:39.000-08:00" + }, + { + "name": "Complete job", + "status": "completed", + "conclusion": "success", + "number": 17, + "started_at": "2020-01-20T09:44:39.000-08:00", + "completed_at": "2020-01-20T09:44:39.000-08:00" + } + ], + "check_run_url": "https://api.github.com/repos/octo-org/octo-repo/check-runs/399444496" + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runs/42/jobs" + }, + { + "lang": "JS", + "source": "octokit.actions.listJobsForWorkflowRun({\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.jobs_for_workflow_run(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/actions/runs/{run_id}/logs": { + "get": { + "summary": "List workflow run logs", + "description": "Gets a redirect URL to download an archive of log files for a workflow run. This link expires after 1 minute. Look for `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint.\n\nCall this endpoint using the `-v` flag, which enables verbose output and allows you to see the download URL in the header. To download the file into the current working directory, specify the filename using the `-o` flag.", + "operationId": "actions/list-workflow-run-logs", + "tags": [ + "actions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/actions/workflow_runs/#list-workflow-run-logs" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "run_id", + "description": "run_id parameter", + "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": { + "302": { + "description": "response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runs/42/logs" + }, + { + "lang": "JS", + "source": "octokit.actions.listWorkflowRunLogs({\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.workflow_run_logs(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/actions/runs/{run_id}/rerun": { + "post": { + "summary": "Re-run a workflow", + "description": "Re-runs your workflow run using its `id`. Anyone with write access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint.", + "operationId": "actions/re-run-workflow", + "tags": [ + "actions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/actions/workflow_runs/#re-run-a-workflow" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "run_id", + "description": "run_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "201": { + "description": "response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runs/42/rerun" + }, + { + "lang": "JS", + "source": "octokit.actions.reRunWorkflow({\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.re_run_workflow(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/actions/secrets": { + "get": { + "summary": "List secrets for a repository", + "description": "Lists all secrets available in a repository without revealing their encrypted values. Anyone with write access to the repository can use this endpoint. GitHub Apps must have the `secrets` permission to use this endpoint.", + "operationId": "actions/list-secrets-for-repo", + "tags": [ + "actions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/actions/secrets/#list-secrets-for-a-repository" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": "object", + "properties": { + "total_count": { + "type": "number" + }, + "secrets": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + }, + "required": [ + "name", + "created_at", + "updated_at" + ] + } + } + } + }, + "example": { + "total_count": 2, + "secrets": [ + { + "name": "GH_TOKEN", + "created_at": "2019-08-10T14:59:22Z", + "updated_at": "2020-01-10T14:59:22Z" + }, + { + "name": "GIST_ID", + "created_at": "2020-01-10T10:59:22Z", + "updated_at": "2020-01-11T11:59:22Z" + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/secrets" + }, + { + "lang": "JS", + "source": "octokit.actions.listSecretsForRepo({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.secrets_for_repo(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/actions/secrets/public-key": { + "get": { + "summary": "Get your public key", + "description": "Gets your public key, which you must store. You need your public key to use other secrets endpoints. Use the returned `key` to encrypt your secrets. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `secrets` permission to use this endpoint.", + "operationId": "actions/get-public-key", + "tags": [ + "actions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/actions/secrets/#get-your-public-key" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "key_id": { + "type": "string" + }, + "key": { + "type": "string" + } + } + }, + "example": { + "key_id": "1234", + "key": "2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/secrets/public-key" + }, + { + "lang": "JS", + "source": "octokit.actions.getPublicKey({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.public_key(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/actions/secrets/{name}": { + "get": { + "summary": "Get a secret", + "description": "Gets a single secret without revealing its encrypted value. Anyone with write access to the repository can use this endpoint. GitHub Apps must have the `secrets` permission to use this endpoint.", + "operationId": "actions/get-secret", + "tags": [ + "actions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/actions/secrets/#get-a-secret" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "name", + "description": "name parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + }, + "example": { + "name": "GH_TOKEN", + "created_at": "2019-08-10T14:59:22Z", + "updated_at": "2020-01-10T14:59:22Z" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/secrets/NAME" + }, + { + "lang": "JS", + "source": "octokit.actions.getSecret({\n owner: 'octocat',\n repo: 'hello-world',\n name: 'name'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.secret(\n 'hello-world',\n 'name'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "put": { + "summary": "Create or update a secret for a repository", + "description": "Creates or updates a secret with an encrypted value. Encrypt your secret using [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). Anyone with write access to the repository can use this endpoint. GitHub Apps must have the `secrets` permission to use this endpoint.\n\nEncrypt your secret using the [tweetsodium](https://github.com/mastahyeti/tweetsodium) library.\n\n\n\nEncrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/stable/public/#nacl-public-sealedbox) with Python 3.\n\n\n\nEncrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package.\n\n\n\nEncrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem.\n\n", + "operationId": "actions/create-or-update-secret-for-repo", + "tags": [ + "actions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/actions/secrets/#create-or-update-a-secret-for-a-repository" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "name", + "description": "name parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "418": { + "description": "Response definition missing" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/secrets/NAME \\\n -d '{\"encrypted_value\":\"encrypted_value\"}'" + }, + { + "lang": "JS", + "source": "octokit.actions.createOrUpdateSecretForRepo({\n owner: 'octocat',\n repo: 'hello-world',\n name: 'name',\n encrypted_value: 'encrypted_value'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_or_update_secret_for_repo(\n 'hello-world',\n 'name',\n 'encrypted_value'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "encrypted_value": { + "type": "string", + "description": "Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get your public key](https://developer.github.com/v3/actions/secrets/#get-your-public-key) endpoint." + }, + "key_id": { + "type": "string", + "description": "ID of the key you used to encrypt the secret." + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete a secret from a repository", + "description": "Deletes a secret in a repository using the secret name. Anyone with write access to the repository can use this endpoint. GitHub Apps must have the `secrets` permission to use this endpoint.", + "operationId": "actions/delete-secret-from-repo", + "tags": [ + "actions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/actions/secrets/#delete-a-secret-from-a-repository" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "name", + "description": "name parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/secrets/NAME" + }, + { + "lang": "JS", + "source": "octokit.actions.deleteSecretFromRepo({\n owner: 'octocat',\n repo: 'hello-world',\n name: 'name'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_secret_from_repo(\n 'hello-world',\n 'name'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/actions/workflows": { + "get": { + "summary": "List repository workflows", + "description": "Lists the workflows in a repository. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint.", + "operationId": "actions/list-repo-workflows", + "tags": [ + "actions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/actions/workflows/#list-repository-workflows" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": "object", + "properties": { + "total_count": { + "type": "number" + }, + "workflows": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "state": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "badge_url": { + "type": "string" + } + }, + "required": [ + "id", + "node_id", + "name", + "path", + "state", + "created_at", + "updated_at", + "url", + "html_url", + "badge_url" + ] + } + } + } + }, + "example": { + "total_count": 2, + "workflows": [ + { + "id": 161335, + "node_id": "MDg6V29ya2Zsb3cxNjEzMzU=", + "name": "CI", + "path": ".github/workflows/blank.yml", + "state": "active", + "created_at": "2020-01-08T23:48:37.000-08:00", + "updated_at": "2020-01-08T23:50:21.000-08:00", + "url": "https://api.github.com/repos/octo-org/octo-repo/actions/workflows/161335", + "html_url": "https://github.com/octo-org/octo-repo/blob/master/.github/workflows/161335", + "badge_url": "https://github.com/octo-org/octo-repo/workflows/CI/badge.svg" + }, + { + "id": 269289, + "node_id": "MDE4OldvcmtmbG93IFNlY29uZGFyeTI2OTI4OQ==", + "name": "Linter", + "path": ".github/workflows/linter.yml", + "state": "active", + "created_at": "2020-01-08T23:48:37.000-08:00", + "updated_at": "2020-01-08T23:50:21.000-08:00", + "url": "https://api.github.com/repos/octo-org/octo-repo/actions/workflows/269289", + "html_url": "https://github.com/octo-org/octo-repo/blob/master/.github/workflows/269289", + "badge_url": "https://github.com/octo-org/octo-repo/workflows/Linter/badge.svg" + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/workflows" + }, + { + "lang": "JS", + "source": "octokit.actions.listRepoWorkflows({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.repo_workflows(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}": { + "get": { + "summary": "Get a workflow", + "description": "Gets a specific workflow. You can also replace `:workflow_id` with `:workflow_file_name`. For example, you could use `main.yml`. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint.", + "operationId": "actions/get-workflow", + "tags": [ + "actions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/actions/workflows/#get-a-workflow" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "workflow_id", + "description": "workflow_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "state": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "badge_url": { + "type": "string" + } + } + }, + "example": { + "id": 161335, + "node_id": "MDg6V29ya2Zsb3cxNjEzMzU=", + "name": "CI", + "path": ".github/workflows/blank.yml", + "state": "active", + "created_at": "2020-01-08T23:48:37.000-08:00", + "updated_at": "2020-01-08T23:50:21.000-08:00", + "url": "https://api.github.com/repos/octo-org/octo-repo/actions/workflows/161335", + "html_url": "https://github.com/octo-org/octo-repo/blob/master/.github/workflows/161335", + "badge_url": "https://github.com/octo-org/octo-repo/workflows/CI/badge.svg" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/workflows/42" + }, + { + "lang": "JS", + "source": "octokit.actions.getWorkflow({\n owner: 'octocat',\n repo: 'hello-world',\n workflow_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.workflow(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs": { + "get": { + "summary": "List workflow runs", + "description": "List all workflow runs for a workflow. You can also replace `:workflow_id` with `:workflow_file_name`. For example, you could use `main.yml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://developer.github.com/v3/#parameters).\n\nAnyone with read access to the repository can use this endpoint.", + "operationId": "actions/list-workflow-runs", + "tags": [ + "actions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/actions/workflow_runs/#list-workflow-runs" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "workflow_id", + "description": "workflow_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "actor", + "description": "Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run.", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "branch", + "description": "Returns workflow runs associated with a branch. Use the name of the branch of the `push`.", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "event", + "description": "Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see \"[Events that trigger workflows](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)\" in the GitHub Help documentation.", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "status", + "description": "Returns workflow runs associated with the check run `status` or `conclusion` you specify. For example, a conclusion can be `success` or a status can be `completed`. For more information, see the `status` and `conclusion` options available in \"[Create a check run](https://developer.github.com/v3/checks/runs/#create-a-check-run).\"", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "completed", + "status", + "conclusion" + ] + } + }, + { + "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": "object", + "properties": { + "total_count": { + "type": "number" + }, + "workflow_runs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "head_branch": { + "type": "string" + }, + "head_sha": { + "type": "string" + }, + "run_number": { + "type": "number" + }, + "event": { + "type": "string" + }, + "status": { + "type": "string" + }, + "conclusion": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "pull_requests": { + "type": "array", + "items": {} + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "jobs_url": { + "type": "string" + }, + "logs_url": { + "type": "string" + }, + "check_suite_url": { + "type": "string" + }, + "artifacts_url": { + "type": "string" + }, + "cancel_url": { + "type": "string" + }, + "rerun_url": { + "type": "string" + }, + "workflow_url": { + "type": "string" + }, + "head_commit": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "tree_id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "timestamp": { + "type": "string" + }, + "author": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + } + } + }, + "committer": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + } + } + } + } + }, + "repository": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + } + } + }, + "head_repository": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "private": { + "type": "boolean" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + } + } + } + } + } + } + } + }, + "example": { + "total_count": 1, + "workflow_runs": [ + { + "id": 30433642, + "node_id": "MDEyOldvcmtmbG93IFJ1bjI2OTI4OQ==", + "head_branch": "master", + "head_sha": "acb5820ced9479c074f688cc328bf03f341a511d", + "run_number": 562, + "event": "push", + "status": "queued", + "conclusion": null, + "url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642", + "html_url": "https://github.com/octo-org/octo-repo/actions/runs/30433642", + "pull_requests": [], + "created_at": "2020-01-22T19:33:08Z", + "updated_at": "2020-01-22T19:33:08Z", + "jobs_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/jobs", + "logs_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/logs", + "check_suite_url": "https://api.github.com/repos/octo-org/octo-repo/check-suites/414944374", + "artifacts_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/artifacts", + "cancel_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/cancel", + "rerun_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/rerun", + "workflow_url": "https://api.github.com/repos/octo-org/octo-repo/actions/workflows/30433642", + "head_commit": { + "id": "acb5820ced9479c074f688cc328bf03f341a511d", + "tree_id": "d23f6eedb1e1b9610bbc754ddb5197bfe7271223", + "message": "Create linter.yml", + "timestamp": "2020-01-22T19:33:05Z", + "author": { + "name": "Octo Cat", + "email": "octocat@github.com" + }, + "committer": { + "name": "GitHub", + "email": "noreply@github.com" + } + }, + "repository": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}" + }, + "head_repository": { + "id": 217723378, + "node_id": "MDEwOlJlcG9zaXRvcnkyMTc3MjMzNzg=", + "name": "octo-repo", + "full_name": "octo-org/octo-repo", + "private": true, + "owner": { + "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 + }, + "html_url": "https://github.com/octo-org/octo-repo", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/octo-org/octo-repo", + "forks_url": "https://api.github.com/repos/octo-org/octo-repo/forks", + "keys_url": "https://api.github.com/repos/octo-org/octo-repo/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/octo-org/octo-repo/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/octo-org/octo-repo/teams", + "hooks_url": "https://api.github.com/repos/octo-org/octo-repo/hooks", + "issue_events_url": "https://api.github.com/repos/octo-org/octo-repo/issues/events{/number}", + "events_url": "https://api.github.com/repos/octo-org/octo-repo/events", + "assignees_url": "https://api.github.com/repos/octo-org/octo-repo/assignees{/user}", + "branches_url": "https://api.github.com/repos/octo-org/octo-repo/branches{/branch}", + "tags_url": "https://api.github.com/repos/octo-org/octo-repo/tags", + "blobs_url": "https://api.github.com/repos/octo-org/octo-repo/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/octo-org/octo-repo/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/octo-org/octo-repo/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/octo-org/octo-repo/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/octo-org/octo-repo/statuses/{sha}", + "languages_url": "https://api.github.com/repos/octo-org/octo-repo/languages", + "stargazers_url": "https://api.github.com/repos/octo-org/octo-repo/stargazers", + "contributors_url": "https://api.github.com/repos/octo-org/octo-repo/contributors", + "subscribers_url": "https://api.github.com/repos/octo-org/octo-repo/subscribers", + "subscription_url": "https://api.github.com/repos/octo-org/octo-repo/subscription", + "commits_url": "https://api.github.com/repos/octo-org/octo-repo/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/octo-org/octo-repo/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/octo-org/octo-repo/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/octo-org/octo-repo/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/octo-org/octo-repo/contents/{+path}", + "compare_url": "https://api.github.com/repos/octo-org/octo-repo/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/octo-org/octo-repo/merges", + "archive_url": "https://api.github.com/repos/octo-org/octo-repo/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/octo-org/octo-repo/downloads", + "issues_url": "https://api.github.com/repos/octo-org/octo-repo/issues{/number}", + "pulls_url": "https://api.github.com/repos/octo-org/octo-repo/pulls{/number}", + "milestones_url": "https://api.github.com/repos/octo-org/octo-repo/milestones{/number}", + "notifications_url": "https://api.github.com/repos/octo-org/octo-repo/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/octo-org/octo-repo/labels{/name}", + "releases_url": "https://api.github.com/repos/octo-org/octo-repo/releases{/id}", + "deployments_url": "https://api.github.com/repos/octo-org/octo-repo/deployments" + } + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/workflows/42/runs" + }, + { + "lang": "JS", + "source": "octokit.actions.listWorkflowRuns({\n owner: 'octocat',\n repo: 'hello-world',\n workflow_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.workflow_runs(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/assignees": { + "get": { + "summary": "List assignees", + "description": "Lists the [available assignees](https://help.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository.", + "operationId": "issues/list-assignees", + "tags": [ + "issues" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/issues/assignees/#list-assignees" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "example": [ + { + "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 + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/assignees" + }, + { + "lang": "JS", + "source": "octokit.issues.listAssignees({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.assignees(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/assignees/{assignee}": { + "get": { + "summary": "Check assignee", + "description": "Checks if a user has permission to be assigned to an issue in this repository.\n\nIf the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned.\n\nOtherwise a `404` status code is returned.", + "operationId": "issues/check-assignee", + "tags": [ + "issues" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/issues/assignees/#check-assignee" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "assignee", + "description": "assignee parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned." + }, + "404": { + "description": "Otherwise a `404` status code is returned." + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/assignees/ASSIGNEE" + }, + { + "lang": "JS", + "source": "octokit.issues.checkAssignee({\n owner: 'octocat',\n repo: 'hello-world',\n assignee: 'assignee'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.check_assignee(\n 'hello-world',\n 'assignee'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/automated-security-fixes": { + "put": { + "summary": "Enable automated security fixes", + "description": "Enables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see \"[Configuring automated security fixes](https://help.github.com/en/articles/configuring-automated-security-fixes)\" in the GitHub Help documentation.", + "operationId": "repos/enable-automated-security-fixes", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/#enable-automated-security-fixes" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.london-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\n -H\"Accept: application/vnd.github.london-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/automated-security-fixes" + }, + { + "lang": "JS", + "source": "octokit.repos.enableAutomatedSecurityFixes({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.enable_automated_security_fixes(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "london", + "note": "Enabling or disabling automated security fixes is currently available for developers to preview. To access this new endpoint during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.london-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + }, + "delete": { + "summary": "Disable automated security fixes", + "description": "Disables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see \"[Configuring automated security fixes](https://help.github.com/en/articles/configuring-automated-security-fixes)\" in the GitHub Help documentation.", + "operationId": "repos/disable-automated-security-fixes", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/#disable-automated-security-fixes" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.london-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.london-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/automated-security-fixes" + }, + { + "lang": "JS", + "source": "octokit.repos.disableAutomatedSecurityFixes({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.disable_automated_security_fixes(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "london", + "note": "Enabling or disabling automated security fixes is currently available for developers to preview. To access this new endpoint during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.london-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/branches": { + "get": { + "summary": "List branches", + "description": "", + "operationId": "repos/list-branches", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/branches/#list-branches" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "protected", + "description": "Setting to `true` returns only protected branches. When set to `false`, only unprotected branches are returned. Omitting this parameter returns all branches.", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "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": { + "name": { + "type": "string" + }, + "commit": { + "type": "object", + "properties": { + "sha": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "protected": { + "type": "boolean" + }, + "protection": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "required_status_checks": { + "type": "object", + "properties": { + "enforcement_level": { + "type": "string" + }, + "contexts": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "protection_url": { + "type": "string" + } + } + } + }, + "example": [ + { + "name": "master", + "commit": { + "sha": "c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc", + "url": "https://api.github.com/repos/octocat/Hello-World/commits/c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc" + }, + "protected": true, + "protection": { + "enabled": true, + "required_status_checks": { + "enforcement_level": "non_admins", + "contexts": [ + "ci-test", + "linter" + ] + } + }, + "protection_url": "https://api.github.com/repos/octocat/hello-world/branches/master/protection" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches" + }, + { + "lang": "JS", + "source": "octokit.repos.listBranches({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.branches(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/branches/{branch}": { + "get": { + "summary": "Get branch", + "description": "", + "operationId": "repos/get-branch", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/branches/#get-branch" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "branch", + "description": "branch parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "commit": { + "type": "object", + "properties": { + "sha": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "commit": { + "type": "object", + "properties": { + "author": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "date": { + "type": "string" + }, + "email": { + "type": "string" + } + } + }, + "url": { + "type": "string" + }, + "message": { + "type": "string" + }, + "tree": { + "type": "object", + "properties": { + "sha": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "committer": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "date": { + "type": "string" + }, + "email": { + "type": "string" + } + } + }, + "verification": { + "type": "object", + "properties": { + "verified": { + "type": "boolean" + }, + "reason": { + "type": "string" + }, + "signature": { + "type": "string" + }, + "payload": { + "type": "string" + } + } + } + } + }, + "author": { + "type": "object", + "properties": { + "gravatar_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "login": { + "type": "string" + } + } + }, + "parents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "sha": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "required": [ + "sha", + "url" + ] + } + }, + "url": { + "type": "string" + }, + "committer": { + "type": "object", + "properties": { + "gravatar_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "login": { + "type": "string" + } + } + } + } + }, + "_links": { + "type": "object", + "properties": { + "html": { + "type": "string" + }, + "self": { + "type": "string" + } + } + }, + "protected": { + "type": "boolean" + }, + "protection": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "required_status_checks": { + "type": "object", + "properties": { + "enforcement_level": { + "type": "string" + }, + "contexts": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "protection_url": { + "type": "string" + } + } + }, + "example": { + "name": "master", + "commit": { + "sha": "7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "node_id": "MDY6Q29tbWl0N2ZkMWE2MGIwMWY5MWIzMTRmNTk5NTVhNGU0ZDRlODBkOGVkZjExZA==", + "commit": { + "author": { + "name": "The Octocat", + "date": "2012-03-06T15:06:50-08:00", + "email": "octocat@nowhere.com" + }, + "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "message": "Merge pull request #6 from Spaceghost/patch-1\n\nNew line at end of file.", + "tree": { + "sha": "b4eecafa9be2f2006ce1b709d6857b07069b4608", + "url": "https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608" + }, + "committer": { + "name": "The Octocat", + "date": "2012-03-06T15:06:50-08:00", + "email": "octocat@nowhere.com" + }, + "verification": { + "verified": false, + "reason": "unsigned", + "signature": null, + "payload": null + } + }, + "author": { + "gravatar_id": "", + "avatar_url": "https://secure.gravatar.com/avatar/7ad39074b0584bc555d0417ae3e7d974?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", + "url": "https://api.github.com/users/octocat", + "id": 583231, + "login": "octocat" + }, + "parents": [ + { + "sha": "553c2077f0edc3d5dc5d17262f6aa498e69d6f8e", + "url": "https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e" + }, + { + "sha": "762941318ee16e59dabbacb1b4049eec22f0d303", + "url": "https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303" + } + ], + "url": "https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "committer": { + "gravatar_id": "", + "avatar_url": "https://secure.gravatar.com/avatar/7ad39074b0584bc555d0417ae3e7d974?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", + "url": "https://api.github.com/users/octocat", + "id": 583231, + "login": "octocat" + } + }, + "_links": { + "html": "https://github.com/octocat/Hello-World/tree/master", + "self": "https://api.github.com/repos/octocat/Hello-World/branches/master" + }, + "protected": true, + "protection": { + "enabled": true, + "required_status_checks": { + "enforcement_level": "non_admins", + "contexts": [ + "ci-test", + "linter" + ] + } + }, + "protection_url": "https://api.github.com/repos/octocat/hello-world/branches/master/protection" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH" + }, + { + "lang": "JS", + "source": "octokit.repos.getBranch({\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.branch(\n 'hello-world',\n 'branch'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/branches/{branch}/protection": { + "get": { + "summary": "Get branch protection", + "description": "Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.", + "operationId": "repos/get-branch-protection", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/branches/#get-branch-protection" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.luke-cage-preview+json" + }, + "required": false + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "branch", + "description": "branch parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "required_status_checks": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "strict": { + "type": "boolean" + }, + "contexts": { + "type": "array", + "items": { + "type": "string" + } + }, + "contexts_url": { + "type": "string" + } + } + }, + "enforce_admins": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "enabled": { + "type": "boolean" + } + } + }, + "required_pull_request_reviews": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "dismissal_restrictions": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "users_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "users": { + "type": "array", + "items": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "teams": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "privacy": { + "type": "string" + }, + "permission": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + }, + "parent": { + "type": "string" + } + } + } + } + } + }, + "dismiss_stale_reviews": { + "type": "boolean" + }, + "require_code_owner_reviews": { + "type": "boolean" + }, + "required_approving_review_count": { + "type": "number" + } + } + }, + "restrictions": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "users_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "apps_url": { + "type": "string" + }, + "users": { + "type": "array", + "items": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "teams": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "privacy": { + "type": "string" + }, + "permission": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + }, + "parent": { + "type": "string" + } + } + } + }, + "apps": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "slug": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "public_members_url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "external_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "metadata": { + "type": "string" + }, + "contents": { + "type": "string" + }, + "issues": { + "type": "string" + }, + "single_file": { + "type": "string" + } + } + }, + "events": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "required_linear_history": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + } + }, + "allow_force_pushes": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + } + }, + "allow_deletions": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + } + } + } + }, + "example": { + "url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection", + "required_status_checks": { + "url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks", + "strict": true, + "contexts": [ + "continuous-integration/travis-ci" + ], + "contexts_url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks/contexts" + }, + "enforce_admins": { + "url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins", + "enabled": true + }, + "required_pull_request_reviews": { + "url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_pull_request_reviews", + "dismissal_restrictions": { + "url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions", + "users_url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions/users", + "teams_url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions/teams", + "users": [ + { + "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 + } + ], + "teams": [ + { + "id": 1, + "node_id": "MDQ6VGVhbTE=", + "url": "https://api.github.com/teams/1", + "html_url": "https://api.github.com/teams/justice-league", + "name": "Justice League", + "slug": "justice-league", + "description": "A great team.", + "privacy": "closed", + "permission": "admin", + "members_url": "https://api.github.com/teams/1/members{/member}", + "repositories_url": "https://api.github.com/teams/1/repos", + "parent": null + } + ] + }, + "dismiss_stale_reviews": true, + "require_code_owner_reviews": true, + "required_approving_review_count": 2 + }, + "restrictions": { + "url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions", + "users_url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions/users", + "teams_url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions/teams", + "apps_url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions/teams", + "users": [ + { + "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 + } + ], + "teams": [ + { + "id": 1, + "node_id": "MDQ6VGVhbTE=", + "url": "https://api.github.com/teams/1", + "html_url": "https://api.github.com/teams/justice-league", + "name": "Justice League", + "slug": "justice-league", + "description": "A great team.", + "privacy": "closed", + "permission": "admin", + "members_url": "https://api.github.com/teams/1/members{/member}", + "repositories_url": "https://api.github.com/teams/1/repos", + "parent": null + } + ], + "apps": [ + { + "id": 1, + "slug": "octoapp", + "node_id": "MDExOkludGVncmF0aW9uMQ==", + "owner": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization" + }, + "name": "Octocat App", + "description": "", + "external_url": "https://example.com", + "html_url": "https://github.com/apps/octoapp", + "created_at": "2017-07-08T16:18:44-04:00", + "updated_at": "2017-07-08T16:18:44-04:00", + "permissions": { + "metadata": "read", + "contents": "read", + "issues": "write", + "single_file": "write" + }, + "events": [ + "push", + "pull_request" + ] + } + ] + }, + "required_linear_history": { + "enabled": true + }, + "allow_force_pushes": { + "enabled": true + }, + "allow_deletions": { + "enabled": true + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.luke-cage-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection" + }, + { + "lang": "JS", + "source": "octokit.repos.getBranchProtection({\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.branch_protection(\n 'hello-world',\n 'branch'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.luke-cage-preview+json\n\n```", + "required": false + } + ] + }, + "x-changes": [] + }, + "put": { + "summary": "Update branch protection", + "description": "Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nProtecting a branch requires admin or owner permissions to the repository.\n\n**Note**: Passing new arrays of `users` and `teams` replaces their previous values.\n\n**Note**: The list of users, apps, and teams in total is limited to 100 items.", + "operationId": "repos/update-branch-protection", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/branches/#update-branch-protection" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.luke-cage-preview+json" + }, + "required": false + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "branch", + "description": "branch parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "required_status_checks": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "strict": { + "type": "boolean" + }, + "contexts": { + "type": "array", + "items": { + "type": "string" + } + }, + "contexts_url": { + "type": "string" + } + } + }, + "enforce_admins": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "enabled": { + "type": "boolean" + } + } + }, + "required_pull_request_reviews": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "dismissal_restrictions": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "users_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "users": { + "type": "array", + "items": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "teams": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "privacy": { + "type": "string" + }, + "permission": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + }, + "parent": { + "type": "string" + } + } + } + } + } + }, + "dismiss_stale_reviews": { + "type": "boolean" + }, + "require_code_owner_reviews": { + "type": "boolean" + }, + "required_approving_review_count": { + "type": "number" + } + } + }, + "restrictions": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "users_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "apps_url": { + "type": "string" + }, + "users": { + "type": "array", + "items": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "teams": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "privacy": { + "type": "string" + }, + "permission": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + }, + "parent": { + "type": "string" + } + } + } + }, + "apps": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "slug": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "public_members_url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "external_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "metadata": { + "type": "string" + }, + "contents": { + "type": "string" + }, + "issues": { + "type": "string" + }, + "single_file": { + "type": "string" + } + } + }, + "events": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "required_linear_history": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + } + }, + "allow_force_pushes": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + } + }, + "allow_deletions": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + } + } + } + }, + "example": { + "url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection", + "required_status_checks": { + "url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks", + "strict": true, + "contexts": [ + "continuous-integration/travis-ci" + ], + "contexts_url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks/contexts" + }, + "enforce_admins": { + "url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins", + "enabled": true + }, + "required_pull_request_reviews": { + "url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_pull_request_reviews", + "dismissal_restrictions": { + "url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions", + "users_url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions/users", + "teams_url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions/teams", + "users": [ + { + "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 + } + ], + "teams": [ + { + "id": 1, + "node_id": "MDQ6VGVhbTE=", + "url": "https://api.github.com/teams/1", + "html_url": "https://api.github.com/teams/justice-league", + "name": "Justice League", + "slug": "justice-league", + "description": "A great team.", + "privacy": "closed", + "permission": "admin", + "members_url": "https://api.github.com/teams/1/members{/member}", + "repositories_url": "https://api.github.com/teams/1/repos", + "parent": null + } + ] + }, + "dismiss_stale_reviews": true, + "require_code_owner_reviews": true, + "required_approving_review_count": 2 + }, + "restrictions": { + "url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions", + "users_url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions/users", + "teams_url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions/teams", + "apps_url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions/teams", + "users": [ + { + "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 + } + ], + "teams": [ + { + "id": 1, + "node_id": "MDQ6VGVhbTE=", + "url": "https://api.github.com/teams/1", + "html_url": "https://api.github.com/teams/justice-league", + "name": "Justice League", + "slug": "justice-league", + "description": "A great team.", + "privacy": "closed", + "permission": "admin", + "members_url": "https://api.github.com/teams/1/members{/member}", + "repositories_url": "https://api.github.com/teams/1/repos", + "parent": null + } + ], + "apps": [ + { + "id": 1, + "slug": "octoapp", + "node_id": "MDExOkludGVncmF0aW9uMQ==", + "owner": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization" + }, + "name": "Octocat App", + "description": "", + "external_url": "https://example.com", + "html_url": "https://github.com/apps/octoapp", + "created_at": "2017-07-08T16:18:44-04:00", + "updated_at": "2017-07-08T16:18:44-04:00", + "permissions": { + "metadata": "read", + "contents": "read", + "issues": "write", + "single_file": "write" + }, + "events": [ + "push", + "pull_request" + ] + } + ] + }, + "required_linear_history": { + "enabled": true + }, + "allow_force_pushes": { + "enabled": true + }, + "allow_deletions": { + "enabled": true + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\n -H\"Accept: application/vnd.github.luke-cage-preview+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\"]}}'" + }, + { + "lang": "JS", + "source": "octokit.repos.updateBranchProtection({\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})" + }, + { + "lang": "Ruby", + "source": "octokit.update_branch_protection(\n 'hello-world',\n 'branch',\n {\n strict: true,\n contexts: [\n 'contexts'\n ]\n },\n true,\n {\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 {\n users: [\n 'users'\n ],\n teams: [\n 'teams'\n ],\n apps: [\n 'apps'\n ]\n }\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.luke-cage-preview+json\n\n```", + "required": false + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "required_status_checks": { + "type": "object", + "description": "Require status checks to pass before merging. Set to `null` to disable.", + "nullable": true, + "properties": { + "strict": { + "type": "boolean", + "description": "Require branches to be up to date before merging." + }, + "contexts": { + "type": "array", + "description": "The list of status checks to require in order to merge into this branch", + "items": { + "type": "string" + } + } + }, + "required": [ + "strict", + "contexts" + ] + }, + "enforce_admins": { + "type": "boolean", + "description": "Enforce all configured restrictions for administrators. Set to `true` to enforce required status checks for repository administrators. Set to `null` to disable.", + "nullable": true + }, + "required_pull_request_reviews": { + "type": "object", + "description": "Require at least one approving review on a pull request, before merging. Set to `null` to disable.", + "nullable": true, + "properties": { + "dismissal_restrictions": { + "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.", + "properties": { + "users": { + "type": "array", + "description": "The list of user `login`s with dismissal access", + "items": { + "type": "string" + } + }, + "teams": { + "type": "array", + "description": "The list of team `slug`s with dismissal access", + "items": { + "type": "string" + } + } + } + }, + "dismiss_stale_reviews": { + "type": "boolean", + "description": "Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit." + }, + "require_code_owner_reviews": { + "type": "boolean", + "description": "Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) review them." + }, + "required_approving_review_count": { + "type": "integer", + "description": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6." + } + } + }, + "restrictions": { + "type": "object", + "description": "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.", + "nullable": true, + "properties": { + "users": { + "type": "array", + "description": "The list of user `login`s with push access", + "items": { + "type": "string" + } + }, + "teams": { + "type": "array", + "description": "The list of team `slug`s with push access", + "items": { + "type": "string" + } + }, + "apps": { + "type": "array", + "description": "The list of app `slug`s with push access", + "items": { + "type": "string" + } + } + }, + "required": [ + "users", + "teams" + ] + }, + "required_linear_history": { + "type": "boolean", + "description": "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](https://help.github.com/github/administering-a-repository/requiring-a-linear-commit-history)\" in the GitHub Help documentation." + }, + "allow_force_pushes": { + "type": "boolean", + "description": "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](https://help.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)\" in the GitHub Help documentation.\"", + "nullable": true + }, + "allow_deletions": { + "type": "boolean", + "description": "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](https://help.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)\" in the GitHub Help documentation." + } + }, + "required": [ + "required_status_checks", + "enforce_admins", + "required_pull_request_reviews", + "restrictions" + ] + }, + "example": { + "required_status_checks": { + "strict": true, + "contexts": [ + "continuous-integration/travis-ci" + ] + }, + "enforce_admins": true, + "required_pull_request_reviews": { + "dismissal_restrictions": { + "users": [ + "octocat" + ], + "teams": [ + "justice-league" + ] + }, + "dismiss_stale_reviews": true, + "require_code_owner_reviews": true, + "required_approving_review_count": 2 + }, + "restrictions": { + "users": [ + "octocat" + ], + "teams": [ + "justice-league" + ], + "apps": [ + "super-ci" + ] + }, + "required_linear_history": true, + "allow_force_pushes": true, + "allow_deletions": true + } + } + } + } + }, + "delete": { + "summary": "Remove branch protection", + "description": "Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.", + "operationId": "repos/remove-branch-protection", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/branches/#remove-branch-protection" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "branch", + "description": "branch parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection" + }, + { + "lang": "JS", + "source": "octokit.repos.removeBranchProtection({\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.remove_branch_protection(\n 'hello-world',\n 'branch'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": { + "get": { + "summary": "Get admin enforcement of protected branch", + "description": "Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.", + "operationId": "repos/get-protected-branch-admin-enforcement", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/branches/#get-admin-enforcement-of-protected-branch" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "branch", + "description": "branch parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "enabled": { + "type": "boolean" + } + } + }, + "example": { + "url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins", + "enabled": true + } + } + } + } + }, + "x-code-samples": [ + { + "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" + }, + { + "lang": "JS", + "source": "octokit.repos.getProtectedBranchAdminEnforcement({\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.protected_branch_admin_enforcement(\n 'hello-world',\n 'branch'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "post": { + "summary": "Add admin enforcement of protected branch", + "description": "Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nAdding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled.", + "operationId": "repos/add-protected-branch-admin-enforcement", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/branches/#add-admin-enforcement-of-protected-branch" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "branch", + "description": "branch parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "enabled": { + "type": "boolean" + } + } + }, + "example": { + "url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins", + "enabled": true + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/enforce_admins" + }, + { + "lang": "JS", + "source": "octokit.repos.addProtectedBranchAdminEnforcement({\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.add_protected_branch_admin_enforcement(\n 'hello-world',\n 'branch'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "delete": { + "summary": "Remove admin enforcement of protected branch", + "description": "Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nRemoving admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled.", + "operationId": "repos/remove-protected-branch-admin-enforcement", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/branches/#remove-admin-enforcement-of-protected-branch" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "branch", + "description": "branch parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "418": { + "description": "Response definition missing" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/enforce_admins" + }, + { + "lang": "JS", + "source": "octokit.repos.removeProtectedBranchAdminEnforcement({\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.remove_protected_branch_admin_enforcement(\n 'hello-world',\n 'branch'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": { + "get": { + "summary": "Get pull request review enforcement of protected branch", + "description": "Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.", + "operationId": "repos/get-protected-branch-pull-request-review-enforcement", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/branches/#get-pull-request-review-enforcement-of-protected-branch" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.luke-cage-preview+json" + }, + "required": false + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "branch", + "description": "branch parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/vnd.github.luke-cage-preview+json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "dismissal_restrictions": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "users_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "users": { + "type": "array", + "items": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "teams": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "privacy": { + "type": "string" + }, + "permission": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + }, + "parent": { + "type": "string" + } + } + } + } + } + }, + "dismiss_stale_reviews": { + "type": "boolean" + }, + "require_code_owner_reviews": { + "type": "boolean" + }, + "required_approving_review_count": { + "type": "number" + } + } + }, + "example": { + "url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_pull_request_reviews", + "dismissal_restrictions": { + "url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions", + "users_url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions/users", + "teams_url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions/teams", + "users": [ + { + "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 + } + ], + "teams": [ + { + "id": 1, + "node_id": "MDQ6VGVhbTE=", + "url": "https://api.github.com/teams/1", + "html_url": "https://api.github.com/teams/justice-league", + "name": "Justice League", + "slug": "justice-league", + "description": "A great team.", + "privacy": "closed", + "permission": "admin", + "members_url": "https://api.github.com/teams/1/members{/member}", + "repositories_url": "https://api.github.com/teams/1/repos", + "parent": null + } + ] + }, + "dismiss_stale_reviews": true, + "require_code_owner_reviews": true, + "required_approving_review_count": 2 + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.luke-cage-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_pull_request_reviews" + }, + { + "lang": "JS", + "source": "octokit.repos.getProtectedBranchPullRequestReviewEnforcement({\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.protected_branch_pull_request_review_enforcement(\n 'hello-world',\n 'branch'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.luke-cage-preview+json\n\n```", + "required": false + } + ] + }, + "x-changes": [] + }, + "patch": { + "summary": "Update pull request review enforcement of protected branch", + "description": "Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nUpdating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled.\n\n**Note**: Passing new arrays of `users` and `teams` replaces their previous values.", + "operationId": "repos/update-protected-branch-pull-request-review-enforcement", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/branches/#update-pull-request-review-enforcement-of-protected-branch" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.luke-cage-preview+json" + }, + "required": false + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "branch", + "description": "branch parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "dismissal_restrictions": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "users_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "users": { + "type": "array", + "items": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "teams": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "privacy": { + "type": "string" + }, + "permission": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + }, + "parent": { + "type": "string" + } + } + } + } + } + }, + "dismiss_stale_reviews": { + "type": "boolean" + }, + "require_code_owner_reviews": { + "type": "boolean" + }, + "required_approving_review_count": { + "type": "number" + } + } + }, + "example": { + "url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_pull_request_reviews", + "dismissal_restrictions": { + "url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions", + "users_url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions/users", + "teams_url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions/teams", + "users": [ + { + "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 + } + ], + "teams": [ + { + "id": 1, + "node_id": "MDQ6VGVhbTE=", + "url": "https://api.github.com/teams/1", + "html_url": "https://api.github.com/teams/justice-league", + "name": "Justice League", + "slug": "justice-league", + "description": "A great team.", + "privacy": "closed", + "permission": "admin", + "members_url": "https://api.github.com/teams/1/members{/member}", + "repositories_url": "https://api.github.com/teams/1/repos", + "parent": null + } + ] + }, + "dismiss_stale_reviews": true, + "require_code_owner_reviews": true, + "required_approving_review_count": 2 + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\n -H\"Accept: application/vnd.github.luke-cage-preview+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\"]}}'" + }, + { + "lang": "JS", + "source": "octokit.repos.updateProtectedBranchPullRequestReviewEnforcement({\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})" + }, + { + "lang": "Ruby", + "source": "octokit.update_protected_branch_pull_request_review_enforcement(\n 'hello-world',\n 'branch',\n {\n users: [\n 'users'\n ],\n teams: [\n 'teams'\n ]\n }\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.luke-cage-preview+json\n\n```", + "required": false + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "dismissal_restrictions": { + "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.", + "properties": { + "users": { + "type": "array", + "description": "The list of user `login`s with dismissal access", + "items": { + "type": "string" + } + }, + "teams": { + "type": "array", + "description": "The list of team `slug`s with dismissal access", + "items": { + "type": "string" + } + } + } + }, + "dismiss_stale_reviews": { + "type": "boolean", + "description": "Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit." + }, + "require_code_owner_reviews": { + "type": "boolean", + "description": "Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) have reviewed." + }, + "required_approving_review_count": { + "type": "integer", + "description": "Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6." + } + } + }, + "example": { + "dismissal_restrictions": { + "users": [ + "octocat" + ], + "teams": [ + "justice-league" + ] + }, + "dismiss_stale_reviews": true, + "require_code_owner_reviews": true, + "required_approving_review_count": 2 + } + } + } + } + }, + "delete": { + "summary": "Remove pull request review enforcement of protected branch", + "description": "Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.", + "operationId": "repos/remove-protected-branch-pull-request-review-enforcement", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/branches/#remove-pull-request-review-enforcement-of-protected-branch" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "branch", + "description": "branch parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "418": { + "description": "Response definition missing" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_pull_request_reviews" + }, + { + "lang": "JS", + "source": "octokit.repos.removeProtectedBranchPullRequestReviewEnforcement({\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.remove_protected_branch_pull_request_review_enforcement(\n 'hello-world',\n 'branch'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": { + "get": { + "summary": "Get required signatures of protected branch", + "description": "Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\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](https://help.github.com/articles/signing-commits-with-gpg) in GitHub Help.\n\n**Note**: You must enable branch protection to require signed commits.", + "operationId": "repos/get-protected-branch-required-signatures", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/branches/#get-required-signatures-of-protected-branch" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.zzzax-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "branch", + "description": "branch parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "enabled": { + "type": "boolean" + } + } + }, + "example": { + "url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_signatures", + "enabled": true + } + } + } + } + }, + "x-code-samples": [ + { + "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" + }, + { + "lang": "JS", + "source": "octokit.repos.getProtectedBranchRequiredSignatures({\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.protected_branch_required_signatures(\n 'hello-world',\n 'branch'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "zzzax", + "note": "Protected Branches API can now manage a setting for requiring signed commits. This feature is currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2018-02-22-protected-branches-required-signatures) for full details. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.zzzax-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + }, + "post": { + "summary": "Add required signatures of protected branch", + "description": "Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\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.", + "operationId": "repos/add-protected-branch-required-signatures", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/branches/#add-required-signatures-of-protected-branch" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.zzzax-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "branch", + "description": "branch parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "enabled": { + "type": "boolean" + } + } + }, + "example": { + "url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_signatures", + "enabled": true + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.zzzax-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_signatures" + }, + { + "lang": "JS", + "source": "octokit.repos.addProtectedBranchRequiredSignatures({\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.add_protected_branch_required_signatures(\n 'hello-world',\n 'branch'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "zzzax", + "note": "Protected Branches API can now manage a setting for requiring signed commits. This feature is currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2018-02-22-protected-branches-required-signatures) for full details. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.zzzax-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + }, + "delete": { + "summary": "Remove required signatures of protected branch", + "description": "Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\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.", + "operationId": "repos/remove-protected-branch-required-signatures", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/branches/#remove-required-signatures-of-protected-branch" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.zzzax-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "branch", + "description": "branch parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "418": { + "description": "Response definition missing" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.zzzax-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_signatures" + }, + { + "lang": "JS", + "source": "octokit.repos.removeProtectedBranchRequiredSignatures({\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.remove_protected_branch_required_signatures(\n 'hello-world',\n 'branch'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "zzzax", + "note": "Protected Branches API can now manage a setting for requiring signed commits. This feature is currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2018-02-22-protected-branches-required-signatures) for full details. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.zzzax-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": { + "get": { + "summary": "Get required status checks of protected branch", + "description": "Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.", + "operationId": "repos/get-protected-branch-required-status-checks", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/branches/#get-required-status-checks-of-protected-branch" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "branch", + "description": "branch parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "strict": { + "type": "boolean" + }, + "contexts": { + "type": "array", + "items": { + "type": "string" + } + }, + "contexts_url": { + "type": "string" + } + } + }, + "example": { + "url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks", + "strict": true, + "contexts": [ + "continuous-integration/travis-ci" + ], + "contexts_url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks/contexts" + } + } + } + } + }, + "x-code-samples": [ + { + "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" + }, + { + "lang": "JS", + "source": "octokit.repos.getProtectedBranchRequiredStatusChecks({\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.protected_branch_required_status_checks(\n 'hello-world',\n 'branch'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "patch": { + "summary": "Update required status checks of protected branch", + "description": "Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nUpdating required status checks requires admin or owner permissions to the repository and branch protection to be enabled.", + "operationId": "repos/update-protected-branch-required-status-checks", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/branches/#update-required-status-checks-of-protected-branch" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "branch", + "description": "branch parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "strict": { + "type": "boolean" + }, + "contexts": { + "type": "array", + "items": { + "type": "string" + } + }, + "contexts_url": { + "type": "string" + } + } + }, + "example": { + "url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks", + "strict": true, + "contexts": [ + "continuous-integration/travis-ci" + ], + "contexts_url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks/contexts" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\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}'" + }, + { + "lang": "JS", + "source": "octokit.repos.updateProtectedBranchRequiredStatusChecks({\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch',\n strict: true\n})" + }, + { + "lang": "Ruby", + "source": "octokit.update_protected_branch_required_status_checks(\n 'hello-world',\n 'branch',\n true\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "strict": { + "type": "boolean", + "description": "Require branches to be up to date before merging." + }, + "contexts": { + "type": "array", + "description": "The list of status checks to require in order to merge into this branch", + "items": { + "type": "string" + } + } + } + }, + "example": { + "strict": true, + "contexts": [ + "continuous-integration/travis-ci" + ] + } + } + } + } + }, + "delete": { + "summary": "Remove required status checks of protected branch", + "description": "Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.", + "operationId": "repos/remove-protected-branch-required-status-checks", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/branches/#remove-required-status-checks-of-protected-branch" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "branch", + "description": "branch parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "418": { + "description": "Response definition missing" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checks" + }, + { + "lang": "JS", + "source": "octokit.repos.removeProtectedBranchRequiredStatusChecks({\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.remove_protected_branch_required_status_checks(\n 'hello-world',\n 'branch'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": { + "get": { + "summary": "List required status checks contexts of protected branch", + "description": "Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.", + "operationId": "repos/list-protected-branch-required-status-checks-contexts", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/branches/#list-required-status-checks-contexts-of-protected-branch" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "branch", + "description": "branch parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": [ + "continuous-integration/travis-ci" + ] + } + } + } + }, + "x-code-samples": [ + { + "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" + }, + { + "lang": "JS", + "source": "octokit.repos.listProtectedBranchRequiredStatusChecksContexts({\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.protected_branch_required_status_checks_contexts(\n 'hello-world',\n 'branch'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "put": { + "summary": "Replace required status checks contexts of protected branch", + "description": "Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.", + "operationId": "repos/replace-protected-branch-required-status-checks-contexts", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/branches/#replace-required-status-checks-contexts-of-protected-branch" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "branch", + "description": "branch parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": [ + "continuous-integration/travis-ci" + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\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\"]}'" + }, + { + "lang": "JS", + "source": "octokit.repos.replaceProtectedBranchRequiredStatusChecksContexts({\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch',\n contexts: [\n 'contexts'\n ]\n})" + }, + { + "lang": "Ruby", + "source": "octokit.replace_protected_branch_required_status_checks_contexts(\n 'hello-world',\n 'branch',\n [\n 'contexts'\n ]\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "requestBodyParameterName": "contexts", + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "description": "contexts parameter", + "items": { + "type": "string" + } + } + } + } + } + }, + "post": { + "summary": "Add required status checks contexts of protected branch", + "description": "Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.", + "operationId": "repos/add-protected-branch-required-status-checks-contexts", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/branches/#add-required-status-checks-contexts-of-protected-branch" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "branch", + "description": "branch parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": [ + "continuous-integration/travis-ci", + "continuous-integration/jenkins" + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\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\"]}'" + }, + { + "lang": "JS", + "source": "octokit.repos.addProtectedBranchRequiredStatusChecksContexts({\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch',\n contexts: [\n 'contexts'\n ]\n})" + }, + { + "lang": "Ruby", + "source": "octokit.add_protected_branch_required_status_checks_contexts(\n 'hello-world',\n 'branch',\n [\n 'contexts'\n ]\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "requestBodyParameterName": "contexts", + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "description": "contexts parameter", + "items": { + "type": "string" + } + } + } + } + } + }, + "delete": { + "summary": "Remove required status checks contexts of protected branch", + "description": "Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.", + "operationId": "repos/remove-protected-branch-required-status-checks-contexts", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/branches/#remove-required-status-checks-contexts-of-protected-branch" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "branch", + "description": "branch parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": [ + "continuous-integration/travis-ci" + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\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\"]}'" + }, + { + "lang": "JS", + "source": "octokit.repos.removeProtectedBranchRequiredStatusChecksContexts({\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch',\n contexts: [\n 'contexts'\n ]\n})" + }, + { + "lang": "Ruby", + "source": "octokit.remove_protected_branch_required_status_checks_contexts(\n 'hello-world',\n 'branch',\n [\n 'contexts'\n ]\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "requestBodyParameterName": "contexts", + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "description": "contexts parameter", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions": { + "get": { + "summary": "Get restrictions of protected branch", + "description": "Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nLists who has access to this protected branch. {{#note}}\n\n**Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories.", + "operationId": "repos/get-protected-branch-restrictions", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/branches/#get-restrictions-of-protected-branch" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "branch", + "description": "branch parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "users_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "apps_url": { + "type": "string" + }, + "users": { + "type": "array", + "items": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "teams": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "privacy": { + "type": "string" + }, + "permission": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + }, + "parent": { + "type": "string" + } + } + } + }, + "apps": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "slug": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "public_members_url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "external_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "metadata": { + "type": "string" + }, + "contents": { + "type": "string" + }, + "issues": { + "type": "string" + }, + "single_file": { + "type": "string" + } + } + }, + "events": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "example": { + "url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions", + "users_url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions/users", + "teams_url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions/teams", + "apps_url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions/teams", + "users": [ + { + "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 + } + ], + "teams": [ + { + "id": 1, + "node_id": "MDQ6VGVhbTE=", + "url": "https://api.github.com/teams/1", + "html_url": "https://api.github.com/teams/justice-league", + "name": "Justice League", + "slug": "justice-league", + "description": "A great team.", + "privacy": "closed", + "permission": "admin", + "members_url": "https://api.github.com/teams/1/members{/member}", + "repositories_url": "https://api.github.com/teams/1/repos", + "parent": null + } + ], + "apps": [ + { + "id": 1, + "slug": "octoapp", + "node_id": "MDExOkludGVncmF0aW9uMQ==", + "owner": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization" + }, + "name": "Octocat App", + "description": "", + "external_url": "https://example.com", + "html_url": "https://github.com/apps/octoapp", + "created_at": "2017-07-08T16:18:44-04:00", + "updated_at": "2017-07-08T16:18:44-04:00", + "permissions": { + "metadata": "read", + "contents": "read", + "issues": "write", + "single_file": "write" + }, + "events": [ + "push", + "pull_request" + ] + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "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" + }, + { + "lang": "JS", + "source": "octokit.repos.getProtectedBranchRestrictions({\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.protected_branch_restrictions(\n 'hello-world',\n 'branch'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "delete": { + "summary": "Remove restrictions of protected branch", + "description": "Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nDisables the ability to restrict who can push to this branch.", + "operationId": "repos/remove-protected-branch-restrictions", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/branches/#remove-restrictions-of-protected-branch" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "branch", + "description": "branch parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "418": { + "description": "Response definition missing" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions" + }, + { + "lang": "JS", + "source": "octokit.repos.removeProtectedBranchRestrictions({\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.remove_protected_branch_restrictions(\n 'hello-world',\n 'branch'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": { + "get": { + "summary": "Get apps with access to protected branch", + "description": "Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\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.", + "operationId": "repos/get-apps-with-access-to-protected-branch", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/branches/#list-apps-with-access-to-protected-branch" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "branch", + "description": "branch parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "slug": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "public_members_url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "external_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "metadata": { + "type": "string" + }, + "contents": { + "type": "string" + }, + "issues": { + "type": "string" + }, + "single_file": { + "type": "string" + } + } + }, + "events": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "example": [ + { + "id": 1, + "slug": "octoapp", + "node_id": "MDExOkludGVncmF0aW9uMQ==", + "owner": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization" + }, + "name": "Octocat App", + "description": "", + "external_url": "https://example.com", + "html_url": "https://github.com/apps/octoapp", + "created_at": "2017-07-08T16:18:44-04:00", + "updated_at": "2017-07-08T16:18:44-04:00", + "permissions": { + "metadata": "read", + "contents": "read", + "issues": "write", + "single_file": "write" + }, + "events": [ + "push", + "pull_request" + ] + } + ] + } + } + } + }, + "x-code-samples": [ + { + "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" + }, + { + "lang": "JS", + "source": "octokit.repos.getAppsWithAccessToProtectedBranch({\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.apps_with_access_to_protected_branch(\n 'hello-world',\n 'branch'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "operation", + "date": "2019-09-13", + "note": "\"List apps with access to protected branch\" is now \"Get apps with access to protected branch\"", + "before": { + "operationId": "repos/list-apps-with-access-to-protected-branch" + }, + "after": { + "operationId": "repos/get-apps-with-access-to-protected-branch" + } + } + ] + }, + "put": { + "summary": "Replace app restrictions of protected branch", + "description": "Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\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.\n\n| Type | Description |\n| ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `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. |", + "operationId": "repos/replace-protected-branch-app-restrictions", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/branches/#replace-app-restrictions-of-protected-branch" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "branch", + "description": "branch parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "slug": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "public_members_url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "external_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "metadata": { + "type": "string" + }, + "contents": { + "type": "string" + }, + "issues": { + "type": "string" + }, + "single_file": { + "type": "string" + } + } + }, + "events": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "example": [ + { + "id": 1, + "slug": "octoapp", + "node_id": "MDExOkludGVncmF0aW9uMQ==", + "owner": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization" + }, + "name": "Octocat App", + "description": "", + "external_url": "https://example.com", + "html_url": "https://github.com/apps/octoapp", + "created_at": "2017-07-08T16:18:44-04:00", + "updated_at": "2017-07-08T16:18:44-04:00", + "permissions": { + "metadata": "read", + "contents": "read", + "issues": "write", + "single_file": "write" + }, + "events": [ + "push", + "pull_request" + ] + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\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\"]}'" + }, + { + "lang": "JS", + "source": "octokit.repos.replaceProtectedBranchAppRestrictions({\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch',\n apps: [\n 'apps'\n ]\n})" + }, + { + "lang": "Ruby", + "source": "octokit.replace_protected_branch_app_restrictions(\n 'hello-world',\n 'branch',\n [\n 'apps'\n ]\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "requestBodyParameterName": "apps", + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "description": "apps parameter", + "items": { + "type": "string" + } + } + } + } + } + }, + "post": { + "summary": "Add app restrictions of protected branch", + "description": "Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\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.\n\n| Type | Description |\n| ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `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. |", + "operationId": "repos/add-protected-branch-app-restrictions", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/branches/#add-app-restrictions-of-protected-branch" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "branch", + "description": "branch parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "slug": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "public_members_url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "external_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "metadata": { + "type": "string" + }, + "contents": { + "type": "string" + }, + "issues": { + "type": "string" + }, + "single_file": { + "type": "string" + } + } + }, + "events": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "example": [ + { + "id": 1, + "slug": "octoapp", + "node_id": "MDExOkludGVncmF0aW9uMQ==", + "owner": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization" + }, + "name": "Octocat App", + "description": "", + "external_url": "https://example.com", + "html_url": "https://github.com/apps/octoapp", + "created_at": "2017-07-08T16:18:44-04:00", + "updated_at": "2017-07-08T16:18:44-04:00", + "permissions": { + "metadata": "read", + "contents": "read", + "issues": "write", + "single_file": "write" + }, + "events": [ + "push", + "pull_request" + ] + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\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\"]}'" + }, + { + "lang": "JS", + "source": "octokit.repos.addProtectedBranchAppRestrictions({\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch',\n apps: [\n 'apps'\n ]\n})" + }, + { + "lang": "Ruby", + "source": "octokit.add_protected_branch_app_restrictions(\n 'hello-world',\n 'branch',\n [\n 'apps'\n ]\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "requestBodyParameterName": "apps", + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "description": "apps parameter", + "items": { + "type": "string" + } + } + } + } + } + }, + "delete": { + "summary": "Remove app restrictions of protected branch", + "description": "Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\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.\n\n| Type | Description |\n| ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `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. |", + "operationId": "repos/remove-protected-branch-app-restrictions", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/branches/#remove-app-restrictions-of-protected-branch" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "branch", + "description": "branch parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "slug": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "public_members_url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "external_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "metadata": { + "type": "string" + }, + "contents": { + "type": "string" + }, + "issues": { + "type": "string" + }, + "single_file": { + "type": "string" + } + } + }, + "events": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "example": [ + { + "id": 1, + "slug": "octoapp", + "node_id": "MDExOkludGVncmF0aW9uMQ==", + "owner": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization" + }, + "name": "Octocat App", + "description": "", + "external_url": "https://example.com", + "html_url": "https://github.com/apps/octoapp", + "created_at": "2017-07-08T16:18:44-04:00", + "updated_at": "2017-07-08T16:18:44-04:00", + "permissions": { + "metadata": "read", + "contents": "read", + "issues": "write", + "single_file": "write" + }, + "events": [ + "push", + "pull_request" + ] + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\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\"]}'" + }, + { + "lang": "JS", + "source": "octokit.repos.removeProtectedBranchAppRestrictions({\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch',\n apps: [\n 'apps'\n ]\n})" + }, + { + "lang": "Ruby", + "source": "octokit.remove_protected_branch_app_restrictions(\n 'hello-world',\n 'branch',\n [\n 'apps'\n ]\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "requestBodyParameterName": "apps", + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "description": "apps parameter", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": { + "get": { + "summary": "Get teams with access to protected branch", + "description": "Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nLists the teams who have push access to this branch. The list includes child teams.", + "operationId": "repos/get-teams-with-access-to-protected-branch", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/branches/#list-teams-with-access-to-protected-branch" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "branch", + "description": "branch parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "privacy": { + "type": "string" + }, + "permission": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + }, + "parent": { + "type": "string" + } + } + } + }, + "example": [ + { + "id": 1, + "node_id": "MDQ6VGVhbTE=", + "url": "https://api.github.com/teams/1", + "html_url": "https://api.github.com/teams/justice-league", + "name": "Justice League", + "slug": "justice-league", + "description": "A great team.", + "privacy": "closed", + "permission": "admin", + "members_url": "https://api.github.com/teams/1/members{/member}", + "repositories_url": "https://api.github.com/teams/1/repos", + "parent": null + } + ] + } + } + } + }, + "x-code-samples": [ + { + "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" + }, + { + "lang": "JS", + "source": "octokit.repos.getTeamsWithAccessToProtectedBranch({\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.teams_with_access_to_protected_branch(\n 'hello-world',\n 'branch'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "operation", + "date": "2019-09-09", + "note": "\"List team restrictions of protected branch\" is now \"Get teams with access to protected branch\"", + "before": { + "operationId": "repos/list-protected-branch-team-restrictions" + }, + "after": { + "operationId": "repos/get-teams-with-access-to-protected-branch" + } + }, + { + "type": "operation", + "date": "2019-09-13", + "note": "\"List teams with access to protected branch\" is now \"Get teams with access to protected branch\"", + "before": { + "operationId": "repos/list-teams-with-access-to-protected-branch" + }, + "after": { + "operationId": "repos/get-teams-with-access-to-protected-branch" + } + } + ] + }, + "put": { + "summary": "Replace team restrictions of protected branch", + "description": "Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\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| Type | Description |\n| ------- | ------------------------------------------------------------------------------------------------------------------------------------------ |\n| `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. |", + "operationId": "repos/replace-protected-branch-team-restrictions", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/branches/#replace-team-restrictions-of-protected-branch" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "branch", + "description": "branch parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "privacy": { + "type": "string" + }, + "permission": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + }, + "parent": { + "type": "string" + } + } + } + }, + "example": [ + { + "id": 1, + "node_id": "MDQ6VGVhbTE=", + "url": "https://api.github.com/teams/1", + "html_url": "https://api.github.com/teams/justice-league", + "name": "Justice League", + "slug": "justice-league", + "description": "A great team.", + "privacy": "closed", + "permission": "admin", + "members_url": "https://api.github.com/teams/1/members{/member}", + "repositories_url": "https://api.github.com/teams/1/repos", + "parent": null + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\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\"]}'" + }, + { + "lang": "JS", + "source": "octokit.repos.replaceProtectedBranchTeamRestrictions({\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch',\n teams: [\n 'teams'\n ]\n})" + }, + { + "lang": "Ruby", + "source": "octokit.replace_protected_branch_team_restrictions(\n 'hello-world',\n 'branch',\n [\n 'teams'\n ]\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "requestBodyParameterName": "teams", + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "description": "teams parameter", + "items": { + "type": "string" + } + } + } + } + } + }, + "post": { + "summary": "Add team restrictions of protected branch", + "description": "Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nGrants the specified teams push access for this branch. You can also give push access to child teams.\n\n| Type | Description |\n| ------- | ------------------------------------------------------------------------------------------------------------------------------------------ |\n| `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. |", + "operationId": "repos/add-protected-branch-team-restrictions", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/branches/#add-team-restrictions-of-protected-branch" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "branch", + "description": "branch parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "privacy": { + "type": "string" + }, + "permission": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + }, + "parent": { + "type": "string" + } + } + } + }, + "example": [ + { + "id": 1, + "node_id": "MDQ6VGVhbTE=", + "url": "https://api.github.com/teams/1", + "html_url": "https://api.github.com/teams/justice-league", + "name": "Justice League", + "slug": "justice-league", + "description": "A great team.", + "privacy": "closed", + "permission": "admin", + "members_url": "https://api.github.com/teams/1/members{/member}", + "repositories_url": "https://api.github.com/teams/1/repos", + "parent": null + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\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\"]}'" + }, + { + "lang": "JS", + "source": "octokit.repos.addProtectedBranchTeamRestrictions({\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch',\n teams: [\n 'teams'\n ]\n})" + }, + { + "lang": "Ruby", + "source": "octokit.add_protected_branch_team_restrictions(\n 'hello-world',\n 'branch',\n [\n 'teams'\n ]\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "requestBodyParameterName": "teams", + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "description": "teams parameter", + "items": { + "type": "string" + } + } + } + } + } + }, + "delete": { + "summary": "Remove team restrictions of protected branch", + "description": "Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nRemoves the ability of a team to push to this branch. You can also remove push access for child teams.\n\n| Type | Description |\n| ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `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. |", + "operationId": "repos/remove-protected-branch-team-restrictions", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/branches/#remove-team-restrictions-of-protected-branch" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "branch", + "description": "branch parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "privacy": { + "type": "string" + }, + "permission": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + }, + "parent": { + "type": "string" + } + } + } + }, + "example": [ + { + "id": 1, + "node_id": "MDQ6VGVhbTE=", + "url": "https://api.github.com/teams/1", + "html_url": "https://api.github.com/teams/justice-league", + "name": "Justice League", + "slug": "justice-league", + "description": "A great team.", + "privacy": "closed", + "permission": "admin", + "members_url": "https://api.github.com/teams/1/members{/member}", + "repositories_url": "https://api.github.com/teams/1/repos", + "parent": null + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\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\"]}'" + }, + { + "lang": "JS", + "source": "octokit.repos.removeProtectedBranchTeamRestrictions({\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch',\n teams: [\n 'teams'\n ]\n})" + }, + { + "lang": "Ruby", + "source": "octokit.remove_protected_branch_team_restrictions(\n 'hello-world',\n 'branch',\n [\n 'teams'\n ]\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "requestBodyParameterName": "teams", + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "description": "teams parameter", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": { + "get": { + "summary": "Get users with access to protected branch", + "description": "Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nLists the people who have push access to this branch.", + "operationId": "repos/get-users-with-access-to-protected-branch", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/branches/#list-users-with-access-to-protected-branch" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "branch", + "description": "branch parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "example": [ + { + "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 + } + ] + } + } + } + }, + "x-code-samples": [ + { + "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" + }, + { + "lang": "JS", + "source": "octokit.repos.getUsersWithAccessToProtectedBranch({\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.users_with_access_to_protected_branch(\n 'hello-world',\n 'branch'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "operation", + "date": "2019-09-09", + "note": "\"List user restrictions of protected branch\" is now \"Get users with access to protected branch\"", + "before": { + "operationId": "repos/list-protected-branch-user-restrictions" + }, + "after": { + "operationId": "repos/get-users-with-access-to-protected-branch" + } + }, + { + "type": "operation", + "date": "2019-09-13", + "note": "\"List users with access to protected branch\" is now \"Get users with access to protected branch\"", + "before": { + "operationId": "repos/list-users-with-access-to-protected-branch" + }, + "after": { + "operationId": "repos/get-users-with-access-to-protected-branch" + } + } + ] + }, + "put": { + "summary": "Replace user restrictions of protected branch", + "description": "Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\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| Type | Description |\n| ------- | ----------------------------------------------------------------------------------------------------------------------------- |\n| `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. |", + "operationId": "repos/replace-protected-branch-user-restrictions", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/branches/#replace-user-restrictions-of-protected-branch" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "branch", + "description": "branch parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "example": [ + { + "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 + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\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\"]}'" + }, + { + "lang": "JS", + "source": "octokit.repos.replaceProtectedBranchUserRestrictions({\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch',\n users: [\n 'users'\n ]\n})" + }, + { + "lang": "Ruby", + "source": "octokit.replace_protected_branch_user_restrictions(\n 'hello-world',\n 'branch',\n [\n 'users'\n ]\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "requestBodyParameterName": "users", + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "description": "users parameter", + "items": { + "type": "string" + } + } + } + } + } + }, + "post": { + "summary": "Add user restrictions of protected branch", + "description": "Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nGrants the specified people push access for this branch.\n\n| Type | Description |\n| ------- | ----------------------------------------------------------------------------------------------------------------------------- |\n| `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. |", + "operationId": "repos/add-protected-branch-user-restrictions", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/branches/#add-user-restrictions-of-protected-branch" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "branch", + "description": "branch parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "example": [ + { + "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 + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\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\"]}'" + }, + { + "lang": "JS", + "source": "octokit.repos.addProtectedBranchUserRestrictions({\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch',\n users: [\n 'users'\n ]\n})" + }, + { + "lang": "Ruby", + "source": "octokit.add_protected_branch_user_restrictions(\n 'hello-world',\n 'branch',\n [\n 'users'\n ]\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "requestBodyParameterName": "users", + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "description": "users parameter", + "items": { + "type": "string" + } + } + } + } + } + }, + "delete": { + "summary": "Remove user restrictions of protected branch", + "description": "Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nRemoves the ability of a user to push to this branch.\n\n| Type | Description |\n| ------- | --------------------------------------------------------------------------------------------------------------------------------------------- |\n| `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. |", + "operationId": "repos/remove-protected-branch-user-restrictions", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/branches/#remove-user-restrictions-of-protected-branch" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "branch", + "description": "branch parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "example": [ + { + "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 + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\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\"]}'" + }, + { + "lang": "JS", + "source": "octokit.repos.removeProtectedBranchUserRestrictions({\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch',\n users: [\n 'users'\n ]\n})" + }, + { + "lang": "Ruby", + "source": "octokit.remove_protected_branch_user_restrictions(\n 'hello-world',\n 'branch',\n [\n 'users'\n ]\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "requestBodyParameterName": "users", + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "description": "users parameter", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "/repos/{owner}/{repo}/check-runs": { + "post": { + "summary": "Create a check run", + "description": "**Note:** 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.\n\nCreates a new check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to create check runs.", + "operationId": "checks/create", + "tags": [ + "checks" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/checks/runs/#create-a-check-run" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.antiope-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "head_sha": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "external_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "details_url": { + "type": "string" + }, + "status": { + "type": "string" + }, + "conclusion": { + "type": "string" + }, + "started_at": { + "type": "string" + }, + "completed_at": { + "type": "string" + }, + "output": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "summary": { + "type": "string" + }, + "text": { + "type": "string" + } + } + }, + "name": { + "type": "string" + }, + "check_suite": { + "type": "object", + "properties": { + "id": { + "type": "number" + } + } + }, + "app": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "slug": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "public_members_url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "external_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "metadata": { + "type": "string" + }, + "contents": { + "type": "string" + }, + "issues": { + "type": "string" + }, + "single_file": { + "type": "string" + } + } + }, + "events": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "pull_requests": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "number": { + "type": "number" + }, + "head": { + "type": "object", + "properties": { + "ref": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "repo": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + } + } + } + } + }, + "base": { + "type": "object", + "properties": { + "ref": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "repo": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "examples": { + "example-of-in-progress-conclusion": { + "summary": "Example of in_progress conclusion", + "value": { + "id": 4, + "head_sha": "ce587453ced02b1526dfb4cb910479d431683101", + "node_id": "MDg6Q2hlY2tSdW40", + "external_id": "42", + "url": "https://api.github.com/repos/github/hello-world/check-runs/4", + "html_url": "http://github.com/github/hello-world/runs/4", + "details_url": "https://example.com", + "status": "in_progress", + "conclusion": null, + "started_at": "2018-05-04T01:14:52Z", + "completed_at": null, + "output": { + "title": "Mighty Readme Report", + "summary": "", + "text": "" + }, + "name": "mighty_readme", + "check_suite": { + "id": 5 + }, + "app": { + "id": 1, + "slug": "octoapp", + "node_id": "MDExOkludGVncmF0aW9uMQ==", + "owner": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization" + }, + "name": "Octocat App", + "description": "", + "external_url": "https://example.com", + "html_url": "https://github.com/apps/octoapp", + "created_at": "2017-07-08T16:18:44-04:00", + "updated_at": "2017-07-08T16:18:44-04:00", + "permissions": { + "metadata": "read", + "contents": "read", + "issues": "write", + "single_file": "write" + }, + "events": [ + "push", + "pull_request" + ] + }, + "pull_requests": [ + { + "url": "https://api.github.com/repos/github/hello-world/pulls/1", + "id": 1934, + "number": 3956, + "head": { + "ref": "say-hello", + "sha": "3dca65fa3e8d4b3da3f3d056c59aee1c50f41390", + "repo": { + "id": 526, + "url": "https://api.github.com/repos/github/hello-world", + "name": "hello-world" + } + }, + "base": { + "ref": "master", + "sha": "e7fdf7640066d71ad16a86fbcbb9c6a10a18af4f", + "repo": { + "id": 526, + "url": "https://api.github.com/repos/github/hello-world", + "name": "hello-world" + } + } + } + ] + } + }, + "example-of-completed-conclusion": { + "summary": "Example of completed conclusion", + "value": { + "id": 4, + "head_sha": "ce587453ced02b1526dfb4cb910479d431683101", + "node_id": "MDg6Q2hlY2tSdW40", + "external_id": "", + "url": "https://api.github.com/repos/github/hello-world/check-runs/4", + "html_url": "http://github.com/github/hello-world/runs/4", + "details_url": "https://example.com", + "status": "completed", + "conclusion": "neutral", + "started_at": "2018-05-04T01:14:52Z", + "completed_at": "2018-05-04T01:14:52Z", + "output": { + "title": "Mighty Readme report", + "summary": "There are 0 failures, 2 warnings, and 1 notice.", + "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_count": 2, + "annotations_url": "https://api.github.com/repos/github/hello-world/check-runs/4/annotations" + }, + "name": "mighty_readme", + "check_suite": { + "id": 5 + }, + "app": { + "id": 1, + "slug": "octoapp", + "node_id": "MDExOkludGVncmF0aW9uMQ==", + "owner": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization" + }, + "name": "Octocat App", + "description": "", + "external_url": "https://example.com", + "html_url": "https://github.com/apps/octoapp", + "created_at": "2017-07-08T16:18:44-04:00", + "updated_at": "2017-07-08T16:18:44-04:00", + "permissions": { + "metadata": "read", + "contents": "read", + "issues": "write", + "single_file": "write" + }, + "events": [ + "push", + "pull_request" + ] + }, + "pull_requests": [ + { + "url": "https://api.github.com/repos/github/hello-world/pulls/1", + "id": 1934, + "number": 3956, + "head": { + "ref": "say-hello", + "sha": "3dca65fa3e8d4b3da3f3d056c59aee1c50f41390", + "repo": { + "id": 526, + "url": "https://api.github.com/repos/github/hello-world", + "name": "hello-world" + } + }, + "base": { + "ref": "master", + "sha": "e7fdf7640066d71ad16a86fbcbb9c6a10a18af4f", + "repo": { + "id": 526, + "url": "https://api.github.com/repos/github/hello-world", + "name": "hello-world" + } + } + } + ] + } + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\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\"}'" + }, + { + "lang": "JS", + "source": "octokit.checks.create({\n owner: 'octocat',\n repo: 'hello-world',\n name: 'name',\n head_sha: 'head_sha'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create(\n 'hello-world',\n 'name',\n 'head_sha'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.antiope-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the check. For example, \"code-coverage\"." + }, + "head_sha": { + "type": "string", + "description": "The SHA of the commit." + }, + "details_url": { + "type": "string", + "description": "The URL of the integrator's site that has the full details of the check." + }, + "external_id": { + "type": "string", + "description": "A reference for the run on the integrator's system." + }, + "status": { + "type": "string", + "description": "The current status. Can be one of `queued`, `in_progress`, or `completed`.", + "enum": [ + "queued", + "in_progress", + "completed" + ], + "default": "queued" + }, + "started_at": { + "type": "string", + "description": "The time that the check run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`." + }, + "conclusion": { + "type": "string", + "description": "**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`, `timed_out`, or `action_required`. When the conclusion is `action_required`, additional details should be provided on the site specified by `details_url`. \n**Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. Only GitHub can change a check run conclusion to `stale`.", + "enum": [ + "success", + "failure", + "neutral", + "cancelled", + "timed_out", + "action_required" + ] + }, + "completed_at": { + "type": "string", + "description": "The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`." + }, + "output": { + "type": "object", + "description": "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://developer.github.com/v3/checks/runs/#output-object) description.", + "properties": { + "title": { + "type": "string", + "description": "The title of the check run." + }, + "summary": { + "type": "string", + "description": "The summary of the check run. This parameter supports Markdown." + }, + "text": { + "type": "string", + "description": "The details of the check run. This parameter supports Markdown." + }, + "annotations": { + "type": "array", + "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](https://developer.github.com/v3/checks/runs/#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://developer.github.com/v3/checks/runs/#annotations-object) description for details about how to use this parameter.", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "description": "The path of the file to add an annotation to. For example, `assets/css/main.css`." + }, + "start_line": { + "type": "integer", + "description": "The start line of the annotation." + }, + "end_line": { + "type": "integer", + "description": "The end line of the annotation." + }, + "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." + }, + "end_column": { + "type": "integer", + "description": "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." + }, + "annotation_level": { + "type": "string", + "description": "The level of the annotation. Can be one of `notice`, `warning`, or `failure`.", + "enum": [ + "notice", + "warning", + "failure" + ] + }, + "message": { + "type": "string", + "description": "A short description of the feedback for these lines of code. The maximum size is 64 KB." + }, + "title": { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters." + }, + "raw_details": { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB." + } + }, + "required": [ + "path", + "start_line", + "end_line", + "annotation_level", + "message" + ] + } + }, + "images": { + "type": "array", + "description": "Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://developer.github.com/v3/checks/runs/#images-object) description for details.", + "items": { + "type": "object", + "properties": { + "alt": { + "type": "string", + "description": "The alternative text for the image." + }, + "image_url": { + "type": "string", + "description": "The full URL of the image." + }, + "caption": { + "type": "string", + "description": "A short image description." + } + }, + "required": [ + "alt", + "image_url" + ] + } + } + }, + "required": [ + "title", + "summary" + ] + }, + "actions": { + "type": "array", + "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](https://developer.github.com/v3/activity/events/types/#checkrunevent) to your app. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://developer.github.com/v3/checks/runs/#actions-object) description. To learn more about check runs and requested actions, see \"[Check runs and requested actions](https://developer.github.com/v3/checks/runs/#check-runs-and-requested-actions).\" To learn more about check runs and requested actions, see \"[Check runs and requested actions](https://developer.github.com/v3/checks/runs/#check-runs-and-requested-actions).\"", + "items": { + "type": "object", + "properties": { + "label": { + "type": "string", + "description": "The text to be displayed on a button in the web UI. The maximum size is 20 characters." + }, + "description": { + "type": "string", + "description": "A short explanation of what this action would do. The maximum size is 40 characters." + }, + "identifier": { + "type": "string", + "description": "A reference for the action on the integrator's system. The maximum size is 20 characters." + } + }, + "required": [ + "label", + "description", + "identifier" + ] + } + } + }, + "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" + } + ] + } + } + } + } + } + } + } + }, + "/repos/{owner}/{repo}/check-runs/{check_run_id}": { + "patch": { + "summary": "Update a check run", + "description": "**Note:** 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.\n\nUpdates a check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to edit check runs.", + "operationId": "checks/update", + "tags": [ + "checks" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/checks/runs/#update-a-check-run" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.antiope-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "check_run_id", + "description": "check_run_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "head_sha": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "external_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "details_url": { + "type": "string" + }, + "status": { + "type": "string" + }, + "conclusion": { + "type": "string" + }, + "started_at": { + "type": "string" + }, + "completed_at": { + "type": "string" + }, + "output": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "summary": { + "type": "string" + }, + "text": { + "type": "string" + }, + "annotations_count": { + "type": "number" + }, + "annotations_url": { + "type": "string" + } + } + }, + "name": { + "type": "string" + }, + "check_suite": { + "type": "object", + "properties": { + "id": { + "type": "number" + } + } + }, + "app": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "slug": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "public_members_url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "external_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "metadata": { + "type": "string" + }, + "contents": { + "type": "string" + }, + "issues": { + "type": "string" + }, + "single_file": { + "type": "string" + } + } + }, + "events": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "pull_requests": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "number": { + "type": "number" + }, + "head": { + "type": "object", + "properties": { + "ref": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "repo": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + } + } + } + } + }, + "base": { + "type": "object", + "properties": { + "ref": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "repo": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "example": { + "id": 4, + "head_sha": "ce587453ced02b1526dfb4cb910479d431683101", + "node_id": "MDg6Q2hlY2tSdW40", + "external_id": "", + "url": "https://api.github.com/repos/github/hello-world/check-runs/4", + "html_url": "http://github.com/github/hello-world/runs/4", + "details_url": "https://example.com", + "status": "completed", + "conclusion": "neutral", + "started_at": "2018-05-04T01:14:52Z", + "completed_at": "2018-05-04T01:14:52Z", + "output": { + "title": "Mighty Readme report", + "summary": "There are 0 failures, 2 warnings, and 1 notice.", + "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_count": 2, + "annotations_url": "https://api.github.com/repos/github/hello-world/check-runs/4/annotations" + }, + "name": "mighty_readme", + "check_suite": { + "id": 5 + }, + "app": { + "id": 1, + "slug": "octoapp", + "node_id": "MDExOkludGVncmF0aW9uMQ==", + "owner": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization" + }, + "name": "Octocat App", + "description": "", + "external_url": "https://example.com", + "html_url": "https://github.com/apps/octoapp", + "created_at": "2017-07-08T16:18:44-04:00", + "updated_at": "2017-07-08T16:18:44-04:00", + "permissions": { + "metadata": "read", + "contents": "read", + "issues": "write", + "single_file": "write" + }, + "events": [ + "push", + "pull_request" + ] + }, + "pull_requests": [ + { + "url": "https://api.github.com/repos/github/hello-world/pulls/1", + "id": 1934, + "number": 3956, + "head": { + "ref": "say-hello", + "sha": "3dca65fa3e8d4b3da3f3d056c59aee1c50f41390", + "repo": { + "id": 526, + "url": "https://api.github.com/repos/github/hello-world", + "name": "hello-world" + } + }, + "base": { + "ref": "master", + "sha": "e7fdf7640066d71ad16a86fbcbb9c6a10a18af4f", + "repo": { + "id": 526, + "url": "https://api.github.com/repos/github/hello-world", + "name": "hello-world" + } + } + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\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\"}'" + }, + { + "lang": "JS", + "source": "octokit.checks.update({\n owner: 'octocat',\n repo: 'hello-world',\n check_run_id: 42,\n name: 'name'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.update(\n 'hello-world',\n 42,\n 'name'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.antiope-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the check. For example, \"code-coverage\"." + }, + "details_url": { + "type": "string", + "description": "The URL of the integrator's site that has the full details of the check." + }, + "external_id": { + "type": "string", + "description": "A reference for the run on the integrator's system." + }, + "started_at": { + "type": "string", + "description": "This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`." + }, + "status": { + "type": "string", + "description": "The current status. Can be one of `queued`, `in_progress`, or `completed`.", + "enum": [ + "queued", + "in_progress", + "completed" + ] + }, + "conclusion": { + "type": "string", + "description": "**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`, `timed_out`, or `action_required`. \n**Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. Only GitHub can change a check run conclusion to `stale`.", + "enum": [ + "success", + "failure", + "neutral", + "cancelled", + "timed_out", + "action_required" + ] + }, + "completed_at": { + "type": "string", + "description": "The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`." + }, + "output": { + "type": "object", + "description": "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://developer.github.com/v3/checks/runs/#output-object-1) description.", + "properties": { + "title": { + "type": "string", + "description": "**Required**." + }, + "summary": { + "type": "string", + "description": "Can contain Markdown." + }, + "text": { + "type": "string", + "description": "Can contain Markdown." + }, + "annotations": { + "type": "array", + "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](https://developer.github.com/v3/checks/runs/#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://developer.github.com/v3/checks/runs/#annotations-object-1) description for details.", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "description": "The path of the file to add an annotation to. For example, `assets/css/main.css`." + }, + "start_line": { + "type": "integer", + "description": "The start line of the annotation." + }, + "end_line": { + "type": "integer", + "description": "The end line of the annotation." + }, + "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." + }, + "end_column": { + "type": "integer", + "description": "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." + }, + "annotation_level": { + "type": "string", + "description": "The level of the annotation. Can be one of `notice`, `warning`, or `failure`.", + "enum": [ + "notice", + "warning", + "failure" + ] + }, + "message": { + "type": "string", + "description": "A short description of the feedback for these lines of code. The maximum size is 64 KB." + }, + "title": { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters." + }, + "raw_details": { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB." + } + }, + "required": [ + "path", + "start_line", + "end_line", + "annotation_level", + "message" + ] + } + }, + "images": { + "type": "array", + "description": "Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://developer.github.com/v3/checks/runs/#annotations-object-1) description for details.", + "items": { + "type": "object", + "properties": { + "alt": { + "type": "string", + "description": "The alternative text for the image." + }, + "image_url": { + "type": "string", + "description": "The full URL of the image." + }, + "caption": { + "type": "string", + "description": "A short image description." + } + }, + "required": [ + "alt", + "image_url" + ] + } + } + }, + "required": [ + "summary" + ] + }, + "actions": { + "type": "array", + "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](https://developer.github.com/v3/checks/runs/#actions-object) description. To learn more about check runs and requested actions, see \"[Check runs and requested actions](https://developer.github.com/v3/checks/runs/#check-runs-and-requested-actions).\"", + "items": { + "type": "object", + "properties": { + "label": { + "type": "string", + "description": "The text to be displayed on a button in the web UI. The maximum size is 20 characters." + }, + "description": { + "type": "string", + "description": "A short explanation of what this action would do. The maximum size is 40 characters." + }, + "identifier": { + "type": "string", + "description": "A reference for the action on the integrator's system. The maximum size is 20 characters." + } + }, + "required": [ + "label", + "description", + "identifier" + ] + } + } + } + }, + "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" + } + ] + } + } + } + } + } + }, + "get": { + "summary": "Get a single check run", + "description": "**Note:** 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.\n\nGets 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.", + "operationId": "checks/get", + "tags": [ + "checks" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/checks/runs/#get-a-single-check-run" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.antiope-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "check_run_id", + "description": "check_run_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "head_sha": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "external_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "details_url": { + "type": "string" + }, + "status": { + "type": "string" + }, + "conclusion": { + "type": "string" + }, + "started_at": { + "type": "string" + }, + "completed_at": { + "type": "string" + }, + "output": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "summary": { + "type": "string" + }, + "text": { + "type": "string" + }, + "annotations_count": { + "type": "number" + }, + "annotations_url": { + "type": "string" + } + } + }, + "name": { + "type": "string" + }, + "check_suite": { + "type": "object", + "properties": { + "id": { + "type": "number" + } + } + }, + "app": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "slug": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "public_members_url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "external_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "metadata": { + "type": "string" + }, + "contents": { + "type": "string" + }, + "issues": { + "type": "string" + }, + "single_file": { + "type": "string" + } + } + }, + "events": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "pull_requests": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "number": { + "type": "number" + }, + "head": { + "type": "object", + "properties": { + "ref": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "repo": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + } + } + } + } + }, + "base": { + "type": "object", + "properties": { + "ref": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "repo": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "example": { + "id": 4, + "head_sha": "ce587453ced02b1526dfb4cb910479d431683101", + "node_id": "MDg6Q2hlY2tSdW40", + "external_id": "", + "url": "https://api.github.com/repos/github/hello-world/check-runs/4", + "html_url": "http://github.com/github/hello-world/runs/4", + "details_url": "https://example.com", + "status": "completed", + "conclusion": "neutral", + "started_at": "2018-05-04T01:14:52Z", + "completed_at": "2018-05-04T01:14:52Z", + "output": { + "title": "Mighty Readme report", + "summary": "There are 0 failures, 2 warnings, and 1 notice.", + "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_count": 2, + "annotations_url": "https://api.github.com/repos/github/hello-world/check-runs/4/annotations" + }, + "name": "mighty_readme", + "check_suite": { + "id": 5 + }, + "app": { + "id": 1, + "slug": "octoapp", + "node_id": "MDExOkludGVncmF0aW9uMQ==", + "owner": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization" + }, + "name": "Octocat App", + "description": "", + "external_url": "https://example.com", + "html_url": "https://github.com/apps/octoapp", + "created_at": "2017-07-08T16:18:44-04:00", + "updated_at": "2017-07-08T16:18:44-04:00", + "permissions": { + "metadata": "read", + "contents": "read", + "issues": "write", + "single_file": "write" + }, + "events": [ + "push", + "pull_request" + ] + }, + "pull_requests": [ + { + "url": "https://api.github.com/repos/github/hello-world/pulls/1", + "id": 1934, + "number": 3956, + "head": { + "ref": "say-hello", + "sha": "3dca65fa3e8d4b3da3f3d056c59aee1c50f41390", + "repo": { + "id": 526, + "url": "https://api.github.com/repos/github/hello-world", + "name": "hello-world" + } + }, + "base": { + "ref": "master", + "sha": "e7fdf7640066d71ad16a86fbcbb9c6a10a18af4f", + "repo": { + "id": 526, + "url": "https://api.github.com/repos/github/hello-world", + "name": "hello-world" + } + } + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "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" + }, + { + "lang": "JS", + "source": "octokit.checks.get({\n owner: 'octocat',\n repo: 'hello-world',\n check_run_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.get(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.antiope-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/check-runs/{check_run_id}/annotations": { + "get": { + "summary": "List annotations for a check run", + "description": "Lists 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.", + "operationId": "checks/list-annotations", + "tags": [ + "checks" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/checks/runs/#list-annotations-for-a-check-run" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.antiope-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "check_run_id", + "description": "check_run_id parameter", + "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": { + "type": "object", + "properties": { + "path": { + "type": "string" + }, + "start_line": { + "type": "number" + }, + "end_line": { + "type": "number" + }, + "start_column": { + "type": "number" + }, + "end_column": { + "type": "number" + }, + "annotation_level": { + "type": "string" + }, + "title": { + "type": "string" + }, + "message": { + "type": "string" + }, + "raw_details": { + "type": "string" + } + } + } + }, + "example": [ + { + "path": "README.md", + "start_line": 2, + "end_line": 2, + "start_column": 5, + "end_column": 10, + "annotation_level": "warning", + "title": "Spell Checker", + "message": "Check your spelling for 'banaas'.", + "raw_details": "Do you mean 'bananas' or 'banana'?" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "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" + }, + { + "lang": "JS", + "source": "octokit.checks.listAnnotations({\n owner: 'octocat',\n repo: 'hello-world',\n check_run_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.annotations(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.antiope-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/check-suites": { + "post": { + "summary": "Create a check suite", + "description": "**Note:** 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`.\n\nBy default, check suites are automatically created when you create a [check run](https://developer.github.com/v3/checks/runs/). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using \"[Set preferences for check suites on a repository](https://developer.github.com/v3/checks/suites/#set-preferences-for-check-suites-on-a-repository)\". Your GitHub App must have the `checks:write` permission to create check suites.", + "operationId": "checks/create-suite", + "tags": [ + "checks" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/checks/suites/#create-a-check-suite" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.antiope-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "head_branch": { + "type": "string" + }, + "head_sha": { + "type": "string" + }, + "status": { + "type": "string" + }, + "conclusion": { + "type": "string" + }, + "url": { + "type": "string" + }, + "before": { + "type": "string" + }, + "after": { + "type": "string" + }, + "pull_requests": { + "type": "array", + "items": {} + }, + "app": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "slug": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "public_members_url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "external_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "metadata": { + "type": "string" + }, + "contents": { + "type": "string" + }, + "issues": { + "type": "string" + }, + "single_file": { + "type": "string" + } + } + }, + "events": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "repository": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + } + } + }, + "example": { + "id": 5, + "node_id": "MDEwOkNoZWNrU3VpdGU1", + "head_branch": "master", + "head_sha": "d6fde92930d4715a2b49857d24b940956b26d2d3", + "status": "completed", + "conclusion": "neutral", + "url": "https://api.github.com/repos/github/hello-world/check-suites/5", + "before": "146e867f55c26428e5f9fade55a9bbf5e95a7912", + "after": "d6fde92930d4715a2b49857d24b940956b26d2d3", + "pull_requests": [], + "app": { + "id": 1, + "slug": "octoapp", + "node_id": "MDExOkludGVncmF0aW9uMQ==", + "owner": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization" + }, + "name": "Octocat App", + "description": "", + "external_url": "https://example.com", + "html_url": "https://github.com/apps/octoapp", + "created_at": "2017-07-08T16:18:44-04:00", + "updated_at": "2017-07-08T16:18:44-04:00", + "permissions": { + "metadata": "read", + "contents": "read", + "issues": "write", + "single_file": "write" + }, + "events": [ + "push", + "pull_request" + ] + }, + "repository": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\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\"}'" + }, + { + "lang": "JS", + "source": "octokit.checks.createSuite({\n owner: 'octocat',\n repo: 'hello-world',\n head_sha: 'head_sha'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_suite(\n 'hello-world',\n 'head_sha'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.antiope-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "head_sha": { + "type": "string", + "description": "The sha of the head commit." + } + }, + "required": [ + "head_sha" + ] + }, + "example": { + "head_sha": "d6fde92930d4715a2b49857d24b940956b26d2d3" + } + } + } + } + } + }, + "/repos/{owner}/{repo}/check-suites/preferences": { + "patch": { + "summary": "Set preferences for check suites on a repository", + "description": "Changes the default automatic flow when creating check suites. By default, the CheckSuiteEvent 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](https://developer.github.com/v3/checks/suites/#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites.", + "operationId": "checks/set-suites-preferences", + "tags": [ + "checks" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/checks/suites/#set-preferences-for-check-suites-on-a-repository" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.antiope-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "preferences": { + "type": "object", + "properties": { + "auto_trigger_checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "app_id": { + "type": "number" + }, + "setting": { + "type": "boolean" + } + }, + "required": [ + "app_id", + "setting" + ] + } + } + } + }, + "repository": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + } + } + }, + "example": { + "preferences": { + "auto_trigger_checks": [ + { + "app_id": 2, + "setting": true + }, + { + "app_id": 4, + "setting": false + } + ] + }, + "repository": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\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}]}'" + }, + { + "lang": "JS", + "source": "octokit.checks.setSuitesPreferences({\n owner: 'octocat',\n repo: 'hello-world',\n auto_trigger_checks: [\n {\n app_id: 42,\n setting: true\n }\n ]\n})" + }, + { + "lang": "Ruby", + "source": "octokit.set_suites_preferences(\n 'hello-world',\n [\n {\n app_id: 42,\n setting: true\n }\n ]\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.antiope-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "auto_trigger_checks": { + "type": "array", + "description": "Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. See the [`auto_trigger_checks` object](https://developer.github.com/v3/checks/suites/#auto_trigger_checks-object) description for details.", + "items": { + "type": "object", + "properties": { + "app_id": { + "type": "integer", + "description": "The `id` of the GitHub App." + }, + "setting": { + "type": "boolean", + "description": "Set to `true` to enable automatic creation of CheckSuite events upon pushes to the repository, or `false` to disable them.", + "default": true + } + }, + "required": [ + "app_id", + "setting" + ] + } + } + } + }, + "example": { + "auto_trigger_checks": [ + { + "app_id": 4, + "setting": false + } + ] + } + } + } + } + } + }, + "/repos/{owner}/{repo}/check-suites/{check_suite_id}": { + "get": { + "summary": "Get a single check suite", + "description": "**Note:** 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`.\n\nGets 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.", + "operationId": "checks/get-suite", + "tags": [ + "checks" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/checks/suites/#get-a-single-check-suite" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.antiope-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "check_suite_id", + "description": "check_suite_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "head_branch": { + "type": "string" + }, + "head_sha": { + "type": "string" + }, + "status": { + "type": "string" + }, + "conclusion": { + "type": "string" + }, + "url": { + "type": "string" + }, + "before": { + "type": "string" + }, + "after": { + "type": "string" + }, + "pull_requests": { + "type": "array", + "items": {} + }, + "app": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "slug": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "public_members_url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "external_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "metadata": { + "type": "string" + }, + "contents": { + "type": "string" + }, + "issues": { + "type": "string" + }, + "single_file": { + "type": "string" + } + } + }, + "events": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "repository": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + } + } + }, + "example": { + "id": 5, + "node_id": "MDEwOkNoZWNrU3VpdGU1", + "head_branch": "master", + "head_sha": "d6fde92930d4715a2b49857d24b940956b26d2d3", + "status": "completed", + "conclusion": "neutral", + "url": "https://api.github.com/repos/github/hello-world/check-suites/5", + "before": "146e867f55c26428e5f9fade55a9bbf5e95a7912", + "after": "d6fde92930d4715a2b49857d24b940956b26d2d3", + "pull_requests": [], + "app": { + "id": 1, + "slug": "octoapp", + "node_id": "MDExOkludGVncmF0aW9uMQ==", + "owner": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization" + }, + "name": "Octocat App", + "description": "", + "external_url": "https://example.com", + "html_url": "https://github.com/apps/octoapp", + "created_at": "2017-07-08T16:18:44-04:00", + "updated_at": "2017-07-08T16:18:44-04:00", + "permissions": { + "metadata": "read", + "contents": "read", + "issues": "write", + "single_file": "write" + }, + "events": [ + "push", + "pull_request" + ] + }, + "repository": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + } + } + } + } + }, + "x-code-samples": [ + { + "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" + }, + { + "lang": "JS", + "source": "octokit.checks.getSuite({\n owner: 'octocat',\n repo: 'hello-world',\n check_suite_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.suite(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.antiope-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs": { + "get": { + "summary": "List check runs in a check suite", + "description": "**Note:** 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.\n\nLists 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.", + "operationId": "checks/list-for-suite", + "tags": [ + "checks" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/checks/runs/#list-check-runs-in-a-check-suite" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.antiope-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "check_suite_id", + "description": "check_suite_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "check_name", + "description": "Returns check runs with the specified `name`.", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "status", + "description": "Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "queued", + "in_progress", + "completed" + ] + } + }, + { + "name": "filter", + "description": "Filters check runs by their `completed_at` timestamp. Can be one of `latest` (returning the most recent check runs) or `all`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "latest", + "all" + ], + "default": "latest" + } + }, + { + "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": "object", + "properties": { + "total_count": { + "type": "number" + }, + "check_runs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "head_sha": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "external_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "details_url": { + "type": "string" + }, + "status": { + "type": "string" + }, + "conclusion": { + "type": "string" + }, + "started_at": { + "type": "string" + }, + "completed_at": { + "type": "string" + }, + "output": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "summary": { + "type": "string" + }, + "text": { + "type": "string" + }, + "annotations_count": { + "type": "number" + }, + "annotations_url": { + "type": "string" + } + } + }, + "name": { + "type": "string" + }, + "check_suite": { + "type": "object", + "properties": { + "id": { + "type": "number" + } + } + }, + "app": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "slug": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "public_members_url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "external_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "metadata": { + "type": "string" + }, + "contents": { + "type": "string" + }, + "issues": { + "type": "string" + }, + "single_file": { + "type": "string" + } + } + }, + "events": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "pull_requests": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "number": { + "type": "number" + }, + "head": { + "type": "object", + "properties": { + "ref": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "repo": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + } + } + } + } + }, + "base": { + "type": "object", + "properties": { + "ref": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "repo": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "total_count": 1, + "check_runs": [ + { + "id": 4, + "head_sha": "ce587453ced02b1526dfb4cb910479d431683101", + "node_id": "MDg6Q2hlY2tSdW40", + "external_id": "", + "url": "https://api.github.com/repos/github/hello-world/check-runs/4", + "html_url": "http://github.com/github/hello-world/runs/4", + "details_url": "https://example.com", + "status": "completed", + "conclusion": "neutral", + "started_at": "2018-05-04T01:14:52Z", + "completed_at": "2018-05-04T01:14:52Z", + "output": { + "title": "Mighty Readme report", + "summary": "There are 0 failures, 2 warnings, and 1 notice.", + "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_count": 2, + "annotations_url": "https://api.github.com/repos/github/hello-world/check-runs/4/annotations" + }, + "name": "mighty_readme", + "check_suite": { + "id": 5 + }, + "app": { + "id": 1, + "slug": "octoapp", + "node_id": "MDExOkludGVncmF0aW9uMQ==", + "owner": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization" + }, + "name": "Octocat App", + "description": "", + "external_url": "https://example.com", + "html_url": "https://github.com/apps/octoapp", + "created_at": "2017-07-08T16:18:44-04:00", + "updated_at": "2017-07-08T16:18:44-04:00", + "permissions": { + "metadata": "read", + "contents": "read", + "issues": "write", + "single_file": "write" + }, + "events": [ + "push", + "pull_request" + ] + }, + "pull_requests": [ + { + "url": "https://api.github.com/repos/github/hello-world/pulls/1", + "id": 1934, + "number": 3956, + "head": { + "ref": "say-hello", + "sha": "3dca65fa3e8d4b3da3f3d056c59aee1c50f41390", + "repo": { + "id": 526, + "url": "https://api.github.com/repos/github/hello-world", + "name": "hello-world" + } + }, + "base": { + "ref": "master", + "sha": "e7fdf7640066d71ad16a86fbcbb9c6a10a18af4f", + "repo": { + "id": 526, + "url": "https://api.github.com/repos/github/hello-world", + "name": "hello-world" + } + } + } + ] + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "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" + }, + { + "lang": "JS", + "source": "octokit.checks.listForSuite({\n owner: 'octocat',\n repo: 'hello-world',\n check_suite_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.for_suite(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.antiope-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest": { + "post": { + "summary": "Rerequest check suite", + "description": "Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://developer.github.com/v3/activity/events/types/#checksuiteevent) event with the action `rerequested`. When a check suite is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared.\n\nTo rerequest a check suite, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository.", + "operationId": "checks/rerequest-suite", + "tags": [ + "checks" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/checks/suites/#rerequest-check-suite" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.antiope-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "check_suite_id", + "description": "check_suite_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "201": { + "description": "response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.antiope-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/check-suites/42/rerequest" + }, + { + "lang": "JS", + "source": "octokit.checks.rerequestSuite({\n owner: 'octocat',\n repo: 'hello-world',\n check_suite_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.rerequest_suite(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.antiope-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/collaborators": { + "get": { + "summary": "List collaborators", + "description": "For 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.\n\nTeam members will include the members of child teams.", + "operationId": "repos/list-collaborators", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/collaborators/#list-collaborators" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "affiliation", + "description": "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.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "outside", + "direct", + "all" + ], + "default": "all" + } + }, + { + "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": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + }, + "permissions": { + "type": "object", + "properties": { + "pull": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "admin": { + "type": "boolean" + } + } + } + } + } + }, + "example": [ + { + "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, + "permissions": { + "pull": true, + "push": true, + "admin": false + } + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/collaborators" + }, + { + "lang": "JS", + "source": "octokit.repos.listCollaborators({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.collaborators(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/collaborators/{username}": { + "get": { + "summary": "Check if a user is a collaborator", + "description": "For 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.\n\nTeam members will include the members of child teams.", + "operationId": "repos/check-collaborator", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/collaborators/#check-if-a-user-is-a-collaborator" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Response if user is a collaborator" + }, + "404": { + "description": "Response if user is not a collaborator" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/collaborators/USERNAME" + }, + { + "lang": "JS", + "source": "octokit.repos.checkCollaborator({\n owner: 'octocat',\n repo: 'hello-world',\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.check_collaborator(\n 'hello-world',\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "put": { + "summary": "Add user as a collaborator", + "description": "This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See \"[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)\" and \"[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)\" for details.\n\nFor more information the permission levels, see \"[Repository permission levels for an organization](https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)\" in the GitHub Help documentation.\n\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](https://developer.github.com/v3/#http-verbs).\"\n\nThe 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](https://developer.github.com/v3/repos/invitations/).\n\n**Rate limits**\n\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.", + "operationId": "repos/add-collaborator", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/collaborators/#add-user-as-a-collaborator" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "Response when a new invitation is created", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "repository": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + } + } + }, + "invitee": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "inviter": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "permissions": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + } + } + }, + "examples": { + "response-when-a-new-invitation-is-created": { + "value": { + "id": 1, + "repository": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}" + }, + "invitee": { + "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 + }, + "inviter": { + "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 + }, + "permissions": "write", + "created_at": "2016-06-13T14:52:50-05:00", + "url": "https://api.github.com/user/repository_invitations/1296269", + "html_url": "https://github.com/octocat/Hello-World/invitations" + } + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/collaborators/USERNAME \\\n -d '{\"permission\":\"permission\"}'" + }, + { + "lang": "JS", + "source": "octokit.repos.addCollaborator({\n owner: 'octocat',\n repo: 'hello-world',\n username: 'username',\n permission: 'permission'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.add_collaborator(\n 'hello-world',\n 'username',\n 'permission'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [], + "triggersNotification": true + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "permission": { + "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.", + "enum": [ + "pull", + "push", + "admin", + "maintain", + "triage" + ], + "default": "push" + } + } + } + } + } + } + }, + "delete": { + "summary": "Remove user as a collaborator", + "description": "", + "operationId": "repos/remove-collaborator", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/collaborators/#remove-user-as-a-collaborator" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/collaborators/USERNAME" + }, + { + "lang": "JS", + "source": "octokit.repos.removeCollaborator({\n owner: 'octocat',\n repo: 'hello-world',\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.remove_collaborator(\n 'hello-world',\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/collaborators/{username}/permission": { + "get": { + "summary": "Review a user's permission level", + "description": "Possible values for the `permission` key: `admin`, `write`, `read`, `none`.", + "operationId": "repos/get-collaborator-permission-level", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/collaborators/#review-a-users-permission-level" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Response if user has admin permissions", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "permission": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + } + }, + "examples": { + "response-if-user-has-admin-permissions": { + "value": { + "permission": "admin", + "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 + } + } + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/collaborators/USERNAME/permission" + }, + { + "lang": "JS", + "source": "octokit.repos.getCollaboratorPermissionLevel({\n owner: 'octocat',\n repo: 'hello-world',\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.collaborator_permission_level(\n 'hello-world',\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/comments": { + "get": { + "summary": "List commit comments for a repository", + "description": "Commit Comments use [these custom media types](https://developer.github.com/v3/repos/comments/#custom-media-types). You can read more about the use of media types in the API [here](https://developer.github.com/v3/media/).\n\nComments are ordered by ascending ID.\n\n", + "operationId": "repos/list-commit-comments", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/comments/#list-commit-comments-for-a-repository" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "html_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "body": { + "type": "string" + }, + "path": { + "type": "string" + }, + "position": { + "type": "number" + }, + "line": { + "type": "number" + }, + "commit_id": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + } + }, + "example": [ + { + "html_url": "https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e#commitcomment-1", + "url": "https://api.github.com/repos/octocat/Hello-World/comments/1", + "id": 1, + "node_id": "MDEzOkNvbW1pdENvbW1lbnQx", + "body": "Great stuff", + "path": "file1.txt", + "position": 4, + "line": 14, + "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e", + "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 + }, + "created_at": "2011-04-14T16:00:49Z", + "updated_at": "2011-04-14T16:00:49Z" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/comments" + }, + { + "lang": "JS", + "source": "octokit.repos.listCommitComments({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.commit_comments(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "An additional `reactions` object in the commit 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://developer.github.com/v3/media) in the `Accept` header:\n\n```\n application/vnd.github.squirrel-girl-preview\n\n```\n\nThe `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions.", + "required": false + } + ] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/comments/{comment_id}": { + "get": { + "summary": "Get a single commit comment", + "description": "", + "operationId": "repos/get-commit-comment", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/comments/#get-a-single-commit-comment" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "comment_id", + "description": "comment_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "html_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "body": { + "type": "string" + }, + "path": { + "type": "string" + }, + "position": { + "type": "number" + }, + "line": { + "type": "number" + }, + "commit_id": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + }, + "example": { + "html_url": "https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e#commitcomment-1", + "url": "https://api.github.com/repos/octocat/Hello-World/comments/1", + "id": 1, + "node_id": "MDEzOkNvbW1pdENvbW1lbnQx", + "body": "Great stuff", + "path": "file1.txt", + "position": 4, + "line": 14, + "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e", + "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 + }, + "created_at": "2011-04-14T16:00:49Z", + "updated_at": "2011-04-14T16:00:49Z" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/comments/42" + }, + { + "lang": "JS", + "source": "octokit.repos.getCommitComment({\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.commit_comment(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "An additional `reactions` object in the commit 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://developer.github.com/v3/media) in the `Accept` header:\n\n```\n application/vnd.github.squirrel-girl-preview\n\n```\n\nThe `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions.", + "required": false + } + ] + }, + "x-changes": [] + }, + "patch": { + "summary": "Update a commit comment", + "description": "", + "operationId": "repos/update-commit-comment", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/comments/#update-a-commit-comment" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "comment_id", + "description": "comment_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "html_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "body": { + "type": "string" + }, + "path": { + "type": "string" + }, + "position": { + "type": "number" + }, + "line": { + "type": "number" + }, + "commit_id": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + }, + "example": { + "html_url": "https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e#commitcomment-1", + "url": "https://api.github.com/repos/octocat/Hello-World/comments/1", + "id": 1, + "node_id": "MDEzOkNvbW1pdENvbW1lbnQx", + "body": "Nice change", + "path": "file1.txt", + "position": 4, + "line": 14, + "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e", + "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 + }, + "created_at": "2011-04-14T16:00:49Z", + "updated_at": "2011-04-14T16:00:49Z" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/comments/42 \\\n -d '{\"body\":\"body\"}'" + }, + { + "lang": "JS", + "source": "octokit.repos.updateCommitComment({\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42,\n body: 'body'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.update_commit_comment(\n 'hello-world',\n 42,\n 'body'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "type": "string", + "description": "The contents of the comment" + } + }, + "required": [ + "body" + ] + }, + "example": { + "body": "Nice change" + } + } + } + } + }, + "delete": { + "summary": "Delete a commit comment", + "description": "", + "operationId": "repos/delete-commit-comment", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/comments/#delete-a-commit-comment" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "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" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/comments/42" + }, + { + "lang": "JS", + "source": "octokit.repos.deleteCommitComment({\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_commit_comment(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/comments/{comment_id}/reactions": { + "get": { + "summary": "List reactions for a commit comment", + "description": "List the reactions to a [commit comment](https://developer.github.com/v3/repos/comments/).", + "operationId": "reactions/list-for-commit-comment", + "tags": [ + "reactions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/reactions/#list-reactions-for-a-commit-comment" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.squirrel-girl-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "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://developer.github.com/v3/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" + ] + } + }, + { + "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": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "content": { + "type": "string" + }, + "created_at": { + "type": "string" + } + } + } + }, + "example": [ + { + "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" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "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" + }, + { + "lang": "JS", + "source": "octokit.reactions.listForCommitComment({\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.for_commit_comment(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "APIs for managing reactions are currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\n application/vnd.github.squirrel-girl-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + }, + "post": { + "summary": "Create reaction for a commit comment", + "description": "Create a reaction to a [commit comment](https://developer.github.com/v3/repos/comments/). A response with a `Status: 200 OK` means that you already added the reaction type to this commit comment.", + "operationId": "reactions/create-for-commit-comment", + "tags": [ + "reactions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/reactions/#create-reaction-for-a-commit-comment" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.squirrel-girl-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "comment_id", + "description": "comment_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "content": { + "type": "string" + }, + "created_at": { + "type": "string" + } + } + }, + "example": { + "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" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\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\"}'" + }, + { + "lang": "JS", + "source": "octokit.reactions.createForCommitComment({\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42,\n content: 'content'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_for_commit_comment(\n 'hello-world',\n 42,\n 'content'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "APIs for managing reactions are currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\n application/vnd.github.squirrel-girl-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the commit comment.", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ] + } + }, + "required": [ + "content" + ] + }, + "example": { + "content": "heart" + } + } + } + } + } + }, + "/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}": { + "delete": { + "summary": "Delete a commit comment reaction", + "description": "**Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`.\n\nDelete a reaction to a [commit comment](https://developer.github.com/v3/repos/comments/).", + "operationId": "reactions/delete-for-commit-comment", + "tags": [ + "reactions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/reactions/#delete-a-commit-comment-reaction" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.squirrel-girl-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "comment_id", + "description": "comment_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "reaction_id", + "description": "reaction_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/comments/42/reactions/42" + }, + { + "lang": "JS", + "source": "octokit.reactions.deleteForCommitComment({\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42,\n reaction_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_for_commit_comment(\n 'hello-world',\n 42,\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "APIs for managing reactions are currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\n application/vnd.github.squirrel-girl-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/commits": { + "get": { + "summary": "List commits on a repository", + "description": "**Signature verification object**\n\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:\n\nThese are the possible values for `reason` in the `verification` object:\n\n| Value | Description |\n| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- |\n| `expired_key` | The key that made the signature is expired. |\n| `not_signing_key` | The \"signing\" flag is not among the usage flags in the GPG key that made the signature. |\n| `gpgverify_error` | There was an error communicating with the signature verification service. |\n| `gpgverify_unavailable` | The signature verification service is currently unavailable. |\n| `unsigned` | The object does not include a signature. |\n| `unknown_signature_type` | A non-PGP signature was found in the commit. |\n| `no_user` | No user was associated with the `committer` email address in the commit. |\n| `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. |\n| `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |\n| `unknown_key` | The key that made the signature has not been registered with any user's account. |\n| `malformed_signature` | There was an error parsing the signature. |\n| `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |\n| `valid` | None of the above errors applied, so the signature is considered to be verified. |", + "operationId": "repos/list-commits", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "sha", + "description": "SHA or branch to start listing commits from. Default: the repository’s default branch (usually `master`).", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "path", + "description": "Only commits containing this file path will be returned.", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "author", + "description": "GitHub login or email address by which to filter by commit author.", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "since", + "description": "Only commits after this date will be returned. 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" + } + }, + { + "name": "until", + "description": "Only commits before this date will be returned. 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" + } + }, + { + "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": { + "url": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commit": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "author": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "date": { + "type": "string" + } + } + }, + "committer": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "date": { + "type": "string" + } + } + }, + "message": { + "type": "string" + }, + "tree": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "sha": { + "type": "string" + } + } + }, + "comment_count": { + "type": "number" + }, + "verification": { + "type": "object", + "properties": { + "verified": { + "type": "boolean" + }, + "reason": { + "type": "string" + }, + "signature": { + "type": "string" + }, + "payload": { + "type": "string" + } + } + } + } + }, + "author": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "committer": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "parents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "sha": { + "type": "string" + } + } + } + } + } + } + }, + "example": [ + { + "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" + } + ] + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits" + }, + { + "lang": "JS", + "source": "octokit.repos.listCommits({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.commits(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head": { + "get": { + "summary": "List branches for HEAD commit", + "description": "Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nReturns all branches where the given commit SHA is the HEAD, or latest commit for the branch.", + "operationId": "repos/list-branches-for-head-commit", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/commits/#list-branches-for-head-commit" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.groot-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "commit_sha", + "description": "commit_sha parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "commit": { + "type": "object", + "properties": { + "sha": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "protected": { + "type": "string" + } + } + } + }, + "example": [ + { + "name": "branch_5", + "commit": { + "sha": "c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc", + "url": "https://api.github.com/repos/octocat/Hello-World/commits/c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc" + }, + "protected": "false" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "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" + }, + { + "lang": "JS", + "source": "octokit.repos.listBranchesForHeadCommit({\n owner: 'octocat',\n repo: 'hello-world',\n commit_sha: 'commit_sha'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.branches_for_head_commit(\n 'hello-world',\n 'commit_sha'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "groot", + "note": "Listing branches or pull requests for a commit in the Commits API is currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2019-04-11-pulls-branches-for-commit/) for more details. To access the new endpoints during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.groot-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/commits/{commit_sha}/comments": { + "get": { + "summary": "List comments for a single commit", + "description": "Use the `:commit_sha` to specify the commit that will have its comments listed.\n\n", + "operationId": "repos/list-comments-for-commit", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/comments/#list-comments-for-a-single-commit" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "commit_sha", + "description": "commit_sha parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "html_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "body": { + "type": "string" + }, + "path": { + "type": "string" + }, + "position": { + "type": "number" + }, + "line": { + "type": "number" + }, + "commit_id": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + } + }, + "example": [ + { + "html_url": "https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e#commitcomment-1", + "url": "https://api.github.com/repos/octocat/Hello-World/comments/1", + "id": 1, + "node_id": "MDEzOkNvbW1pdENvbW1lbnQx", + "body": "Great stuff", + "path": "file1.txt", + "position": 4, + "line": 14, + "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e", + "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 + }, + "created_at": "2011-04-14T16:00:49Z", + "updated_at": "2011-04-14T16:00:49Z" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "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" + }, + { + "lang": "JS", + "source": "octokit.repos.listCommentsForCommit({\n owner: 'octocat',\n repo: 'hello-world',\n commit_sha: 'commit_sha'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.comments_for_commit(\n 'hello-world',\n 'commit_sha'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "An additional `reactions` object in the commit 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://developer.github.com/v3/media) in the `Accept` header:\n\n```\n application/vnd.github.squirrel-girl-preview\n\n```\n\nThe `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions.", + "required": false + } + ] + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-06-07", + "note": "\"ref\" parameter renamed to \"commit_sha\"", + "before": { + "name": "ref" + }, + "after": { + "name": "commit_sha" + } + } + ] + }, + "post": { + "summary": "Create a commit comment", + "description": "Create a comment for a commit using its `:commit_sha`.\n\nThis endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See \"[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)\" and \"[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)\" for details.", + "operationId": "repos/create-commit-comment", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/comments/#create-a-commit-comment" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "commit_sha", + "description": "commit_sha parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "html_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "body": { + "type": "string" + }, + "path": { + "type": "string" + }, + "position": { + "type": "number" + }, + "line": { + "type": "number" + }, + "commit_id": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + }, + "example": { + "html_url": "https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e#commitcomment-1", + "url": "https://api.github.com/repos/octocat/Hello-World/comments/1", + "id": 1, + "node_id": "MDEzOkNvbW1pdENvbW1lbnQx", + "body": "Great stuff", + "path": "file1.txt", + "position": 4, + "line": 14, + "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e", + "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 + }, + "created_at": "2011-04-14T16:00:49Z", + "updated_at": "2011-04-14T16:00:49Z" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\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\"}'" + }, + { + "lang": "JS", + "source": "octokit.repos.createCommitComment({\n owner: 'octocat',\n repo: 'hello-world',\n commit_sha: 'commit_sha',\n body: 'body'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_commit_comment(\n 'hello-world',\n 'commit_sha',\n 'body'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [], + "triggersNotification": true + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-06-07", + "note": "\"sha\" parameter renamed to \"commit_sha\"", + "before": { + "name": "sha" + }, + "after": { + "name": "commit_sha" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "type": "string", + "description": "The contents of the comment." + }, + "path": { + "type": "string", + "description": "Relative path of the file to comment on." + }, + "position": { + "type": "integer", + "description": "Line index in the diff to comment on." + }, + "line": { + "type": "integer", + "description": "**Deprecated**. Use **position** parameter instead. Line number in the file to comment on." + } + }, + "required": [ + "body" + ] + }, + "example": { + "body": "Great stuff", + "path": "file1.txt", + "position": 4, + "line": null + } + } + } + } + } + }, + "/repos/{owner}/{repo}/commits/{commit_sha}/pulls": { + "get": { + "summary": "List pull requests associated with commit", + "description": "Lists 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](https://developer.github.com/v3/pulls/#list-pull-requests) endpoint.", + "operationId": "repos/list-pull-requests-associated-with-commit", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/commits/#list-pull-requests-associated-with-commit" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.groot-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "commit_sha", + "description": "commit_sha parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "diff_url": { + "type": "string" + }, + "patch_url": { + "type": "string" + }, + "issue_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "review_comments_url": { + "type": "string" + }, + "review_comment_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "locked": { + "type": "boolean" + }, + "title": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "body": { + "type": "string" + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "color": { + "type": "string" + }, + "default": { + "type": "boolean" + } + } + } + }, + "milestone": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "open_issues": { + "type": "number" + }, + "closed_issues": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "closed_at": { + "type": "string" + }, + "due_on": { + "type": "string" + } + } + }, + "active_lock_reason": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "closed_at": { + "type": "string" + }, + "merged_at": { + "type": "string" + }, + "merge_commit_sha": { + "type": "string" + }, + "assignee": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "assignees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + }, + "required": [ + "login", + "id", + "node_id", + "avatar_url", + "gravatar_id", + "url", + "html_url", + "followers_url", + "following_url", + "gists_url", + "starred_url", + "subscriptions_url", + "organizations_url", + "repos_url", + "events_url", + "received_events_url", + "type", + "site_admin" + ] + } + }, + "requested_reviewers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "requested_teams": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "privacy": { + "type": "string" + }, + "permission": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + }, + "parent": { + "type": "string" + } + } + } + }, + "head": { + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "ref": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "repo": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + } + } + }, + "base": { + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "ref": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "repo": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + } + } + }, + "_links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "html": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "issue": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "comments": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "review_comments": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "review_comment": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "commits": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "statuses": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + } + } + }, + "author_association": { + "type": "string" + }, + "draft": { + "type": "boolean" + } + } + } + }, + "example": [ + { + "url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347", + "id": 1, + "node_id": "MDExOlB1bGxSZXF1ZXN0MQ==", + "html_url": "https://github.com/octocat/Hello-World/pull/1347", + "diff_url": "https://github.com/octocat/Hello-World/pull/1347.diff", + "patch_url": "https://github.com/octocat/Hello-World/pull/1347.patch", + "issue_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", + "commits_url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits", + "review_comments_url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments", + "review_comment_url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}", + "comments_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/comments", + "statuses_url": "https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e", + "number": 1347, + "state": "open", + "locked": true, + "title": "Amazing new feature", + "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": "Please pull these awesome changes in!", + "labels": [ + { + "id": 208045946, + "node_id": "MDU6TGFiZWwyMDgwNDU5NDY=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", + "name": "bug", + "description": "Something isn't working", + "color": "f29513", + "default": true + } + ], + "milestone": { + "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1", + "html_url": "https://github.com/octocat/Hello-World/milestones/v1.0", + "labels_url": "https://api.github.com/repos/octocat/Hello-World/milestones/1/labels", + "id": 1002604, + "node_id": "MDk6TWlsZXN0b25lMTAwMjYwNA==", + "number": 1, + "state": "open", + "title": "v1.0", + "description": "Tracking milestone for version 1.0", + "creator": { + "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 + }, + "open_issues": 4, + "closed_issues": 8, + "created_at": "2011-04-10T20:09:31Z", + "updated_at": "2014-03-03T18:58:10Z", + "closed_at": "2013-02-12T13:22:01Z", + "due_on": "2012-10-09T23:39:01Z" + }, + "active_lock_reason": "too heated", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:01:12Z", + "closed_at": "2011-01-26T19:01:12Z", + "merged_at": "2011-01-26T19:01:12Z", + "merge_commit_sha": "e5bd3914e2e596debea16f433f57875b5b90bcd6", + "assignee": { + "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 + }, + "assignees": [ + { + "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 + }, + { + "login": "hubot", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/hubot_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/hubot", + "html_url": "https://github.com/hubot", + "followers_url": "https://api.github.com/users/hubot/followers", + "following_url": "https://api.github.com/users/hubot/following{/other_user}", + "gists_url": "https://api.github.com/users/hubot/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hubot/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hubot/subscriptions", + "organizations_url": "https://api.github.com/users/hubot/orgs", + "repos_url": "https://api.github.com/users/hubot/repos", + "events_url": "https://api.github.com/users/hubot/events{/privacy}", + "received_events_url": "https://api.github.com/users/hubot/received_events", + "type": "User", + "site_admin": true + } + ], + "requested_reviewers": [ + { + "login": "other_user", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/other_user_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/other_user", + "html_url": "https://github.com/other_user", + "followers_url": "https://api.github.com/users/other_user/followers", + "following_url": "https://api.github.com/users/other_user/following{/other_user}", + "gists_url": "https://api.github.com/users/other_user/gists{/gist_id}", + "starred_url": "https://api.github.com/users/other_user/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/other_user/subscriptions", + "organizations_url": "https://api.github.com/users/other_user/orgs", + "repos_url": "https://api.github.com/users/other_user/repos", + "events_url": "https://api.github.com/users/other_user/events{/privacy}", + "received_events_url": "https://api.github.com/users/other_user/received_events", + "type": "User", + "site_admin": false + } + ], + "requested_teams": [ + { + "id": 1, + "node_id": "MDQ6VGVhbTE=", + "url": "https://api.github.com/teams/1", + "html_url": "https://api.github.com/teams/justice-league", + "name": "Justice League", + "slug": "justice-league", + "description": "A great team.", + "privacy": "closed", + "permission": "admin", + "members_url": "https://api.github.com/teams/1/members{/member}", + "repositories_url": "https://api.github.com/teams/1/repos", + "parent": null + } + ], + "head": { + "label": "octocat:new-topic", + "ref": "new-topic", + "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e", + "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 + }, + "repo": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + }, + "base": { + "label": "octocat:master", + "ref": "master", + "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e", + "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 + }, + "repo": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + }, + "_links": { + "self": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/1347" + }, + "html": { + "href": "https://github.com/octocat/Hello-World/pull/1347" + }, + "issue": { + "href": "https://api.github.com/repos/octocat/Hello-World/issues/1347" + }, + "comments": { + "href": "https://api.github.com/repos/octocat/Hello-World/issues/1347/comments" + }, + "review_comments": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments" + }, + "review_comment": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}" + }, + "commits": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits" + }, + "statuses": { + "href": "https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e" + } + }, + "author_association": "OWNER", + "draft": false + } + ] + } + } + } + }, + "x-code-samples": [ + { + "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" + }, + { + "lang": "JS", + "source": "octokit.repos.listPullRequestsAssociatedWithCommit({\n owner: 'octocat',\n repo: 'hello-world',\n commit_sha: 'commit_sha'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.pull_requests_associated_with_commit(\n 'hello-world',\n 'commit_sha'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "groot", + "note": "Listing branches or pull requests for a commit in the Commits API is currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2019-04-11-pulls-branches-for-commit/) for more details. To access the new endpoints during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.groot-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/commits/{ref}": { + "get": { + "summary": "Get a single commit", + "description": "Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint.\n\nYou can pass the appropriate [media type](https://developer.github.com/v3/media/#commits-commit-comparison-and-pull-requests) to fetch `diff` and `patch` formats. Diffs with binary data will have no `patch` property.\n\nTo return only the SHA-1 hash of the commit reference, you can provide the `sha` custom [media type](https://developer.github.com/v3/media/#commits-commit-comparison-and-pull-requests) 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.\n\n**Signature verification object**\n\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:\n\nThese are the possible values for `reason` in the `verification` object:\n\n| Value | Description |\n| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- |\n| `expired_key` | The key that made the signature is expired. |\n| `not_signing_key` | The \"signing\" flag is not among the usage flags in the GPG key that made the signature. |\n| `gpgverify_error` | There was an error communicating with the signature verification service. |\n| `gpgverify_unavailable` | The signature verification service is currently unavailable. |\n| `unsigned` | The object does not include a signature. |\n| `unknown_signature_type` | A non-PGP signature was found in the commit. |\n| `no_user` | No user was associated with the `committer` email address in the commit. |\n| `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. |\n| `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |\n| `unknown_key` | The key that made the signature has not been registered with any user's account. |\n| `malformed_signature` | There was an error parsing the signature. |\n| `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |\n| `valid` | None of the above errors applied, so the signature is considered to be verified. |\n\n", + "operationId": "repos/get-commit", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/commits/#get-a-single-commit" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "ref", + "description": "ref parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commit": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "author": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "date": { + "type": "string" + } + } + }, + "committer": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "date": { + "type": "string" + } + } + }, + "message": { + "type": "string" + }, + "tree": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "sha": { + "type": "string" + } + } + }, + "comment_count": { + "type": "number" + }, + "verification": { + "type": "object", + "properties": { + "verified": { + "type": "boolean" + }, + "reason": { + "type": "string" + }, + "signature": { + "type": "string" + }, + "payload": { + "type": "string" + } + } + } + } + }, + "author": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "committer": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "parents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "sha": { + "type": "string" + } + } + } + }, + "stats": { + "type": "object", + "properties": { + "additions": { + "type": "number" + }, + "deletions": { + "type": "number" + }, + "total": { + "type": "number" + } + } + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "filename": { + "type": "string" + }, + "additions": { + "type": "number" + }, + "deletions": { + "type": "number" + }, + "changes": { + "type": "number" + }, + "status": { + "type": "string" + }, + "raw_url": { + "type": "string" + }, + "blob_url": { + "type": "string" + }, + "patch": { + "type": "string" + } + } + } + } + } + }, + "example": { + "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" + } + ], + "stats": { + "additions": 104, + "deletions": 4, + "total": 108 + }, + "files": [ + { + "filename": "file1.txt", + "additions": 10, + "deletions": 2, + "changes": 12, + "status": "modified", + "raw_url": "https://github.com/octocat/Hello-World/raw/7ca483543807a51b6079e54ac4cc392bc29ae284/file1.txt", + "blob_url": "https://github.com/octocat/Hello-World/blob/7ca483543807a51b6079e54ac4cc392bc29ae284/file1.txt", + "patch": "@@ -29,7 +29,7 @@\n....." + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits/REF" + }, + { + "lang": "JS", + "source": "octokit.repos.getCommit({\n owner: 'octocat',\n repo: 'hello-world',\n ref: 'ref'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.commit(\n 'hello-world',\n 'ref'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"sha\" parameter renamed to \"ref\"", + "before": { + "name": "sha" + }, + "after": { + "name": "ref" + } + }, + { + "type": "parameter", + "date": "2019-06-21", + "note": "\"commit_sha\" parameter renamed to \"ref\"", + "before": { + "name": "commit_sha" + }, + "after": { + "name": "ref" + } + } + ] + } + }, + "/repos/{owner}/{repo}/commits/{ref}/check-runs": { + "get": { + "summary": "List check runs for a specific ref", + "description": "**Note:** 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.\n\nLists 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.", + "operationId": "checks/list-for-ref", + "tags": [ + "checks" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/checks/runs/#list-check-runs-for-a-specific-ref" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.antiope-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "ref", + "description": "ref parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "check_name", + "description": "Returns check runs with the specified `name`.", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "status", + "description": "Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "queued", + "in_progress", + "completed" + ] + } + }, + { + "name": "filter", + "description": "Filters check runs by their `completed_at` timestamp. Can be one of `latest` (returning the most recent check runs) or `all`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "latest", + "all" + ], + "default": "latest" + } + }, + { + "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": "object", + "properties": { + "total_count": { + "type": "number" + }, + "check_runs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "head_sha": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "external_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "details_url": { + "type": "string" + }, + "status": { + "type": "string" + }, + "conclusion": { + "type": "string" + }, + "started_at": { + "type": "string" + }, + "completed_at": { + "type": "string" + }, + "output": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "summary": { + "type": "string" + }, + "text": { + "type": "string" + }, + "annotations_count": { + "type": "number" + }, + "annotations_url": { + "type": "string" + } + } + }, + "name": { + "type": "string" + }, + "check_suite": { + "type": "object", + "properties": { + "id": { + "type": "number" + } + } + }, + "app": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "slug": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "public_members_url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "external_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "metadata": { + "type": "string" + }, + "contents": { + "type": "string" + }, + "issues": { + "type": "string" + }, + "single_file": { + "type": "string" + } + } + }, + "events": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "pull_requests": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "number": { + "type": "number" + }, + "head": { + "type": "object", + "properties": { + "ref": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "repo": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + } + } + } + } + }, + "base": { + "type": "object", + "properties": { + "ref": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "repo": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "total_count": 1, + "check_runs": [ + { + "id": 4, + "head_sha": "ce587453ced02b1526dfb4cb910479d431683101", + "node_id": "MDg6Q2hlY2tSdW40", + "external_id": "", + "url": "https://api.github.com/repos/github/hello-world/check-runs/4", + "html_url": "http://github.com/github/hello-world/runs/4", + "details_url": "https://example.com", + "status": "completed", + "conclusion": "neutral", + "started_at": "2018-05-04T01:14:52Z", + "completed_at": "2018-05-04T01:14:52Z", + "output": { + "title": "Mighty Readme report", + "summary": "There are 0 failures, 2 warnings, and 1 notice.", + "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_count": 2, + "annotations_url": "https://api.github.com/repos/github/hello-world/check-runs/4/annotations" + }, + "name": "mighty_readme", + "check_suite": { + "id": 5 + }, + "app": { + "id": 1, + "slug": "octoapp", + "node_id": "MDExOkludGVncmF0aW9uMQ==", + "owner": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization" + }, + "name": "Octocat App", + "description": "", + "external_url": "https://example.com", + "html_url": "https://github.com/apps/octoapp", + "created_at": "2017-07-08T16:18:44-04:00", + "updated_at": "2017-07-08T16:18:44-04:00", + "permissions": { + "metadata": "read", + "contents": "read", + "issues": "write", + "single_file": "write" + }, + "events": [ + "push", + "pull_request" + ] + }, + "pull_requests": [ + { + "url": "https://api.github.com/repos/github/hello-world/pulls/1", + "id": 1934, + "number": 3956, + "head": { + "ref": "say-hello", + "sha": "3dca65fa3e8d4b3da3f3d056c59aee1c50f41390", + "repo": { + "id": 526, + "url": "https://api.github.com/repos/github/hello-world", + "name": "hello-world" + } + }, + "base": { + "ref": "master", + "sha": "e7fdf7640066d71ad16a86fbcbb9c6a10a18af4f", + "repo": { + "id": 526, + "url": "https://api.github.com/repos/github/hello-world", + "name": "hello-world" + } + } + } + ] + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "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" + }, + { + "lang": "JS", + "source": "octokit.checks.listForRef({\n owner: 'octocat',\n repo: 'hello-world',\n ref: 'ref'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.for_ref(\n 'hello-world',\n 'ref'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.antiope-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/commits/{ref}/check-suites": { + "get": { + "summary": "List check suites for a specific ref", + "description": "**Note:** 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`.\n\nLists 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.", + "operationId": "checks/list-suites-for-ref", + "tags": [ + "checks" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/checks/suites/#list-check-suites-for-a-specific-ref" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.antiope-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "ref", + "description": "ref parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "app_id", + "description": "Filters check suites by GitHub App `id`.", + "in": "query", + "required": false, + "schema": { + "type": "integer" + }, + "example": 1 + }, + { + "name": "check_name", + "description": "Filters checks suites by the name of the [check run](https://developer.github.com/v3/checks/runs/).", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "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": "object", + "properties": { + "total_count": { + "type": "number" + }, + "check_suites": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "head_branch": { + "type": "string" + }, + "head_sha": { + "type": "string" + }, + "status": { + "type": "string" + }, + "conclusion": { + "type": "string" + }, + "url": { + "type": "string" + }, + "before": { + "type": "string" + }, + "after": { + "type": "string" + }, + "pull_requests": { + "type": "array", + "items": {} + }, + "app": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "slug": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "public_members_url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "external_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "metadata": { + "type": "string" + }, + "contents": { + "type": "string" + }, + "issues": { + "type": "string" + }, + "single_file": { + "type": "string" + } + } + }, + "events": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "repository": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + } + } + } + } + } + }, + "example": { + "total_count": 1, + "check_suites": [ + { + "id": 5, + "node_id": "MDEwOkNoZWNrU3VpdGU1", + "head_branch": "master", + "head_sha": "d6fde92930d4715a2b49857d24b940956b26d2d3", + "status": "completed", + "conclusion": "neutral", + "url": "https://api.github.com/repos/github/hello-world/check-suites/5", + "before": "146e867f55c26428e5f9fade55a9bbf5e95a7912", + "after": "d6fde92930d4715a2b49857d24b940956b26d2d3", + "pull_requests": [], + "app": { + "id": 1, + "slug": "octoapp", + "node_id": "MDExOkludGVncmF0aW9uMQ==", + "owner": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization" + }, + "name": "Octocat App", + "description": "", + "external_url": "https://example.com", + "html_url": "https://github.com/apps/octoapp", + "created_at": "2017-07-08T16:18:44-04:00", + "updated_at": "2017-07-08T16:18:44-04:00", + "permissions": { + "metadata": "read", + "contents": "read", + "issues": "write", + "single_file": "write" + }, + "events": [ + "push", + "pull_request" + ] + }, + "repository": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "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" + }, + { + "lang": "JS", + "source": "octokit.checks.listSuitesForRef({\n owner: 'octocat',\n repo: 'hello-world',\n ref: 'ref'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.suites_for_ref(\n 'hello-world',\n 'ref'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.antiope-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/commits/{ref}/status": { + "get": { + "summary": "Get the combined status for a specific ref", + "description": "Users 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.\n\nThe most recent status for each context is returned, up to 100. This field [paginates](https://developer.github.com/v3/#pagination) if there are over 100 contexts.\n\nAdditionally, a combined `state` is returned. The `state` is one of:\n\n* **failure** if any of the contexts report as `error` or `failure`\n* **pending** if there are no statuses or a context is `pending`\n* **success** if the latest status for all contexts is `success`", + "operationId": "repos/get-combined-status-for-ref", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "ref", + "description": "ref parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "state": { + "type": "string" + }, + "statuses": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "state": { + "type": "string" + }, + "description": { + "type": "string" + }, + "target_url": { + "type": "string" + }, + "context": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + }, + "required": [ + "url", + "avatar_url", + "id", + "node_id", + "state", + "description", + "target_url", + "context", + "created_at", + "updated_at" + ] + } + }, + "sha": { + "type": "string" + }, + "total_count": { + "type": "number" + }, + "repository": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + } + } + }, + "commit_url": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "example": { + "state": "success", + "statuses": [ + { + "url": "https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e", + "avatar_url": "https://github.com/images/error/hubot_happy.gif", + "id": 1, + "node_id": "MDY6U3RhdHVzMQ==", + "state": "success", + "description": "Build has completed successfully", + "target_url": "https://ci.example.com/1000/output", + "context": "continuous-integration/jenkins", + "created_at": "2012-07-20T01:19:13Z", + "updated_at": "2012-07-20T01:19:13Z" + }, + { + "url": "https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e", + "avatar_url": "https://github.com/images/error/other_user_happy.gif", + "id": 2, + "node_id": "MDY6U3RhdHVzMg==", + "state": "success", + "description": "Testing has completed successfully", + "target_url": "https://ci.example.com/2000/output", + "context": "security/brakeman", + "created_at": "2012-08-20T01:19:13Z", + "updated_at": "2012-08-20T01:19:13Z" + } + ], + "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e", + "total_count": 2, + "repository": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}" + }, + "commit_url": "https://api.github.com/repos/octocat/Hello-World/6dcb09b5b57875f334f61aebed695e2e4193db5e", + "url": "https://api.github.com/repos/octocat/Hello-World/6dcb09b5b57875f334f61aebed695e2e4193db5e/status" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits/REF/status" + }, + { + "lang": "JS", + "source": "octokit.repos.getCombinedStatusForRef({\n owner: 'octocat',\n repo: 'hello-world',\n ref: 'ref'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.combined_status_for_ref(\n 'hello-world',\n 'ref'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/commits/{ref}/statuses": { + "get": { + "summary": "List statuses for a specific ref", + "description": "Users 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.\n\nThis resource is also available via a legacy route: `GET /repos/:owner/:repo/statuses/:ref`.", + "operationId": "repos/list-statuses-for-ref", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/statuses/#list-statuses-for-a-specific-ref" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "ref", + "description": "ref parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "state": { + "type": "string" + }, + "description": { + "type": "string" + }, + "target_url": { + "type": "string" + }, + "context": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + } + } + }, + "example": [ + { + "url": "https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e", + "avatar_url": "https://github.com/images/error/hubot_happy.gif", + "id": 1, + "node_id": "MDY6U3RhdHVzMQ==", + "state": "success", + "description": "Build has completed successfully", + "target_url": "https://ci.example.com/1000/output", + "context": "continuous-integration/jenkins", + "created_at": "2012-07-20T01:19:13Z", + "updated_at": "2012-07-20T01:19:13Z", + "creator": { + "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 + } + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits/REF/statuses" + }, + { + "lang": "JS", + "source": "octokit.repos.listStatusesForRef({\n owner: 'octocat',\n repo: 'hello-world',\n ref: 'ref'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.statuses_for_ref(\n 'hello-world',\n 'ref'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/community/code_of_conduct": { + "get": { + "summary": "Get the contents of a repository's code of conduct", + "description": "This method returns the contents of the repository's code of conduct file, if one is detected.", + "operationId": "codes-of-conduct/get-for-repo", + "tags": [ + "codes-of-conduct" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/codes_of_conduct/#get-the-contents-of-a-repositorys-code-of-conduct" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.scarlet-witch-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "type": "string" + }, + "body": { + "type": "string" + } + } + }, + "example": { + "key": "contributor_covenant", + "name": "Contributor Covenant", + "url": "https://github.com/LindseyB/cosee/blob/master/CODE_OF_CONDUCT.md", + "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" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.scarlet-witch-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/community/code_of_conduct" + }, + { + "lang": "JS", + "source": "octokit.codesOfConduct.getForRepo({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.for_repo(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "scarlet-witch", + "note": "The Codes of Conduct API is currently available for developers to preview.\n\nTo access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.scarlet-witch-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/community/profile": { + "get": { + "summary": "Retrieve community profile metrics", + "description": "This endpoint will return all community profile metrics, including an overall health score, repository description, the presence of documentation, detected code of conduct, detected license, and the presence of ISSUE\\_TEMPLATE, PULL\\_REQUEST\\_TEMPLATE, README, and CONTRIBUTING files.", + "operationId": "repos/retrieve-community-profile-metrics", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/community/#retrieve-community-profile-metrics" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "health_percentage": { + "type": "number" + }, + "description": { + "type": "string" + }, + "documentation": { + "type": "boolean" + }, + "files": { + "type": "object", + "properties": { + "code_of_conduct": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "key": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + } + } + }, + "contributing": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + } + } + }, + "issue_template": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + } + } + }, + "pull_request_template": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + } + } + }, + "license": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "key": { + "type": "string" + }, + "spdx_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + } + } + }, + "readme": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + } + } + } + } + }, + "updated_at": { + "type": "string" + } + } + }, + "example": { + "health_percentage": 100, + "description": "My first repository on GitHub!", + "documentation": true, + "files": { + "code_of_conduct": { + "name": "Contributor Covenant", + "key": "contributor_covenant", + "url": "https://api.github.com/codes_of_conduct/contributor_covenant", + "html_url": "https://github.com/octocat/Hello-World/blob/master/CODE_OF_CONDUCT.md" + }, + "contributing": { + "url": "https://api.github.com/repos/octocat/Hello-World/contents/CONTRIBUTING", + "html_url": "https://github.com/octocat/Hello-World/blob/master/CONTRIBUTING" + }, + "issue_template": { + "url": "https://api.github.com/repos/octocat/Hello-World/contents/ISSUE_TEMPLATE", + "html_url": "https://github.com/octocat/Hello-World/blob/master/ISSUE_TEMPLATE" + }, + "pull_request_template": { + "url": "https://api.github.com/repos/octocat/Hello-World/contents/PULL_REQUEST_TEMPLATE", + "html_url": "https://github.com/octocat/Hello-World/blob/master/PULL_REQUEST_TEMPLATE" + }, + "license": { + "name": "MIT License", + "key": "mit", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "html_url": "https://github.com/octocat/Hello-World/blob/master/LICENSE" + }, + "readme": { + "url": "https://api.github.com/repos/octocat/Hello-World/contents/README.md", + "html_url": "https://github.com/octocat/Hello-World/blob/master/README.md" + } + }, + "updated_at": "2017-02-28T19:09:29Z" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/community/profile" + }, + { + "lang": "JS", + "source": "octokit.repos.retrieveCommunityProfileMetrics({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.retrieve_community_profile_metrics(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/compare/{base}...{head}": { + "get": { + "summary": "Compare two commits", + "description": "Both `:base` and `:head` must be branch names in `:repo`. To compare branches across other repositories in the same network as `:repo`, use the format `:branch`.\n\nThe 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](https://developer.github.com/v3/media/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats.\n\nThe 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.\n\n**Working with large comparisons**\n\nThe response will include a comparison of up to 250 commits. If you are working with a larger commit range, you can use the [Commit List API](https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository) to enumerate all commits in the range.\n\nFor comparisons with extremely large diffs, you may receive an error response indicating that the diff took too long to generate. You can typically resolve this error by using a smaller commit range.\n\n**Signature verification object**\n\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:\n\nThese are the possible values for `reason` in the `verification` object:\n\n| Value | Description |\n| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- |\n| `expired_key` | The key that made the signature is expired. |\n| `not_signing_key` | The \"signing\" flag is not among the usage flags in the GPG key that made the signature. |\n| `gpgverify_error` | There was an error communicating with the signature verification service. |\n| `gpgverify_unavailable` | The signature verification service is currently unavailable. |\n| `unsigned` | The object does not include a signature. |\n| `unknown_signature_type` | A non-PGP signature was found in the commit. |\n| `no_user` | No user was associated with the `committer` email address in the commit. |\n| `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. |\n| `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |\n| `unknown_key` | The key that made the signature has not been registered with any user's account. |\n| `malformed_signature` | There was an error parsing the signature. |\n| `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |\n| `valid` | None of the above errors applied, so the signature is considered to be verified. |", + "operationId": "repos/compare-commits", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/commits/#compare-two-commits" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "base", + "description": "base parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "head", + "description": "head parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "permalink_url": { + "type": "string" + }, + "diff_url": { + "type": "string" + }, + "patch_url": { + "type": "string" + }, + "base_commit": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commit": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "author": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "date": { + "type": "string" + } + } + }, + "committer": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "date": { + "type": "string" + } + } + }, + "message": { + "type": "string" + }, + "tree": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "sha": { + "type": "string" + } + } + }, + "comment_count": { + "type": "number" + }, + "verification": { + "type": "object", + "properties": { + "verified": { + "type": "boolean" + }, + "reason": { + "type": "string" + }, + "signature": { + "type": "string" + }, + "payload": { + "type": "string" + } + } + } + } + }, + "author": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "committer": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "parents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "sha": { + "type": "string" + } + } + } + } + } + }, + "merge_base_commit": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commit": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "author": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "date": { + "type": "string" + } + } + }, + "committer": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "date": { + "type": "string" + } + } + }, + "message": { + "type": "string" + }, + "tree": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "sha": { + "type": "string" + } + } + }, + "comment_count": { + "type": "number" + }, + "verification": { + "type": "object", + "properties": { + "verified": { + "type": "boolean" + }, + "reason": { + "type": "string" + }, + "signature": { + "type": "string" + }, + "payload": { + "type": "string" + } + } + } + } + }, + "author": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "committer": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "parents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "sha": { + "type": "string" + } + } + } + } + } + }, + "status": { + "type": "string" + }, + "ahead_by": { + "type": "number" + }, + "behind_by": { + "type": "number" + }, + "total_commits": { + "type": "number" + }, + "commits": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commit": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "author": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "date": { + "type": "string" + } + } + }, + "committer": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "date": { + "type": "string" + } + } + }, + "message": { + "type": "string" + }, + "tree": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "sha": { + "type": "string" + } + } + }, + "comment_count": { + "type": "number" + }, + "verification": { + "type": "object", + "properties": { + "verified": { + "type": "boolean" + }, + "reason": { + "type": "string" + }, + "signature": { + "type": "string" + }, + "payload": { + "type": "string" + } + } + } + } + }, + "author": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "committer": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "parents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "sha": { + "type": "string" + } + } + } + } + } + } + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "sha": { + "type": "string" + }, + "filename": { + "type": "string" + }, + "status": { + "type": "string" + }, + "additions": { + "type": "number" + }, + "deletions": { + "type": "number" + }, + "changes": { + "type": "number" + }, + "blob_url": { + "type": "string" + }, + "raw_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "patch": { + "type": "string" + } + } + } + } + } + }, + "example": { + "url": "https://api.github.com/repos/octocat/Hello-World/compare/master...topic", + "html_url": "https://github.com/octocat/Hello-World/compare/master...topic", + "permalink_url": "https://github.com/octocat/Hello-World/compare/octocat:bbcd538c8e72b8c175046e27cc8f907076331401...octocat:0328041d1152db8ae77652d1618a02e57f745f17", + "diff_url": "https://github.com/octocat/Hello-World/compare/master...topic.diff", + "patch_url": "https://github.com/octocat/Hello-World/compare/master...topic.patch", + "base_commit": { + "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e", + "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e", + "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" + } + ] + }, + "merge_base_commit": { + "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" + } + ] + }, + "status": "behind", + "ahead_by": 1, + "behind_by": 2, + "total_commits": 1, + "commits": [ + { + "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e", + "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e", + "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" + } + ] + } + ], + "files": [ + { + "sha": "bbcd538c8e72b8c175046e27cc8f907076331401", + "filename": "file1.txt", + "status": "added", + "additions": 103, + "deletions": 21, + "changes": 124, + "blob_url": "https://github.com/octocat/Hello-World/blob/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt", + "raw_url": "https://github.com/octocat/Hello-World/raw/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt", + "contents_url": "https://api.github.com/repos/octocat/Hello-World/contents/file1.txt?ref=6dcb09b5b57875f334f61aebed695e2e4193db5e", + "patch": "@@ -132,7 +132,7 @@ module Test @@ -1000,7 +1000,7 @@ module Test" + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/compare/BASE...HEAD" + }, + { + "lang": "JS", + "source": "octokit.repos.compareCommits({\n owner: 'octocat',\n repo: 'hello-world',\n base: 'base',\n head: 'head'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.compare_commits(\n 'hello-world',\n 'base',\n 'head'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/contents/{path}": { + "get": { + "summary": "Get contents", + "description": "Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit `:path`, you will receive the contents of all files in the repository.\n\nFiles and symlinks support [a custom media type](https://developer.github.com/v3/repos/contents/#custom-media-types) for retrieving the raw content or rendered HTML (when supported). All content types support [a custom media type](https://developer.github.com/v3/repos/contents/#custom-media-types) to ensure the content is returned in a consistent object format.\n\n**Note**:\n\n* To get a repository's contents recursively, you can [recursively get the tree](https://developer.github.com/v3/git/trees/).\n* This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees API](https://developer.github.com/v3/git/trees/#get-a-tree).\n* This API supports files up to 1 megabyte in size.\n\nThe response will be an array of objects, one object for each item in the directory.\n\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value _should_ be \"submodule\". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW). In the next major version of the API, the type will be returned as \"submodule\".\n\nIf the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the API responds with the content of the file (in the [format shown above](https://developer.github.com/v3/repos/contents/#response-if-content-is-a-file)).\n\nOtherwise, the API responds with an object describing the symlink itself:\n\nThe `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific commit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out the submodule at that specific commit.\n\nIf the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) and the github.com URLs (`html_url` and `_links[\"html\"]`) will have null values.", + "operationId": "repos/get-contents", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/contents/#get-contents" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "path", + "description": "path parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "encoding": { + "type": "string" + }, + "size": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "content": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "download_url": { + "type": "string" + }, + "_links": { + "type": "object", + "properties": { + "git": { + "type": "string" + }, + "self": { + "type": "string" + }, + "html": { + "type": "string" + } + } + } + } + }, + "examples": { + "response-if-content-is-a-file": { + "summary": "Response if content is a file", + "value": { + "type": "file", + "encoding": "base64", + "size": 5362, + "name": "README.md", + "path": "README.md", + "content": "encoded content ...", + "sha": "3d21ec53a331a6f037a91c368710b99387d012c1", + "url": "https://api.github.com/repos/octokit/octokit.rb/contents/README.md", + "git_url": "https://api.github.com/repos/octokit/octokit.rb/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1", + "html_url": "https://github.com/octokit/octokit.rb/blob/master/README.md", + "download_url": "https://raw.githubusercontent.com/octokit/octokit.rb/master/README.md", + "_links": { + "git": "https://api.github.com/repos/octokit/octokit.rb/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1", + "self": "https://api.github.com/repos/octokit/octokit.rb/contents/README.md", + "html": "https://github.com/octokit/octokit.rb/blob/master/README.md" + } + } + }, + "response-if-content-is-a-directory": { + "summary": "Response if content is a directory", + "value": [ + { + "type": "file", + "size": 625, + "name": "octokit.rb", + "path": "lib/octokit.rb", + "sha": "fff6fe3a23bf1c8ea0692b4a883af99bee26fd3b", + "url": "https://api.github.com/repos/octokit/octokit.rb/contents/lib/octokit.rb", + "git_url": "https://api.github.com/repos/octokit/octokit.rb/git/blobs/fff6fe3a23bf1c8ea0692b4a883af99bee26fd3b", + "html_url": "https://github.com/octokit/octokit.rb/blob/master/lib/octokit.rb", + "download_url": "https://raw.githubusercontent.com/octokit/octokit.rb/master/lib/octokit.rb", + "_links": { + "self": "https://api.github.com/repos/octokit/octokit.rb/contents/lib/octokit.rb", + "git": "https://api.github.com/repos/octokit/octokit.rb/git/blobs/fff6fe3a23bf1c8ea0692b4a883af99bee26fd3b", + "html": "https://github.com/octokit/octokit.rb/blob/master/lib/octokit.rb" + } + }, + { + "type": "dir", + "size": 0, + "name": "octokit", + "path": "lib/octokit", + "sha": "a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d", + "url": "https://api.github.com/repos/octokit/octokit.rb/contents/lib/octokit", + "git_url": "https://api.github.com/repos/octokit/octokit.rb/git/trees/a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d", + "html_url": "https://github.com/octokit/octokit.rb/tree/master/lib/octokit", + "download_url": null, + "_links": { + "self": "https://api.github.com/repos/octokit/octokit.rb/contents/lib/octokit", + "git": "https://api.github.com/repos/octokit/octokit.rb/git/trees/a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d", + "html": "https://github.com/octokit/octokit.rb/tree/master/lib/octokit" + } + } + ] + }, + "response-if-content-is-a-symlink": { + "summary": "Response if content is a symlink", + "value": { + "type": "symlink", + "target": "/path/to/symlink/target", + "size": 23, + "name": "some-symlink", + "path": "bin/some-symlink", + "sha": "452a98979c88e093d682cab404a3ec82babebb48", + "url": "https://api.github.com/repos/octokit/octokit.rb/contents/bin/some-symlink", + "git_url": "https://api.github.com/repos/octokit/octokit.rb/git/blobs/452a98979c88e093d682cab404a3ec82babebb48", + "html_url": "https://github.com/octokit/octokit.rb/blob/master/bin/some-symlink", + "download_url": "https://raw.githubusercontent.com/octokit/octokit.rb/master/bin/some-symlink", + "_links": { + "git": "https://api.github.com/repos/octokit/octokit.rb/git/blobs/452a98979c88e093d682cab404a3ec82babebb48", + "self": "https://api.github.com/repos/octokit/octokit.rb/contents/bin/some-symlink", + "html": "https://github.com/octokit/octokit.rb/blob/master/bin/some-symlink" + } + } + }, + "response-if-content-is-a-submodule": { + "summary": "Response if content is a submodule", + "value": { + "type": "submodule", + "submodule_git_url": "git://github.com/jquery/qunit.git", + "size": 0, + "name": "qunit", + "path": "test/qunit", + "sha": "6ca3721222109997540bd6d9ccd396902e0ad2f9", + "url": "https://api.github.com/repos/jquery/jquery/contents/test/qunit?ref=master", + "git_url": "https://api.github.com/repos/jquery/qunit/git/trees/6ca3721222109997540bd6d9ccd396902e0ad2f9", + "html_url": "https://github.com/jquery/qunit/tree/6ca3721222109997540bd6d9ccd396902e0ad2f9", + "download_url": null, + "_links": { + "git": "https://api.github.com/repos/jquery/qunit/git/trees/6ca3721222109997540bd6d9ccd396902e0ad2f9", + "self": "https://api.github.com/repos/jquery/jquery/contents/test/qunit?ref=master", + "html": "https://github.com/jquery/qunit/tree/6ca3721222109997540bd6d9ccd396902e0ad2f9" + } + } + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/contents/PATH" + }, + { + "lang": "JS", + "source": "octokit.repos.getContents({\n owner: 'octocat',\n repo: 'hello-world',\n path: 'path'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.contents(\n 'hello-world',\n 'path'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "put": { + "summary": "Create or update a file", + "description": "Creates a new file or updates an existing file in a repository.", + "operationId": "repos/create-or-update-file", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/contents/#create-or-update-a-file" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "path", + "description": "path parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "content": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "size": { + "type": "number" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "download_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "_links": { + "type": "object", + "properties": { + "self": { + "type": "string" + }, + "git": { + "type": "string" + }, + "html": { + "type": "string" + } + } + } + } + }, + "commit": { + "type": "object", + "properties": { + "sha": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "author": { + "type": "object", + "properties": { + "date": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + } + } + }, + "committer": { + "type": "object", + "properties": { + "date": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + } + } + }, + "message": { + "type": "string" + }, + "tree": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "sha": { + "type": "string" + } + } + }, + "parents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "sha": { + "type": "string" + } + } + } + }, + "verification": { + "type": "object", + "properties": { + "verified": { + "type": "boolean" + }, + "reason": { + "type": "string" + }, + "signature": { + "type": "string" + }, + "payload": { + "type": "string" + } + } + } + } + } + } + }, + "examples": { + "example-for-updating-a-file": { + "value": { + "content": { + "name": "hello.txt", + "path": "notes/hello.txt", + "sha": "a56507ed892d05a37c6d6128c260937ea4d287bd", + "size": 9, + "url": "https://api.github.com/repos/octocat/Hello-World/contents/notes/hello.txt", + "html_url": "https://github.com/octocat/Hello-World/blob/master/notes/hello.txt", + "git_url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/a56507ed892d05a37c6d6128c260937ea4d287bd", + "download_url": "https://raw.githubusercontent.com/octocat/HelloWorld/master/notes/hello.txt", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/octocat/Hello-World/contents/notes/hello.txt", + "git": "https://api.github.com/repos/octocat/Hello-World/git/blobs/a56507ed892d05a37c6d6128c260937ea4d287bd", + "html": "https://github.com/octocat/Hello-World/blob/master/notes/hello.txt" + } + }, + "commit": { + "sha": "18a43cd8e1e3a79c786e3d808a73d23b6d212b16", + "node_id": "MDY6Q29tbWl0MThhNDNjZDhlMWUzYTc5Yzc4NmUzZDgwOGE3M2QyM2I2ZDIxMmIxNg==", + "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/18a43cd8e1e3a79c786e3d808a73d23b6d212b16", + "html_url": "https://github.com/octocat/Hello-World/git/commit/18a43cd8e1e3a79c786e3d808a73d23b6d212b16", + "author": { + "date": "2014-11-07T22:01:45Z", + "name": "Monalisa Octocat", + "email": "octocat@github.com" + }, + "committer": { + "date": "2014-11-07T22:01:45Z", + "name": "Monalisa Octocat", + "email": "octocat@github.com" + }, + "message": "my commit message", + "tree": { + "url": "https://api.github.com/repos/octocat/Hello-World/git/trees/9a21f8e2018f42ffcf369b24d2cd20bc25c9e66f", + "sha": "9a21f8e2018f42ffcf369b24d2cd20bc25c9e66f" + }, + "parents": [ + { + "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/da5a433788da5c255edad7979b328b67d79f53f6", + "html_url": "https://github.com/octocat/Hello-World/git/commit/da5a433788da5c255edad7979b328b67d79f53f6", + "sha": "da5a433788da5c255edad7979b328b67d79f53f6" + } + ], + "verification": { + "verified": false, + "reason": "unsigned", + "signature": null, + "payload": null + } + } + } + } + } + } + } + }, + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "content": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "size": { + "type": "number" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "download_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "_links": { + "type": "object", + "properties": { + "self": { + "type": "string" + }, + "git": { + "type": "string" + }, + "html": { + "type": "string" + } + } + } + } + }, + "commit": { + "type": "object", + "properties": { + "sha": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "author": { + "type": "object", + "properties": { + "date": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + } + } + }, + "committer": { + "type": "object", + "properties": { + "date": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + } + } + }, + "message": { + "type": "string" + }, + "tree": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "sha": { + "type": "string" + } + } + }, + "parents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "sha": { + "type": "string" + } + } + } + }, + "verification": { + "type": "object", + "properties": { + "verified": { + "type": "boolean" + }, + "reason": { + "type": "string" + }, + "signature": { + "type": "string" + }, + "payload": { + "type": "string" + } + } + } + } + } + } + }, + "examples": { + "example-for-creating-a-file": { + "value": { + "content": { + "name": "hello.txt", + "path": "notes/hello.txt", + "sha": "95b966ae1c166bd92f8ae7d1c313e738c731dfc3", + "size": 9, + "url": "https://api.github.com/repos/octocat/Hello-World/contents/notes/hello.txt", + "html_url": "https://github.com/octocat/Hello-World/blob/master/notes/hello.txt", + "git_url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/95b966ae1c166bd92f8ae7d1c313e738c731dfc3", + "download_url": "https://raw.githubusercontent.com/octocat/HelloWorld/master/notes/hello.txt", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/octocat/Hello-World/contents/notes/hello.txt", + "git": "https://api.github.com/repos/octocat/Hello-World/git/blobs/95b966ae1c166bd92f8ae7d1c313e738c731dfc3", + "html": "https://github.com/octocat/Hello-World/blob/master/notes/hello.txt" + } + }, + "commit": { + "sha": "7638417db6d59f3c431d3e1f261cc637155684cd", + "node_id": "MDY6Q29tbWl0NzYzODQxN2RiNmQ1OWYzYzQzMWQzZTFmMjYxY2M2MzcxNTU2ODRjZA==", + "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd", + "html_url": "https://github.com/octocat/Hello-World/git/commit/7638417db6d59f3c431d3e1f261cc637155684cd", + "author": { + "date": "2014-11-07T22:01:45Z", + "name": "Monalisa Octocat", + "email": "octocat@github.com" + }, + "committer": { + "date": "2014-11-07T22:01:45Z", + "name": "Monalisa Octocat", + "email": "octocat@github.com" + }, + "message": "my commit message", + "tree": { + "url": "https://api.github.com/repos/octocat/Hello-World/git/trees/691272480426f78a0138979dd3ce63b77f706feb", + "sha": "691272480426f78a0138979dd3ce63b77f706feb" + }, + "parents": [ + { + "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/1acc419d4d6a9ce985db7be48c6349a0475975b5", + "html_url": "https://github.com/octocat/Hello-World/git/commit/1acc419d4d6a9ce985db7be48c6349a0475975b5", + "sha": "1acc419d4d6a9ce985db7be48c6349a0475975b5" + } + ], + "verification": { + "verified": false, + "reason": "unsigned", + "signature": null, + "payload": null + } + } + } + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\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\"}'" + }, + { + "lang": "JS", + "source": "octokit.repos.createOrUpdateFile({\n owner: 'octocat',\n repo: 'hello-world',\n path: 'path',\n message: 'message',\n content: 'content'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_or_update_file(\n 'hello-world',\n 'path',\n 'message',\n 'content'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "operation", + "date": "2019-06-07", + "note": "\"Create a file\" replaced by \"Create or update a file\"", + "before": { + "operationId": "repos/create-file" + }, + "after": { + "operationId": "repos/create-or-update-file" + } + }, + { + "type": "operation", + "date": "2019-06-07", + "note": "\"Update a file\" replaced by \"Create or update a file\"", + "before": { + "operationId": "repos/update-file" + }, + "after": { + "operationId": "repos/create-or-update-file" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "The commit message." + }, + "content": { + "type": "string", + "description": "The new file content, using Base64 encoding." + }, + "sha": { + "type": "string", + "description": "**Required if you are updating a file**. The blob SHA of the file being replaced." + }, + "branch": { + "type": "string", + "description": "The branch name. Default: the repository’s default branch (usually `master`)" + }, + "committer": { + "type": "object", + "description": "The person that committed the file. Default: the authenticated user.", + "properties": { + "name": { + "type": "string", + "description": "The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted." + }, + "email": { + "type": "string", + "description": "The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted." + } + }, + "required": [ + "name", + "email" + ] + }, + "author": { + "type": "object", + "description": "The author of the file. Default: The `committer` or the authenticated user if you omit `committer`.", + "properties": { + "name": { + "type": "string", + "description": "The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted." + }, + "email": { + "type": "string", + "description": "The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted." + } + }, + "required": [ + "name", + "email" + ] + } + }, + "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" + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete a file", + "description": "Deletes a file in a repository.\n\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.\n\nThe `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.\n\nYou must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code.", + "operationId": "repos/delete-file", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/contents/#delete-a-file" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "path", + "description": "path parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "commit": { + "type": "object", + "properties": { + "sha": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "author": { + "type": "object", + "properties": { + "date": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + } + } + }, + "committer": { + "type": "object", + "properties": { + "date": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + } + } + }, + "message": { + "type": "string" + }, + "tree": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "sha": { + "type": "string" + } + } + }, + "parents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "sha": { + "type": "string" + } + } + } + }, + "verification": { + "type": "object", + "properties": { + "verified": { + "type": "boolean" + }, + "reason": { + "type": "string" + }, + "signature": { + "type": "string" + }, + "payload": { + "type": "string" + } + } + } + } + } + } + }, + "example": { + "content": null, + "commit": { + "sha": "7638417db6d59f3c431d3e1f261cc637155684cd", + "node_id": "MDY6Q29tbWl0NzYzODQxN2RiNmQ1OWYzYzQzMWQzZTFmMjYxY2M2MzcxNTU2ODRjZA==", + "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd", + "html_url": "https://github.com/octocat/Hello-World/git/commit/7638417db6d59f3c431d3e1f261cc637155684cd", + "author": { + "date": "2014-11-07T22:01:45Z", + "name": "Monalisa Octocat", + "email": "octocat@github.com" + }, + "committer": { + "date": "2014-11-07T22:01:45Z", + "name": "Monalisa Octocat", + "email": "octocat@github.com" + }, + "message": "my commit message", + "tree": { + "url": "https://api.github.com/repos/octocat/Hello-World/git/trees/691272480426f78a0138979dd3ce63b77f706feb", + "sha": "691272480426f78a0138979dd3ce63b77f706feb" + }, + "parents": [ + { + "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/1acc419d4d6a9ce985db7be48c6349a0475975b5", + "html_url": "https://github.com/octocat/Hello-World/git/commit/1acc419d4d6a9ce985db7be48c6349a0475975b5", + "sha": "1acc419d4d6a9ce985db7be48c6349a0475975b5" + } + ], + "verification": { + "verified": false, + "reason": "unsigned", + "signature": null, + "payload": null + } + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\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\"}'" + }, + { + "lang": "JS", + "source": "octokit.repos.deleteFile({\n owner: 'octocat',\n repo: 'hello-world',\n path: 'path',\n message: 'message',\n sha: 'sha'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_file(\n 'hello-world',\n 'path',\n 'message',\n 'sha'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "The commit message." + }, + "sha": { + "type": "string", + "description": "The blob SHA of the file being replaced." + }, + "branch": { + "type": "string", + "description": "The branch name. Default: the repository’s default branch (usually `master`)" + }, + "committer": { + "type": "object", + "description": "object containing information about the committer.", + "properties": { + "name": { + "type": "string", + "description": "The name of the author (or committer) of the commit" + }, + "email": { + "type": "string", + "description": "The email of the author (or committer) of the commit" + } + } + }, + "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" + }, + "email": { + "type": "string", + "description": "The email of the author (or committer) of the commit" + } + } + } + }, + "required": [ + "message", + "sha" + ] + }, + "example": { + "message": "my commit message", + "committer": { + "name": "Monalisa Octocat", + "email": "octocat@github.com" + }, + "sha": "329688480d39049927147c162b9d2deaf885005f" + } + } + } + } + } + }, + "/repos/{owner}/{repo}/contributors": { + "get": { + "summary": "List contributors", + "description": "Lists 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.\n\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.", + "operationId": "repos/list-contributors", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/#list-contributors" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "anon", + "description": "Set to `1` or `true` to include anonymous contributors in results.", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "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 if repository contains content", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + }, + "contributions": { + "type": "number" + } + } + } + }, + "examples": { + "response-if-repository-contains-content": { + "value": [ + { + "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, + "contributions": 32 + } + ] + } + } + } + } + }, + "204": { + "description": "Response if repository is empty" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/contributors" + }, + { + "lang": "JS", + "source": "octokit.repos.listContributors({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.contributors(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/deployments": { + "get": { + "summary": "List deployments", + "description": "Simple filtering of deployments is available via query parameters:", + "operationId": "repos/list-deployments", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/deployments/#list-deployments" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "sha", + "description": "The SHA recorded at creation time.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "none" + } + }, + { + "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" + } + }, + { + "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" + } + }, + { + "name": "environment", + "description": "The name of the environment that was deployed to (e.g., `staging` or `production`).", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "none" + } + }, + { + "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": { + "url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "ref": { + "type": "string" + }, + "task": { + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "deploy": { + "type": "string" + } + } + }, + "original_environment": { + "type": "string" + }, + "environment": { + "type": "string" + }, + "description": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "repository_url": { + "type": "string" + }, + "transient_environment": { + "type": "boolean" + }, + "production_environment": { + "type": "boolean" + } + } + } + }, + "example": [ + { + "url": "https://api.github.com/repos/octocat/example/deployments/1", + "id": 1, + "node_id": "MDEwOkRlcGxveW1lbnQx", + "sha": "a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d", + "ref": "topic-branch", + "task": "deploy", + "payload": { + "deploy": "migrate" + }, + "original_environment": "staging", + "environment": "production", + "description": "Deploy request from hubot", + "creator": { + "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 + }, + "created_at": "2012-07-20T01:19:13Z", + "updated_at": "2012-07-20T01:19:13Z", + "statuses_url": "https://api.github.com/repos/octocat/example/deployments/1/statuses", + "repository_url": "https://api.github.com/repos/octocat/example", + "transient_environment": false, + "production_environment": true + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/deployments" + }, + { + "lang": "JS", + "source": "octokit.repos.listDeployments({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.deployments(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "ant-man", + "note": "The `transient_environment` and `production_environment` parameters are 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-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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.ant-man-preview+json\n\n```", + "required": false + } + ] + }, + "x-changes": [] + }, + "post": { + "summary": "Create a deployment", + "description": "Deployments offer a few configurable parameters with sane defaults.\n\nThe `ref` parameter can be any named branch, tag, or SHA. At GitHub we often deploy branches and verify them before we merge a pull request.\n\nThe `environment` parameter allows deployments to be issued to different runtime environments. Teams often have multiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter makes it easier to track which environments have requested deployments. The default environment is `production`.\n\nThe `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If the ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds, the API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will return a failure response.\n\nBy default, [commit statuses](https://developer.github.com/v3/repos/statuses) for every submitted context must be in a `success` state. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to specify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do not require any contexts or create any commit statuses, the deployment will always succeed.\n\nThe `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text field that will be passed on when a deployment event is dispatched.\n\nThe `task` parameter is used by the deployment system to allow different execution paths. In the web world this might be `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an application with debugging enabled.\n\nUsers with `repo` or `repo_deployment` scopes can create a deployment for a given ref:\n\nA simple example putting the user and room into the payload to notify back to chat networks.\n\nA more advanced example specifying required commit statuses and bypassing auto-merging.\n\nYou will see this response when GitHub automatically merges the base branch into the topic branch instead of creating a deployment. This auto-merge happens when:\n\n* Auto-merge option is enabled in the repository\n* Topic branch does not include the latest changes on the base branch, which is `master` in the response example\n* There are no merge conflicts\n\nIf there are no new commits in the base branch, a new request to create a deployment should give a successful response.\n\nThis error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can't be merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts.\n\nThis error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success` status for the commit to be deployed, but one or more of the required contexts do not have a state of `success`.", + "operationId": "repos/create-deployment", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/deployments/#create-a-deployment" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "ref": { + "type": "string" + }, + "task": { + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "deploy": { + "type": "string" + } + } + }, + "original_environment": { + "type": "string" + }, + "environment": { + "type": "string" + }, + "description": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "repository_url": { + "type": "string" + }, + "transient_environment": { + "type": "boolean" + }, + "production_environment": { + "type": "boolean" + } + } + }, + "examples": { + "simple-example": { + "summary": "Simple example", + "value": { + "url": "https://api.github.com/repos/octocat/example/deployments/1", + "id": 1, + "node_id": "MDEwOkRlcGxveW1lbnQx", + "sha": "a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d", + "ref": "topic-branch", + "task": "deploy", + "payload": { + "deploy": "migrate" + }, + "original_environment": "staging", + "environment": "production", + "description": "Deploy request from hubot", + "creator": { + "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 + }, + "created_at": "2012-07-20T01:19:13Z", + "updated_at": "2012-07-20T01:19:13Z", + "statuses_url": "https://api.github.com/repos/octocat/example/deployments/1/statuses", + "repository_url": "https://api.github.com/repos/octocat/example", + "transient_environment": false, + "production_environment": true + } + }, + "advanced-example": { + "summary": "Advanced example", + "value": { + "url": "https://api.github.com/repos/octocat/example/deployments/1", + "id": 1, + "node_id": "MDEwOkRlcGxveW1lbnQx", + "sha": "a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d", + "ref": "topic-branch", + "task": "deploy", + "payload": { + "deploy": "migrate" + }, + "original_environment": "staging", + "environment": "production", + "description": "Deploy request from hubot", + "creator": { + "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 + }, + "created_at": "2012-07-20T01:19:13Z", + "updated_at": "2012-07-20T01:19:13Z", + "statuses_url": "https://api.github.com/repos/octocat/example/deployments/1/statuses", + "repository_url": "https://api.github.com/repos/octocat/example", + "transient_environment": false, + "production_environment": true + } + } + } + } + } + }, + "202": { + "description": "Merged branch response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + }, + "examples": { + "merged-branch-response": { + "value": { + "message": "Auto-merged master into topic-branch on deployment." + } + } + } + } + } + }, + "409": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + }, + "examples": { + "merge-conflict-response": { + "summary": "Merge conflict response", + "value": { + "message": "Conflict merging master into topic-branch" + } + }, + "failed-commit-status-checks": { + "summary": "Failed commit status checks", + "value": { + "message": "Conflict: Commit status checks failed for topic-branch." + } + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/deployments \\\n -d '{\"ref\":\"ref\"}'" + }, + { + "lang": "JS", + "source": "octokit.repos.createDeployment({\n owner: 'octocat',\n repo: 'hello-world',\n ref: 'ref'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_deployment(\n 'hello-world',\n 'ref'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "ant-man", + "note": "The `transient_environment` and `production_environment` parameters are 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-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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.ant-man-preview+json\n\n```", + "required": false + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ref": { + "type": "string", + "description": "The ref to deploy. This can be a branch, tag, or SHA." + }, + "task": { + "type": "string", + "description": "Specifies a task to execute (e.g., `deploy` or `deploy:migrations`).", + "default": "deploy" + }, + "auto_merge": { + "type": "boolean", + "description": "Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch.", + "default": true + }, + "required_contexts": { + "type": "array", + "description": "The [status](https://developer.github.com/v3/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.", + "items": { + "type": "string" + } + }, + "payload": { + "type": "string", + "description": "JSON payload with extra information about the deployment.", + "default": "" + }, + "environment": { + "type": "string", + "description": "Name for the target deployment environment (e.g., `production`, `staging`, `qa`).", + "default": "production" + }, + "description": { + "type": "string", + "description": "Short description of the deployment.", + "default": "" + }, + "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` \n**Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type.", + "default": false + }, + "production_environment": { + "type": "boolean", + "description": "Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise. \n**Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type." + } + }, + "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" + ] + } + } + } + } + } + } + } + }, + "/repos/{owner}/{repo}/deployments/{deployment_id}": { + "get": { + "summary": "Get a single deployment", + "description": "", + "operationId": "repos/get-deployment", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/deployments/#get-a-single-deployment" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "deployment_id", + "description": "deployment_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "ref": { + "type": "string" + }, + "task": { + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "deploy": { + "type": "string" + } + } + }, + "original_environment": { + "type": "string" + }, + "environment": { + "type": "string" + }, + "description": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "repository_url": { + "type": "string" + }, + "transient_environment": { + "type": "boolean" + }, + "production_environment": { + "type": "boolean" + } + } + }, + "example": { + "url": "https://api.github.com/repos/octocat/example/deployments/1", + "id": 1, + "node_id": "MDEwOkRlcGxveW1lbnQx", + "sha": "a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d", + "ref": "topic-branch", + "task": "deploy", + "payload": { + "deploy": "migrate" + }, + "original_environment": "staging", + "environment": "production", + "description": "Deploy request from hubot", + "creator": { + "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 + }, + "created_at": "2012-07-20T01:19:13Z", + "updated_at": "2012-07-20T01:19:13Z", + "statuses_url": "https://api.github.com/repos/octocat/example/deployments/1/statuses", + "repository_url": "https://api.github.com/repos/octocat/example", + "transient_environment": false, + "production_environment": true + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/deployments/42" + }, + { + "lang": "JS", + "source": "octokit.repos.getDeployment({\n owner: 'octocat',\n repo: 'hello-world',\n deployment_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.deployment(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "machine-man", + "note": "If a deployment is created via a GitHub App, the response will include the `performed_via_github_app` object with information about the GitHub App. For more information, see the [related blog post](https://developer.github.com/changes/2016-09-14-Integrations-Early-Access).\n\nTo receive the `performed_via_github_app` object is the response, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.machine-man-preview\n\n```", + "required": false + }, + { + "name": "ant-man", + "note": "The `transient_environment` and `production_environment` parameters are 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-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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.ant-man-preview+json\n\n```", + "required": false + } + ] + }, + "x-changes": [] + }, + "delete": { + "summary": "Delete a deployment", + "description": "To ensure there can always be an active deployment, you can only delete an _inactive_ deployment. Anyone with `repo` or `repo_deployment` scopes can delete an inactive deployment.\n\nTo set a deployment as inactive, you must:\n\n* Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment.\n* Mark the active deployment as inactive by adding any non-successful deployment status.\n\nFor more information, see \"[Create a deployment](https://developer.github.com/v3/repos/deployments/#create-a-deployment)\" and \"[Create a deployment status](https://developer.github.com/v3/repos/deployments/#create-a-deployment-status).\"", + "operationId": "repos/delete-deployment", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/deployments/#delete-a-deployment" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "deployment_id", + "description": "deployment_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/deployments/42" + }, + { + "lang": "JS", + "source": "octokit.repos.deleteDeployment({\n owner: 'octocat',\n repo: 'hello-world',\n deployment_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_deployment(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses": { + "get": { + "summary": "List deployment statuses", + "description": "Users with pull access can view deployment statuses for a deployment:", + "operationId": "repos/list-deployment-statuses", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/deployments/#list-deployment-statuses" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "deployment_id", + "description": "deployment_id parameter", + "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": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "state": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "description": { + "type": "string" + }, + "environment": { + "type": "string" + }, + "target_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "deployment_url": { + "type": "string" + }, + "repository_url": { + "type": "string" + }, + "environment_url": { + "type": "string" + }, + "log_url": { + "type": "string" + } + } + } + }, + "example": [ + { + "url": "https://api.github.com/repos/octocat/example/deployments/42/statuses/1", + "id": 1, + "node_id": "MDE2OkRlcGxveW1lbnRTdGF0dXMx", + "state": "success", + "creator": { + "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 + }, + "description": "Deployment finished successfully.", + "environment": "production", + "target_url": "https://example.com/deployment/42/output", + "created_at": "2012-07-20T01:19:13Z", + "updated_at": "2012-07-20T01:19:13Z", + "deployment_url": "https://api.github.com/repos/octocat/example/deployments/42", + "repository_url": "https://api.github.com/repos/octocat/example", + "environment_url": "", + "log_url": "https://example.com/deployment/42/output" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/deployments/42/statuses" + }, + { + "lang": "JS", + "source": "octokit.repos.listDeploymentStatuses({\n owner: 'octocat',\n repo: 'hello-world',\n deployment_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.deployment_statuses(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "flash", + "note": "New features in the Deployments API on GitHub are currently available during a public beta. Please see the [blog post](https://developer.github.com/changes/2018-10-16-deployments-environments-states-and-auto-inactive-updates/) for full details.\n\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](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.flash-preview+json\n\n```", + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.ant-man-preview+json\n\n```", + "required": false + } + ] + }, + "x-changes": [] + }, + "post": { + "summary": "Create a deployment status", + "description": "Users with `push` access can create deployment statuses for a given deployment.\n\nGitHub Apps require `read & write` access to \"Deployments\" and `read-only` access to \"Repo contents\" (for private repos). OAuth Apps require the `repo_deployment` scope.", + "operationId": "repos/create-deployment-status", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/deployments/#create-a-deployment-status" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "deployment_id", + "description": "deployment_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "state": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "description": { + "type": "string" + }, + "environment": { + "type": "string" + }, + "target_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "deployment_url": { + "type": "string" + }, + "repository_url": { + "type": "string" + }, + "environment_url": { + "type": "string" + }, + "log_url": { + "type": "string" + } + } + }, + "example": { + "url": "https://api.github.com/repos/octocat/example/deployments/42/statuses/1", + "id": 1, + "node_id": "MDE2OkRlcGxveW1lbnRTdGF0dXMx", + "state": "success", + "creator": { + "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 + }, + "description": "Deployment finished successfully.", + "environment": "production", + "target_url": "https://example.com/deployment/42/output", + "created_at": "2012-07-20T01:19:13Z", + "updated_at": "2012-07-20T01:19:13Z", + "deployment_url": "https://api.github.com/repos/octocat/example/deployments/42", + "repository_url": "https://api.github.com/repos/octocat/example", + "environment_url": "", + "log_url": "https://example.com/deployment/42/output" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/deployments/42/statuses \\\n -d '{\"state\":\"state\"}'" + }, + { + "lang": "JS", + "source": "octokit.repos.createDeploymentStatus({\n owner: 'octocat',\n repo: 'hello-world',\n deployment_id: 42,\n state: 'state'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_deployment_status(\n 'hello-world',\n 42,\n 'state'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "flash", + "note": "New features in the Deployments API on GitHub are currently available during a public beta. Please see the [blog post](https://developer.github.com/changes/2018-10-16-deployments-environments-states-and-auto-inactive-updates/) for full details.\n\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](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.flash-preview+json\n\n```", + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.ant-man-preview+json\n\n```", + "required": false + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "state": { + "type": "string", + "description": "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`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. To use the `in_progress` and `queued` states, you must provide the [`application/vnd.github.flash-preview+json`](https://developer.github.com/v3/previews/#deployment-statuses) custom media type.", + "enum": [ + "error", + "failure", + "inactive", + "in_progress", + "queued", + "pending", + "success" + ] + }, + "target_url": { + "type": "string", + "description": "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`.", + "default": "" + }, + "log_url": { + "type": "string", + "description": "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: `\"\"` \n**Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type.", + "default": "" + }, + "description": { + "type": "string", + "description": "A short description of the status. The maximum description length is 140 characters.", + "default": "" + }, + "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`](https://developer.github.com/v3/previews/#deployment-statuses) custom media type.", + "enum": [ + "production", + "staging", + "qa" + ] + }, + "environment_url": { + "type": "string", + "description": "Sets the URL for accessing your environment. Default: `\"\"` \n**Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type.", + "default": "" + }, + "auto_inactive": { + "type": "boolean", + "description": "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` \n**Note:** To add an `inactive` status to `production` environments, you must use the [`application/vnd.github.flash-preview+json`](https://developer.github.com/v3/previews/#deployment-statuses) custom media type. \n**Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type." + } + }, + "required": [ + "state" + ] + }, + "example": { + "environment": "production", + "state": "success", + "log_url": "https://example.com/deployment/42/output", + "description": "Deployment finished successfully." + } + } + } + } + } + }, + "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}": { + "get": { + "summary": "Get a single deployment status", + "description": "Users with pull access can view a deployment status for a deployment:", + "operationId": "repos/get-deployment-status", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/deployments/#get-a-single-deployment-status" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "deployment_id", + "description": "deployment_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "status_id", + "description": "status_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "state": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "description": { + "type": "string" + }, + "environment": { + "type": "string" + }, + "target_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "deployment_url": { + "type": "string" + }, + "repository_url": { + "type": "string" + }, + "environment_url": { + "type": "string" + }, + "log_url": { + "type": "string" + } + } + }, + "example": { + "url": "https://api.github.com/repos/octocat/example/deployments/42/statuses/1", + "id": 1, + "node_id": "MDE2OkRlcGxveW1lbnRTdGF0dXMx", + "state": "success", + "creator": { + "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 + }, + "description": "Deployment finished successfully.", + "environment": "production", + "target_url": "https://example.com/deployment/42/output", + "created_at": "2012-07-20T01:19:13Z", + "updated_at": "2012-07-20T01:19:13Z", + "deployment_url": "https://api.github.com/repos/octocat/example/deployments/42", + "repository_url": "https://api.github.com/repos/octocat/example", + "environment_url": "", + "log_url": "https://example.com/deployment/42/output" + } + } + } + } + }, + "x-code-samples": [ + { + "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" + }, + { + "lang": "JS", + "source": "octokit.repos.getDeploymentStatus({\n owner: 'octocat',\n repo: 'hello-world',\n deployment_id: 42,\n status_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.deployment_status(\n 'hello-world',\n 42,\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "machine-man", + "note": "If a deployment is created via a GitHub App, the response will include the `performed_via_github_app` object with information about the GitHub App. For more information, see the [related blog post](https://developer.github.com/changes/2016-09-14-Integrations-Early-Access).\n\nTo receive the `performed_via_github_app` object is the response, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.machine-man-preview\n\n```", + "required": false + }, + { + "name": "flash", + "note": "New features in the Deployments API on GitHub are currently available during a public beta. Please see the [blog post](https://developer.github.com/changes/2018-10-16-deployments-environments-states-and-auto-inactive-updates/) for full details.\n\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](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.flash-preview+json\n\n```", + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.ant-man-preview+json\n\n```", + "required": false + } + ] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/dispatches": { + "post": { + "summary": "Create a repository dispatch event", + "description": "You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see \"[RepositoryDispatchEvent](https://developer.github.com/v3/activity/events/types/#repositorydispatchevent).\"\n\nThe `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow. For a test example, see the [input example](https://developer.github.com/v3/repos/#example-4).\n\nTo give you write access to the repository, you must use a personal access token with the `repo` scope. For more information, see \"[Creating a personal access token for the command line](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line)\" in the GitHub Help documentation.\n\nThis input example shows how you can use the `client_payload` as a test to debug your workflow.", + "operationId": "repos/create-dispatch-event", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/#create-a-repository-dispatch-event" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/dispatches \\\n -d '{\"event_type\":\"event_type\"}'" + }, + { + "lang": "JS", + "source": "octokit.repos.createDispatchEvent({\n owner: 'octocat',\n repo: 'hello-world',\n event_type: 'event_type'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_dispatch_event(\n 'hello-world',\n 'event_type'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "event_type": { + "type": "string", + "description": "**Required:** A custom webhook event name." + }, + "client_payload": { + "type": "object", + "description": "JSON payload with extra information about the webhook event that your action or worklow may use.", + "default": {}, + "properties": {} + } + } + }, + "example": { + "event_type": "on-demand-test", + "client_payload": { + "unit": false, + "integration": true + } + } + } + } + } + } + }, + "/repos/{owner}/{repo}/downloads": { + "get": { + "summary": "List downloads for a repository", + "description": "", + "operationId": "repos/list-downloads", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/downloads/#list-downloads-for-a-repository" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "size": { + "type": "number" + }, + "download_count": { + "type": "number" + }, + "content_type": { + "type": "string" + } + } + } + }, + "example": [ + { + "url": "https://api.github.com/repos/octocat/Hello-World/downloads/1", + "html_url": "https://github.com/repos/octocat/Hello-World/downloads/new_file.jpg", + "id": 1, + "name": "new_file.jpg", + "description": "Description of your download", + "size": 1024, + "download_count": 40, + "content_type": ".jpg" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/downloads" + }, + { + "lang": "JS", + "source": "octokit.repos.listDownloads({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.downloads(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/downloads/{download_id}": { + "get": { + "summary": "Get a single download", + "description": "", + "operationId": "repos/get-download", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/downloads/#get-a-single-download" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "download_id", + "description": "download_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "size": { + "type": "number" + }, + "download_count": { + "type": "number" + }, + "content_type": { + "type": "string" + } + } + }, + "example": { + "url": "https://api.github.com/repos/octocat/Hello-World/downloads/1", + "html_url": "https://github.com/repos/octocat/Hello-World/downloads/new_file.jpg", + "id": 1, + "name": "new_file.jpg", + "description": "Description of your download", + "size": 1024, + "download_count": 40, + "content_type": ".jpg" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/downloads/42" + }, + { + "lang": "JS", + "source": "octokit.repos.getDownload({\n owner: 'octocat',\n repo: 'hello-world',\n download_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.download(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "delete": { + "summary": "Delete a download", + "description": "", + "operationId": "repos/delete-download", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/downloads/#delete-a-download" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "download_id", + "description": "download_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/downloads/42" + }, + { + "lang": "JS", + "source": "octokit.repos.deleteDownload({\n owner: 'octocat',\n repo: 'hello-world',\n download_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_download(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/events": { + "get": { + "summary": "List repository events", + "description": "", + "operationId": "activity/list-repo-events", + "tags": [ + "activity" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/activity/events/#list-repository-events" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "418": { + "description": "Response definition missing" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/events" + }, + { + "lang": "JS", + "source": "octokit.activity.listRepoEvents({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.repo_events(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/forks": { + "get": { + "summary": "List forks", + "description": "", + "operationId": "repos/list-forks", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/forks/#list-forks" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "sort", + "description": "The sort order. Can be either `newest`, `oldest`, or `stargazers`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "newest", + "oldest", + "stargazers" + ], + "default": "newest" + } + }, + { + "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": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + }, + "license": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "spdx_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "node_id": { + "type": "string" + } + } + } + } + } + }, + "example": [ + { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": true, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "subscribers_count": 42, + "network_count": 0, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZW1pdA==" + } + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/forks" + }, + { + "lang": "JS", + "source": "octokit.repos.listForks({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.forks(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "post": { + "summary": "Create a fork", + "description": "Create a fork for the authenticated user.\n\n**Note**: 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 Support](https://github.com/contact) or [GitHub Premium Support](https://premium.githubsupport.com).", + "operationId": "repos/create-fork", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/forks/#create-a-fork" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "202": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + }, + "example": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": true, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/forks \\\n -d '{\"organization\":\"organization\"}'" + }, + { + "lang": "JS", + "source": "octokit.repos.createFork({\n owner: 'octocat',\n repo: 'hello-world',\n organization: 'organization'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_fork(\n 'hello-world',\n 'organization'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "organization": { + "type": "string", + "description": "Optional parameter to specify the organization name if forking into an organization." + } + } + } + } + } + } + } + }, + "/repos/{owner}/{repo}/git/blobs": { + "post": { + "summary": "Create a blob", + "description": "", + "operationId": "git/create-blob", + "tags": [ + "git" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/git/blobs/#create-a-blob" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "sha": { + "type": "string" + } + } + }, + "example": { + "url": "https://api.github.com/repos/octocat/example/git/blobs/3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15", + "sha": "3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/git/blobs \\\n -d '{\"content\":\"content\"}'" + }, + { + "lang": "JS", + "source": "octokit.git.createBlob({\n owner: 'octocat',\n repo: 'hello-world',\n content: 'content'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_blob(\n 'hello-world',\n 'content'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "The new blob's content." + }, + "encoding": { + "type": "string", + "description": "The encoding used for `content`. Currently, `\"utf-8\"` and `\"base64\"` are supported.", + "default": "utf-8" + } + }, + "required": [ + "content" + ] + }, + "example": { + "content": "Content of the blob", + "encoding": "utf-8" + } + } + } + } + } + }, + "/repos/{owner}/{repo}/git/blobs/{file_sha}": { + "get": { + "summary": "Get a blob", + "description": "The `content` in the response will always be Base64 encoded.\n\n_Note_: This API supports blobs up to 100 megabytes in size.", + "operationId": "git/get-blob", + "tags": [ + "git" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/git/blobs/#get-a-blob" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "file_sha", + "description": "file_sha parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "encoding": { + "type": "string" + }, + "url": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "size": { + "type": "number" + } + } + }, + "example": { + "content": "Q29udGVudCBvZiB0aGUgYmxvYg==\n", + "encoding": "base64", + "url": "https://api.github.com/repos/octocat/example/git/blobs/3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15", + "sha": "3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15", + "size": 19 + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/git/blobs/FILE_SHA" + }, + { + "lang": "JS", + "source": "octokit.git.getBlob({\n owner: 'octocat',\n repo: 'hello-world',\n file_sha: 'file_sha'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.blob(\n 'hello-world',\n 'file_sha'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/git/commits": { + "post": { + "summary": "Create a commit", + "description": "Creates a new Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects).\n\nIn this example, the payload of the signature would be:\n\n\n\n**Signature verification object**\n\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:\n\nThese are the possible values for `reason` in the `verification` object:\n\n| Value | Description |\n| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- |\n| `expired_key` | The key that made the signature is expired. |\n| `not_signing_key` | The \"signing\" flag is not among the usage flags in the GPG key that made the signature. |\n| `gpgverify_error` | There was an error communicating with the signature verification service. |\n| `gpgverify_unavailable` | The signature verification service is currently unavailable. |\n| `unsigned` | The object does not include a signature. |\n| `unknown_signature_type` | A non-PGP signature was found in the commit. |\n| `no_user` | No user was associated with the `committer` email address in the commit. |\n| `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. |\n| `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |\n| `unknown_key` | The key that made the signature has not been registered with any user's account. |\n| `malformed_signature` | There was an error parsing the signature. |\n| `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |\n| `valid` | None of the above errors applied, so the signature is considered to be verified. |", + "operationId": "git/create-commit", + "tags": [ + "git" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/git/commits/#create-a-commit" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sha": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "author": { + "type": "object", + "properties": { + "date": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + } + } + }, + "committer": { + "type": "object", + "properties": { + "date": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + } + } + }, + "message": { + "type": "string" + }, + "tree": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "sha": { + "type": "string" + } + } + }, + "parents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "sha": { + "type": "string" + } + } + } + }, + "verification": { + "type": "object", + "properties": { + "verified": { + "type": "boolean" + }, + "reason": { + "type": "string" + }, + "signature": { + "type": "string" + }, + "payload": { + "type": "string" + } + } + } + } + }, + "example": { + "sha": "7638417db6d59f3c431d3e1f261cc637155684cd", + "node_id": "MDY6Q29tbWl0NzYzODQxN2RiNmQ1OWYzYzQzMWQzZTFmMjYxY2M2MzcxNTU2ODRjZA==", + "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd", + "author": { + "date": "2014-11-07T22:01:45Z", + "name": "Monalisa Octocat", + "email": "octocat@github.com" + }, + "committer": { + "date": "2014-11-07T22:01:45Z", + "name": "Monalisa Octocat", + "email": "octocat@github.com" + }, + "message": "my commit message", + "tree": { + "url": "https://api.github.com/repos/octocat/Hello-World/git/trees/827efc6d56897b048c772eb4087f854f46256132", + "sha": "827efc6d56897b048c772eb4087f854f46256132" + }, + "parents": [ + { + "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/7d1b31e74ee336d15cbd21741bc88a537ed063a0", + "sha": "7d1b31e74ee336d15cbd21741bc88a537ed063a0" + } + ], + "verification": { + "verified": false, + "reason": "unsigned", + "signature": null, + "payload": null + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\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\",\"parents\":[\"parents\"]}'" + }, + { + "lang": "JS", + "source": "octokit.git.createCommit({\n owner: 'octocat',\n repo: 'hello-world',\n message: 'message',\n tree: 'tree',\n parents: [\n 'parents'\n ]\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_commit(\n 'hello-world',\n 'message',\n 'tree',\n [\n 'parents'\n ]\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "The commit message" + }, + "tree": { + "type": "string", + "description": "The SHA of the tree object this commit points to" + }, + "parents": { + "type": "array", + "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" + } + }, + "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.", + "properties": { + "name": { + "type": "string", + "description": "The name of the author (or committer) of the commit" + }, + "email": { + "type": "string", + "description": "The email of the author (or committer) of the commit" + }, + "date": { + "type": "string", + "description": "Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`." + } + } + }, + "committer": { + "type": "object", + "description": "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.", + "properties": { + "name": { + "type": "string", + "description": "The name of the author (or committer) of the commit" + }, + "email": { + "type": "string", + "description": "The email of the author (or committer) of the commit" + }, + "date": { + "type": "string", + "description": "Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`." + } + } + }, + "signature": { + "type": "string", + "description": "The [PGP signature](https://en.wikipedia.org/wiki/Pretty_Good_Privacy) 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](https://git-scm.com/book/id/v2/Git-Tools-Signing-Your-Work) to create signed commits." + } + }, + "required": [ + "message", + "tree", + "parents" + ] + }, + "example": { + "message": "my commit message", + "author": { + "name": "Mona Octocat", + "email": "octocat@github.com", + "date": "2008-07-09T16:13:30+12:00" + }, + "parents": [ + "7d1b31e74ee336d15cbd21741bc88a537ed063a0" + ], + "tree": "827efc6d56897b048c772eb4087f854f46256132", + "signature": "-----BEGIN PGP SIGNATURE-----\n\niQIzBAABAQAdFiEESn/54jMNIrGSE6Tp6cQjvhfv7nAFAlnT71cACgkQ6cQjvhfv\n7nCWwA//XVqBKWO0zF+bZl6pggvky3Oc2j1pNFuRWZ29LXpNuD5WUGXGG209B0hI\nDkmcGk19ZKUTnEUJV2Xd0R7AW01S/YSub7OYcgBkI7qUE13FVHN5ln1KvH2all2n\n2+JCV1HcJLEoTjqIFZSSu/sMdhkLQ9/NsmMAzpf/iIM0nQOyU4YRex9eD1bYj6nA\nOQPIDdAuaTQj1gFPHYLzM4zJnCqGdRlg0sOM/zC5apBNzIwlgREatOYQSCfCKV7k\nnrU34X8b9BzQaUx48Qa+Dmfn5KQ8dl27RNeWAqlkuWyv3pUauH9UeYW+KyuJeMkU\n+NyHgAsWFaCFl23kCHThbLStMZOYEnGagrd0hnm1TPS4GJkV4wfYMwnI4KuSlHKB\njHl3Js9vNzEUQipQJbgCgTiWvRJoK3ENwBTMVkKHaqT4x9U4Jk/XZB6Q8MA09ezJ\n3QgiTjTAGcum9E9QiJqMYdWQPWkaBIRRz5cET6HPB48YNXAAUsfmuYsGrnVLYbG+\nUpC6I97VybYHTy2O9XSGoaLeMI9CsFn38ycAxxbWagk5mhclNTP5mezIq6wKSwmr\nX11FW3n1J23fWZn5HJMBsRnUCgzqzX3871IqLYHqRJ/bpZ4h20RhTyPj5c/z7QXp\neSakNQMfbbMcljkha+ZMuVQX1K9aRlVqbmv3ZMWh+OijLYVU2bc=\n=5Io4\n-----END PGP SIGNATURE-----\n" + } + } + } + } + } + }, + "/repos/{owner}/{repo}/git/commits/{commit_sha}": { + "get": { + "summary": "Get a commit", + "description": "Gets a Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects).\n\n**Signature verification object**\n\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:\n\nThese are the possible values for `reason` in the `verification` object:\n\n| Value | Description |\n| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- |\n| `expired_key` | The key that made the signature is expired. |\n| `not_signing_key` | The \"signing\" flag is not among the usage flags in the GPG key that made the signature. |\n| `gpgverify_error` | There was an error communicating with the signature verification service. |\n| `gpgverify_unavailable` | The signature verification service is currently unavailable. |\n| `unsigned` | The object does not include a signature. |\n| `unknown_signature_type` | A non-PGP signature was found in the commit. |\n| `no_user` | No user was associated with the `committer` email address in the commit. |\n| `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. |\n| `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |\n| `unknown_key` | The key that made the signature has not been registered with any user's account. |\n| `malformed_signature` | There was an error parsing the signature. |\n| `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |\n| `valid` | None of the above errors applied, so the signature is considered to be verified. |", + "operationId": "git/get-commit", + "tags": [ + "git" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/git/commits/#get-a-commit" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "commit_sha", + "description": "commit_sha parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sha": { + "type": "string" + }, + "url": { + "type": "string" + }, + "author": { + "type": "object", + "properties": { + "date": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + } + } + }, + "committer": { + "type": "object", + "properties": { + "date": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + } + } + }, + "message": { + "type": "string" + }, + "tree": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "sha": { + "type": "string" + } + } + }, + "parents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "sha": { + "type": "string" + } + } + } + }, + "verification": { + "type": "object", + "properties": { + "verified": { + "type": "boolean" + }, + "reason": { + "type": "string" + }, + "signature": { + "type": "string" + }, + "payload": { + "type": "string" + } + } + } + } + }, + "example": { + "sha": "7638417db6d59f3c431d3e1f261cc637155684cd", + "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd", + "author": { + "date": "2014-11-07T22:01:45Z", + "name": "Monalisa Octocat", + "email": "octocat@github.com" + }, + "committer": { + "date": "2014-11-07T22:01:45Z", + "name": "Monalisa Octocat", + "email": "octocat@github.com" + }, + "message": "added readme, because im a good github citizen", + "tree": { + "url": "https://api.github.com/repos/octocat/Hello-World/git/trees/691272480426f78a0138979dd3ce63b77f706feb", + "sha": "691272480426f78a0138979dd3ce63b77f706feb" + }, + "parents": [ + { + "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/1acc419d4d6a9ce985db7be48c6349a0475975b5", + "sha": "1acc419d4d6a9ce985db7be48c6349a0475975b5" + } + ], + "verification": { + "verified": false, + "reason": "unsigned", + "signature": null, + "payload": null + } + } + } + } + } + }, + "x-code-samples": [ + { + "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" + }, + { + "lang": "JS", + "source": "octokit.git.getCommit({\n owner: 'octocat',\n repo: 'hello-world',\n commit_sha: 'commit_sha'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.commit(\n 'hello-world',\n 'commit_sha'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/git/matching-refs/{ref}": { + "get": { + "summary": "List matching references", + "description": "Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array.\n\nWhen 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`.\n\n**Note:** You need to explicitly [request a pull request](https://developer.github.com/v3/pulls/#get-a-single-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see \"[Checking mergeability of pull requests](https://developer.github.com/v3/git/#checking-mergeability-of-pull-requests)\".\n\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`.", + "operationId": "git/list-matching-refs", + "tags": [ + "git" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/git/refs/#list-matching-references" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "ref", + "description": "ref parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "ref": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "object": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "url": { + "type": "string" + } + } + } + } + } + }, + "example": [ + { + "ref": "refs/heads/feature-a", + "node_id": "MDM6UmVmcmVmcy9oZWFkcy9mZWF0dXJlLWE=", + "url": "https://api.github.com/repos/octocat/Hello-World/git/refs/heads/feature-a", + "object": { + "type": "commit", + "sha": "aa218f56b14c9653891f9e74264a383fa43fefbd", + "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd" + } + }, + { + "ref": "refs/heads/feature-b", + "node_id": "MDM6UmVmcmVmcy9oZWFkcy9mZWF0dXJlLWI=", + "url": "https://api.github.com/repos/octocat/Hello-World/git/refs/heads/feature-b", + "object": { + "type": "commit", + "sha": "612077ae6dffb4d2fbd8ce0cccaa58893b07b5ac", + "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/612077ae6dffb4d2fbd8ce0cccaa58893b07b5ac" + } + } + ] + } + } + } + }, + "x-code-samples": [ + { + "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" + }, + { + "lang": "JS", + "source": "octokit.git.listMatchingRefs({\n owner: 'octocat',\n repo: 'hello-world',\n ref: 'ref'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.matching_refs(\n 'hello-world',\n 'ref'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/git/ref/{ref}": { + "get": { + "summary": "Get a single reference", + "description": "Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned.\n\n**Note:** You need to explicitly [request a pull request](https://developer.github.com/v3/pulls/#get-a-single-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see \"[Checking mergeability of pull requests](https://developer.github.com/v3/git/#checking-mergeability-of-pull-requests)\".\n\nTo get the reference for a branch named `skunkworkz/featureA`, the endpoint route is:", + "operationId": "git/get-ref", + "tags": [ + "git" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/git/refs/#get-a-single-reference" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "ref", + "description": "ref parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ref": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "object": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "url": { + "type": "string" + } + } + } + } + }, + "example": { + "ref": "refs/heads/featureA", + "node_id": "MDM6UmVmcmVmcy9oZWFkcy9mZWF0dXJlQQ==", + "url": "https://api.github.com/repos/octocat/Hello-World/git/refs/heads/featureA", + "object": { + "type": "commit", + "sha": "aa218f56b14c9653891f9e74264a383fa43fefbd", + "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/git/ref/REF" + }, + { + "lang": "JS", + "source": "octokit.git.getRef({\n owner: 'octocat',\n repo: 'hello-world',\n ref: 'ref'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.ref(\n 'hello-world',\n 'ref'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/git/refs": { + "post": { + "summary": "Create a reference", + "description": "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.", + "operationId": "git/create-ref", + "tags": [ + "git" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/git/refs/#create-a-reference" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ref": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "object": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "url": { + "type": "string" + } + } + } + } + }, + "example": { + "ref": "refs/heads/featureA", + "node_id": "MDM6UmVmcmVmcy9oZWFkcy9mZWF0dXJlQQ==", + "url": "https://api.github.com/repos/octocat/Hello-World/git/refs/heads/featureA", + "object": { + "type": "commit", + "sha": "aa218f56b14c9653891f9e74264a383fa43fefbd", + "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\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\"}'" + }, + { + "lang": "JS", + "source": "octokit.git.createRef({\n owner: 'octocat',\n repo: 'hello-world',\n ref: 'ref',\n sha: 'sha'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_ref(\n 'hello-world',\n 'ref',\n 'sha'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ref": { + "type": "string", + "description": "The name of the fully qualified reference (ie: `refs/heads/master`). If it doesn't start with 'refs' and have at least two slashes, it will be rejected." + }, + "sha": { + "type": "string", + "description": "The SHA1 value for this reference." + } + }, + "required": [ + "ref", + "sha" + ] + }, + "example": { + "ref": "refs/heads/featureA", + "sha": "aa218f56b14c9653891f9e74264a383fa43fefbd" + } + } + } + } + } + }, + "/repos/{owner}/{repo}/git/refs/{ref}": { + "patch": { + "summary": "Update a reference", + "description": "", + "operationId": "git/update-ref", + "tags": [ + "git" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/git/refs/#update-a-reference" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "ref", + "description": "ref parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ref": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "object": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "url": { + "type": "string" + } + } + } + } + }, + "example": { + "ref": "refs/heads/featureA", + "node_id": "MDM6UmVmcmVmcy9oZWFkcy9mZWF0dXJlQQ==", + "url": "https://api.github.com/repos/octocat/Hello-World/git/refs/heads/featureA", + "object": { + "type": "commit", + "sha": "aa218f56b14c9653891f9e74264a383fa43fefbd", + "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/git/refs/REF \\\n -d '{\"sha\":\"sha\"}'" + }, + { + "lang": "JS", + "source": "octokit.git.updateRef({\n owner: 'octocat',\n repo: 'hello-world',\n ref: 'ref',\n sha: 'sha'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.update_ref(\n 'hello-world',\n 'ref',\n 'sha'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sha": { + "type": "string", + "description": "The SHA1 value to set this reference to" + }, + "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.", + "default": false + } + }, + "required": [ + "sha" + ] + }, + "example": { + "sha": "aa218f56b14c9653891f9e74264a383fa43fefbd", + "force": true + } + } + } + } + }, + "delete": { + "summary": "Delete a reference", + "description": "```\nDELETE /repos/octocat/Hello-World/git/refs/heads/feature-a\n```\n\n```\nDELETE /repos/octocat/Hello-World/git/refs/tags/v1.0\n```", + "operationId": "git/delete-ref", + "tags": [ + "git" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/git/refs/#delete-a-reference" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "ref", + "description": "ref parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/git/refs/REF" + }, + { + "lang": "JS", + "source": "octokit.git.deleteRef({\n owner: 'octocat',\n repo: 'hello-world',\n ref: 'ref'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_ref(\n 'hello-world',\n 'ref'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/git/tags": { + "post": { + "summary": "Create a tag object", + "description": "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](https://developer.github.com/v3/git/refs/#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://developer.github.com/v3/git/refs/#create-a-reference) the tag reference - this call would be unnecessary.\n\n**Signature verification object**\n\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:\n\nThese are the possible values for `reason` in the `verification` object:\n\n| Value | Description |\n| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- |\n| `expired_key` | The key that made the signature is expired. |\n| `not_signing_key` | The \"signing\" flag is not among the usage flags in the GPG key that made the signature. |\n| `gpgverify_error` | There was an error communicating with the signature verification service. |\n| `gpgverify_unavailable` | The signature verification service is currently unavailable. |\n| `unsigned` | The object does not include a signature. |\n| `unknown_signature_type` | A non-PGP signature was found in the commit. |\n| `no_user` | No user was associated with the `committer` email address in the commit. |\n| `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. |\n| `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |\n| `unknown_key` | The key that made the signature has not been registered with any user's account. |\n| `malformed_signature` | There was an error parsing the signature. |\n| `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |\n| `valid` | None of the above errors applied, so the signature is considered to be verified. |", + "operationId": "git/create-tag", + "tags": [ + "git" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/git/tags/#create-a-tag-object" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "node_id": { + "type": "string" + }, + "tag": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "url": { + "type": "string" + }, + "message": { + "type": "string" + }, + "tagger": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "date": { + "type": "string" + } + } + }, + "object": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "verification": { + "type": "object", + "properties": { + "verified": { + "type": "boolean" + }, + "reason": { + "type": "string" + }, + "signature": { + "type": "string" + }, + "payload": { + "type": "string" + } + } + } + } + }, + "example": { + "node_id": "MDM6VGFnOTQwYmQzMzYyNDhlZmFlMGY5ZWU1YmM3YjJkNWM5ODU4ODdiMTZhYw==", + "tag": "v0.0.1", + "sha": "940bd336248efae0f9ee5bc7b2d5c985887b16ac", + "url": "https://api.github.com/repos/octocat/Hello-World/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac", + "message": "initial version", + "tagger": { + "name": "Monalisa Octocat", + "email": "octocat@github.com", + "date": "2014-11-07T22:01:45Z" + }, + "object": { + "type": "commit", + "sha": "c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c", + "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c" + }, + "verification": { + "verified": false, + "reason": "unsigned", + "signature": null, + "payload": null + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\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\"}'" + }, + { + "lang": "JS", + "source": "octokit.git.createTag({\n owner: 'octocat',\n repo: 'hello-world',\n tag: 'tag',\n message: 'message',\n object: 'object',\n type: 'type'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_tag(\n 'hello-world',\n 'tag',\n 'message',\n 'object',\n 'type'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "tag": { + "type": "string", + "description": "The tag's name. This is typically a version (e.g., \"v0.0.1\")." + }, + "message": { + "type": "string", + "description": "The tag message." + }, + "object": { + "type": "string", + "description": "The SHA of the git object this is tagging." + }, + "type": { + "type": "string", + "description": "The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`.", + "enum": [ + "commit", + "tree", + "blob" + ] + }, + "tagger": { + "type": "object", + "description": "An object with information about the individual creating the tag.", + "properties": { + "name": { + "type": "string", + "description": "The name of the author of the tag" + }, + "email": { + "type": "string", + "description": "The email of the author of the tag" + }, + "date": { + "type": "string", + "description": "When this object was tagged. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`." + } + } + } + }, + "required": [ + "tag", + "message", + "object", + "type" + ] + }, + "example": { + "tag": "v0.0.1", + "message": "initial version\n", + "object": "c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c", + "type": "commit", + "tagger": { + "name": "Monalisa Octocat", + "email": "octocat@github.com", + "date": "2011-06-17T14:53:35-07:00" + } + } + } + } + } + } + }, + "/repos/{owner}/{repo}/git/tags/{tag_sha}": { + "get": { + "summary": "Get a tag", + "description": "**Signature verification object**\n\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:\n\nThese are the possible values for `reason` in the `verification` object:\n\n| Value | Description |\n| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- |\n| `expired_key` | The key that made the signature is expired. |\n| `not_signing_key` | The \"signing\" flag is not among the usage flags in the GPG key that made the signature. |\n| `gpgverify_error` | There was an error communicating with the signature verification service. |\n| `gpgverify_unavailable` | The signature verification service is currently unavailable. |\n| `unsigned` | The object does not include a signature. |\n| `unknown_signature_type` | A non-PGP signature was found in the commit. |\n| `no_user` | No user was associated with the `committer` email address in the commit. |\n| `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. |\n| `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |\n| `unknown_key` | The key that made the signature has not been registered with any user's account. |\n| `malformed_signature` | There was an error parsing the signature. |\n| `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |\n| `valid` | None of the above errors applied, so the signature is considered to be verified. |", + "operationId": "git/get-tag", + "tags": [ + "git" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/git/tags/#get-a-tag" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "tag_sha", + "description": "tag_sha parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "node_id": { + "type": "string" + }, + "tag": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "url": { + "type": "string" + }, + "message": { + "type": "string" + }, + "tagger": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "date": { + "type": "string" + } + } + }, + "object": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "verification": { + "type": "object", + "properties": { + "verified": { + "type": "boolean" + }, + "reason": { + "type": "string" + }, + "signature": { + "type": "string" + }, + "payload": { + "type": "string" + } + } + } + } + }, + "example": { + "node_id": "MDM6VGFnOTQwYmQzMzYyNDhlZmFlMGY5ZWU1YmM3YjJkNWM5ODU4ODdiMTZhYw==", + "tag": "v0.0.1", + "sha": "940bd336248efae0f9ee5bc7b2d5c985887b16ac", + "url": "https://api.github.com/repos/octocat/Hello-World/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac", + "message": "initial version", + "tagger": { + "name": "Monalisa Octocat", + "email": "octocat@github.com", + "date": "2014-11-07T22:01:45Z" + }, + "object": { + "type": "commit", + "sha": "c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c", + "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c" + }, + "verification": { + "verified": false, + "reason": "unsigned", + "signature": null, + "payload": null + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/git/tags/TAG_SHA" + }, + { + "lang": "JS", + "source": "octokit.git.getTag({\n owner: 'octocat',\n repo: 'hello-world',\n tag_sha: 'tag_sha'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.tag(\n 'hello-world',\n 'tag_sha'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/git/trees": { + "post": { + "summary": "Create a tree", + "description": "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.\n\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](https://developer.github.com/v3/git/commits/#create-a-commit)\" and \"[Update a reference](https://developer.github.com/v3/git/refs/#update-a-reference).\"", + "operationId": "git/create-tree", + "tags": [ + "git" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/git/trees/#create-a-tree" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sha": { + "type": "string" + }, + "url": { + "type": "string" + }, + "tree": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string" + }, + "mode": { + "type": "string" + }, + "type": { + "type": "string" + }, + "size": { + "type": "number" + }, + "sha": { + "type": "string" + }, + "url": { + "type": "string" + } + } + } + } + } + }, + "example": { + "sha": "cd8274d15fa3ae2ab983129fb037999f264ba9a7", + "url": "https://api.github.com/repos/octocat/Hello-World/trees/cd8274d15fa3ae2ab983129fb037999f264ba9a7", + "tree": [ + { + "path": "file.rb", + "mode": "100644", + "type": "blob", + "size": 132, + "sha": "7c258a9869f33c1e1e1f74fbb32f07c86cb5a75b", + "url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/7c258a9869f33c1e1e1f74fbb32f07c86cb5a75b" + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\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\"}]}'" + }, + { + "lang": "JS", + "source": "octokit.git.createTree({\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})" + }, + { + "lang": "Ruby", + "source": "octokit.create_tree(\n 'hello-world',\n [\n {\n path: 'path',\n mode: 'mode',\n type: 'type',\n sha: 'sha',\n content: 'content'\n }\n ]\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "tree": { + "type": "array", + "description": "Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure.", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "description": "The file referenced in the tree." + }, + "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.", + "enum": [ + "100644", + "100755", + "040000", + "160000", + "120000" + ] + }, + "type": { + "type": "string", + "description": "Either `blob`, `tree`, or `commit`.", + "enum": [ + "blob", + "tree", + "commit" + ] + }, + "sha": { + "type": "string", + "description": "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. \n \n**Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error.", + "nullable": true + }, + "content": { + "type": "string", + "description": "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`. \n \n**Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error." + } + } + } + }, + "base_tree": { + "type": "string", + "description": "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." + } + }, + "required": [ + "tree" + ] + }, + "example": { + "base_tree": "9fb037999f264ba9a7fc6274d15fa3ae2ab98312", + "tree": [ + { + "path": "file.rb", + "mode": "100644", + "type": "blob", + "sha": "44b4fc6d56897b048c772eb4087f854f46256132" + } + ] + } + } + } + } + } + }, + "/repos/{owner}/{repo}/git/trees/{tree_sha}": { + "get": { + "summary": "Get a tree", + "description": "Returns a single tree using the SHA1 value for that tree.\n\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, you can clone the repository and iterate over the Git data locally.", + "operationId": "git/get-tree", + "tags": [ + "git" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/git/trees/#get-a-tree" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "tree_sha", + "description": "tree_sha parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "recursive", + "description": "recursive parameter", + "in": "query", + "schema": { + "type": "integer", + "enum": [ + 1 + ] + } + } + ], + "responses": { + "200": { + "description": "If `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, you can clone the repository and iterate over the Git data locally.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sha": { + "type": "string" + }, + "url": { + "type": "string" + }, + "tree": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string" + }, + "mode": { + "type": "string" + }, + "type": { + "type": "string" + }, + "size": { + "type": "number" + }, + "sha": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "required": [ + "path", + "mode", + "type", + "sha", + "url", + "size" + ] + } + }, + "truncated": { + "type": "boolean" + } + } + }, + "example": { + "sha": "9fb037999f264ba9a7fc6274d15fa3ae2ab98312", + "url": "https://api.github.com/repos/octocat/Hello-World/trees/9fb037999f264ba9a7fc6274d15fa3ae2ab98312", + "tree": [ + { + "path": "file.rb", + "mode": "100644", + "type": "blob", + "size": 30, + "sha": "44b4fc6d56897b048c772eb4087f854f46256132", + "url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/44b4fc6d56897b048c772eb4087f854f46256132" + }, + { + "path": "subdir", + "mode": "040000", + "type": "tree", + "sha": "f484d249c660418515fb01c2b9662073663c242e", + "url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/f484d249c660418515fb01c2b9662073663c242e" + }, + { + "path": "exec_file", + "mode": "100755", + "type": "blob", + "size": 75, + "sha": "45b983be36b73c0788dc9cbcb76cbb80fc7bb057", + "url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/45b983be36b73c0788dc9cbcb76cbb80fc7bb057" + } + ], + "truncated": false + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/git/trees/TREE_SHA" + }, + { + "lang": "JS", + "source": "octokit.git.getTree({\n owner: 'octocat',\n repo: 'hello-world',\n tree_sha: 'tree_sha'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.tree(\n 'hello-world',\n 'tree_sha'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [], + "overridden": true + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/hooks": { + "get": { + "summary": "List hooks", + "description": "", + "operationId": "repos/list-hooks", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/hooks/#list-hooks" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": "number" + }, + "name": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "events": { + "type": "array", + "items": { + "type": "string" + } + }, + "config": { + "type": "object", + "properties": { + "content_type": { + "type": "string" + }, + "insecure_ssl": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "updated_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "url": { + "type": "string" + }, + "test_url": { + "type": "string" + }, + "ping_url": { + "type": "string" + }, + "last_response": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "status": { + "type": "string" + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "example": [ + { + "type": "Repository", + "id": 12345678, + "name": "web", + "active": true, + "events": [ + "push", + "pull_request" + ], + "config": { + "content_type": "json", + "insecure_ssl": "0", + "url": "https://example.com/webhook" + }, + "updated_at": "2019-06-03T00:57:16Z", + "created_at": "2019-06-03T00:57:16Z", + "url": "https://api.github.com/repos/octocat/Hello-World/hooks/12345678", + "test_url": "https://api.github.com/repos/octocat/Hello-World/hooks/12345678/test", + "ping_url": "https://api.github.com/repos/octocat/Hello-World/hooks/12345678/pings", + "last_response": { + "code": null, + "status": "unused", + "message": null + } + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/hooks" + }, + { + "lang": "JS", + "source": "octokit.repos.listHooks({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.hooks(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "post": { + "summary": "Create a hook", + "description": "Repositories can have multiple webhooks installed. Each webhook should have a unique `config`. Multiple webhooks can share the same `config` as long as those webhooks do not have any `events` that overlap.\n\nHere's how you can create a hook that posts payloads in JSON format:", + "operationId": "repos/create-hook", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/hooks/#create-a-hook" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "events": { + "type": "array", + "items": { + "type": "string" + } + }, + "config": { + "type": "object", + "properties": { + "content_type": { + "type": "string" + }, + "insecure_ssl": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "updated_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "url": { + "type": "string" + }, + "test_url": { + "type": "string" + }, + "ping_url": { + "type": "string" + }, + "last_response": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "status": { + "type": "string" + }, + "message": { + "type": "string" + } + } + } + } + }, + "example": { + "type": "Repository", + "id": 12345678, + "name": "web", + "active": true, + "events": [ + "push", + "pull_request" + ], + "config": { + "content_type": "json", + "insecure_ssl": "0", + "url": "https://example.com/webhook" + }, + "updated_at": "2019-06-03T00:57:16Z", + "created_at": "2019-06-03T00:57:16Z", + "url": "https://api.github.com/repos/octocat/Hello-World/hooks/12345678", + "test_url": "https://api.github.com/repos/octocat/Hello-World/hooks/12345678/test", + "ping_url": "https://api.github.com/repos/octocat/Hello-World/hooks/12345678/pings", + "last_response": { + "code": null, + "status": "unused", + "message": null + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\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\"}}'" + }, + { + "lang": "JS", + "source": "octokit.repos.createHook({\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 }\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_hook(\n 'hello-world',\n {\n url: 'url',\n content_type: 'content_type',\n secret: 'secret',\n insecure_ssl: 'insecure_ssl'\n }\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`." + }, + "config": { + "type": "object", + "description": "Key/value pairs to provide settings for this webhook. [These are defined below](https://developer.github.com/v3/repos/hooks/#create-hook-config-params).", + "properties": { + "url": { + "type": "string", + "description": "The URL to which the payloads will be delivered." + }, + "content_type": { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`." + }, + "secret": { + "type": "string", + "description": "If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value in the [`X-Hub-Signature`](https://developer.github.com/webhooks/#delivery-headers) header." + }, + "insecure_ssl": { + "type": "string", + "description": "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": [ + "url" + ] + }, + "events": { + "type": "array", + "description": "Determines what [events](https://developer.github.com/v3/activity/events/types/) the hook is triggered for.", + "default": [ + "push" + ], + "items": { + "type": "string" + } + }, + "active": { + "type": "boolean", + "description": "Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications.", + "default": true + } + }, + "required": [ + "config" + ] + }, + "example": { + "name": "web", + "active": true, + "events": [ + "push", + "pull_request" + ], + "config": { + "url": "https://example.com/webhook", + "content_type": "json", + "insecure_ssl": "0" + } + } + } + } + } + } + }, + "/repos/{owner}/{repo}/hooks/{hook_id}": { + "get": { + "summary": "Get single hook", + "description": "", + "operationId": "repos/get-hook", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/hooks/#get-single-hook" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "hook_id", + "description": "hook_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "events": { + "type": "array", + "items": { + "type": "string" + } + }, + "config": { + "type": "object", + "properties": { + "content_type": { + "type": "string" + }, + "insecure_ssl": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "updated_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "url": { + "type": "string" + }, + "test_url": { + "type": "string" + }, + "ping_url": { + "type": "string" + }, + "last_response": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "status": { + "type": "string" + }, + "message": { + "type": "string" + } + } + } + } + }, + "example": { + "type": "Repository", + "id": 12345678, + "name": "web", + "active": true, + "events": [ + "push", + "pull_request" + ], + "config": { + "content_type": "json", + "insecure_ssl": "0", + "url": "https://example.com/webhook" + }, + "updated_at": "2019-06-03T00:57:16Z", + "created_at": "2019-06-03T00:57:16Z", + "url": "https://api.github.com/repos/octocat/Hello-World/hooks/12345678", + "test_url": "https://api.github.com/repos/octocat/Hello-World/hooks/12345678/test", + "ping_url": "https://api.github.com/repos/octocat/Hello-World/hooks/12345678/pings", + "last_response": { + "code": null, + "status": "unused", + "message": null + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/hooks/42" + }, + { + "lang": "JS", + "source": "octokit.repos.getHook({\n owner: 'octocat',\n repo: 'hello-world',\n hook_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.hook(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "patch": { + "summary": "Edit a hook", + "description": "", + "operationId": "repos/update-hook", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/hooks/#edit-a-hook" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "hook_id", + "description": "hook_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "events": { + "type": "array", + "items": { + "type": "string" + } + }, + "config": { + "type": "object", + "properties": { + "content_type": { + "type": "string" + }, + "insecure_ssl": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "updated_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "url": { + "type": "string" + }, + "test_url": { + "type": "string" + }, + "ping_url": { + "type": "string" + }, + "last_response": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "status": { + "type": "string" + }, + "message": { + "type": "string" + } + } + } + } + }, + "example": { + "type": "Repository", + "id": 12345678, + "name": "web", + "active": true, + "events": [ + "push", + "pull_request" + ], + "config": { + "content_type": "json", + "insecure_ssl": "0", + "url": "https://example.com/webhook" + }, + "updated_at": "2019-06-03T00:57:16Z", + "created_at": "2019-06-03T00:57:16Z", + "url": "https://api.github.com/repos/octocat/Hello-World/hooks/12345678", + "test_url": "https://api.github.com/repos/octocat/Hello-World/hooks/12345678/test", + "ping_url": "https://api.github.com/repos/octocat/Hello-World/hooks/12345678/pings", + "last_response": { + "code": null, + "status": "unused", + "message": null + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\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\"}}'" + }, + { + "lang": "JS", + "source": "octokit.repos.updateHook({\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 }\n})" + }, + { + "lang": "Ruby", + "source": "octokit.update_hook(\n 'hello-world',\n 42,\n {\n url: 'url',\n content_type: 'content_type',\n secret: 'secret',\n insecure_ssl: 'insecure_ssl'\n }\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "config": { + "type": "object", + "description": "Key/value pairs to provide settings for this webhook. [These are defined below](https://developer.github.com/v3/repos/hooks/#create-hook-config-params).", + "properties": { + "url": { + "type": "string", + "description": "The URL to which the payloads will be delivered." + }, + "content_type": { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`." + }, + "secret": { + "type": "string", + "description": "If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value in the [`X-Hub-Signature`](https://developer.github.com/webhooks/#delivery-headers) header." + }, + "insecure_ssl": { + "type": "string", + "description": "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": [ + "url" + ] + }, + "events": { + "type": "array", + "description": "Determines what [events](https://developer.github.com/v3/activity/events/types/) the hook is triggered for. This replaces the entire array of events.", + "default": [ + "push" + ], + "items": { + "type": "string" + } + }, + "add_events": { + "type": "array", + "description": "Determines a list of events to be added to the list of events that the Hook triggers for.", + "items": { + "type": "string" + } + }, + "remove_events": { + "type": "array", + "description": "Determines a list of events to be removed from the list of events that the Hook triggers for.", + "items": { + "type": "string" + } + }, + "active": { + "type": "boolean", + "description": "Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications.", + "default": true + } + } + }, + "example": { + "active": true, + "add_events": [ + "pull_request" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete a hook", + "description": "", + "operationId": "repos/delete-hook", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/hooks/#delete-a-hook" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "hook_id", + "description": "hook_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/hooks/42" + }, + { + "lang": "JS", + "source": "octokit.repos.deleteHook({\n owner: 'octocat',\n repo: 'hello-world',\n hook_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_hook(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/hooks/{hook_id}/pings": { + "post": { + "summary": "Ping a hook", + "description": "This will trigger a [ping event](https://developer.github.com/webhooks/#ping-event) to be sent to the hook.", + "operationId": "repos/ping-hook", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/hooks/#ping-a-hook" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "hook_id", + "description": "hook_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/hooks/42/pings" + }, + { + "lang": "JS", + "source": "octokit.repos.pingHook({\n owner: 'octocat',\n repo: 'hello-world',\n hook_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.ping_hook(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/hooks/{hook_id}/tests": { + "post": { + "summary": "Test a push hook", + "description": "This 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.\n\n**Note**: Previously `/repos/:owner/:repo/hooks/:hook_id/test`", + "operationId": "repos/test-push-hook", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/hooks/#test-a-push-hook" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "hook_id", + "description": "hook_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/hooks/42/tests" + }, + { + "lang": "JS", + "source": "octokit.repos.testPushHook({\n owner: 'octocat',\n repo: 'hello-world',\n hook_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.test_push_hook(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/import": { + "put": { + "summary": "Start an import", + "description": "Start a source import to a GitHub repository using GitHub Importer.", + "operationId": "migrations/start-import", + "tags": [ + "migrations" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/migrations/source_imports/#start-an-import" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "vcs": { + "type": "string" + }, + "use_lfs": { + "type": "string" + }, + "vcs_url": { + "type": "string" + }, + "status": { + "type": "string" + }, + "status_text": { + "type": "string" + }, + "has_large_files": { + "type": "boolean" + }, + "large_files_size": { + "type": "number" + }, + "large_files_count": { + "type": "number" + }, + "authors_count": { + "type": "number" + }, + "percent": { + "type": "number" + }, + "commit_count": { + "type": "number" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "authors_url": { + "type": "string" + }, + "repository_url": { + "type": "string" + } + } + }, + "example": { + "vcs": "subversion", + "use_lfs": "undecided", + "vcs_url": "http://svn.mycompany.com/svn/myproject", + "status": "importing", + "status_text": "Importing...", + "has_large_files": false, + "large_files_size": 0, + "large_files_count": 0, + "authors_count": 0, + "percent": 42, + "commit_count": 1042, + "url": "https://api.github.com/repos/octocat/socm/import", + "html_url": "https://import.github.com/octocat/socm/import", + "authors_url": "https://api.github.com/repos/octocat/socm/import/authors", + "repository_url": "https://api.github.com/repos/octocat/socm" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/import \\\n -d '{\"vcs_url\":\"vcs_url\"}'" + }, + { + "lang": "JS", + "source": "octokit.migrations.startImport({\n owner: 'octocat',\n repo: 'hello-world',\n vcs_url: 'vcs_url'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.start_import(\n 'hello-world',\n 'vcs_url'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "vcs_url": { + "type": "string", + "description": "The URL of the originating repository." + }, + "vcs": { + "type": "string", + "description": "The originating VCS type. Can be one of `subversion`, `git`, `mercurial`, or `tfvc`. Please be aware that without this parameter, the import job will take additional time to detect the VCS type before beginning the import. This detection step will be reflected in the response.", + "enum": [ + "subversion", + "git", + "mercurial", + "tfvc" + ] + }, + "vcs_username": { + "type": "string", + "description": "If authentication is required, the username to provide to `vcs_url`." + }, + "vcs_password": { + "type": "string", + "description": "If authentication is required, the password to provide to `vcs_url`." + }, + "tfvc_project": { + "type": "string", + "description": "For a tfvc import, the name of the project that is being imported." + } + }, + "required": [ + "vcs_url" + ] + }, + "example": { + "vcs": "subversion", + "vcs_url": "http://svn.mycompany.com/svn/myproject", + "vcs_username": "octocat", + "vcs_password": "secret" + } + } + } + } + }, + "get": { + "summary": "Get import progress", + "description": "View the progress of an import.\n\n**Import status**\n\nThis section includes details about the possible values of the `status` field of the Import Progress response.\n\nAn import that does not have errors will progress through these steps:\n\n* `detecting` - the \"detection\" step of the import is in progress because the request did not include a `vcs` parameter. The import is identifying the type of source control present at the URL.\n* `importing` - the \"raw\" step of the import is in progress. This is where commit data is fetched from the original repository. The import progress response will include `commit_count` (the total number of raw commits that will be imported) and `percent` (0 - 100, the current progress through the import).\n* `mapping` - the \"rewrite\" step of the import is in progress. This is where SVN branches are converted to Git branches, and where author updates are applied. The import progress response does not include progress information.\n* `pushing` - the \"push\" step of the import is in progress. This is where the importer updates the repository on GitHub. The import progress response will include `push_percent`, which is the percent value reported by `git push` when it is \"Writing objects\".\n* `complete` - the import is complete, and the repository is ready on GitHub.\n\nIf there are problems, you will see one of these in the `status` field:\n\n* `auth_failed` - the import requires authentication in order to connect to the original repository. To update authentication for the import, please see the [Update Existing Import](https://developer.github.com/v3/migrations/source_imports/#update-existing-import) section.\n* `error` - the import encountered an error. The import progress response will include the `failed_step` and an error message. Contact [GitHub Support](https://github.com/contact) or [GitHub Premium Support](https://premium.githubsupport.com) for more information.\n* `detection_needs_auth` - the importer requires authentication for the originating repository to continue detection. To update authentication for the import, please see the [Update Existing Import](https://developer.github.com/v3/migrations/source_imports/#update-existing-import) section.\n* `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://developer.github.com/v3/migrations/source_imports/#cancel-an-import) and [retry](https://developer.github.com/v3/migrations/source_imports/#start-an-import) with the correct URL.\n* `detection_found_multiple` - the importer found several projects or repositories at the provided URL. When this is the case, the Import Progress response will also include a `project_choices` field with the possible project choices as values. To update project choice, please see the [Update Existing Import](https://developer.github.com/v3/migrations/source_imports/#update-existing-import) section.\n\n**The project_choices field**\n\nWhen multiple projects are found at the provided URL, the response hash will include a `project_choices` field, the value of which is an array of hashes each representing a project choice. The exact key/value pairs of the project hashes will differ depending on the version control type.\n\n**Git LFS related fields**\n\nThis section includes details about Git LFS related fields that may be present in the Import Progress response.\n\n* `use_lfs` - describes whether the import has been opted in or out of using Git LFS. The value can be `opt_in`, `opt_out`, or `undecided` if no action has been taken.\n* `has_large_files` - the boolean value describing whether files larger than 100MB were found during the `importing` step.\n* `large_files_size` - the total size in gigabytes of files larger than 100MB found in the originating repository.\n* `large_files_count` - the total number of files larger than 100MB found in the originating repository. To see a list of these files, make a \"Get Large Files\" request.", + "operationId": "migrations/get-import-progress", + "tags": [ + "migrations" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/migrations/source_imports/#get-import-progress" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "vcs": { + "type": "string" + }, + "use_lfs": { + "type": "string" + }, + "vcs_url": { + "type": "string" + }, + "status": { + "type": "string" + }, + "status_text": { + "type": "string" + }, + "has_large_files": { + "type": "boolean" + }, + "large_files_size": { + "type": "number" + }, + "large_files_count": { + "type": "number" + }, + "authors_count": { + "type": "number" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "authors_url": { + "type": "string" + }, + "repository_url": { + "type": "string" + } + } + }, + "example": { + "vcs": "subversion", + "use_lfs": "opt_in", + "vcs_url": "http://svn.mycompany.com/svn/myproject", + "status": "complete", + "status_text": "Done", + "has_large_files": true, + "large_files_size": 132331036, + "large_files_count": 1, + "authors_count": 4, + "url": "https://api.github.com/repos/octocat/socm/import", + "html_url": "https://import.github.com/octocat/socm/import", + "authors_url": "https://api.github.com/repos/octocat/socm/import/authors", + "repository_url": "https://api.github.com/repos/octocat/socm" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/import" + }, + { + "lang": "JS", + "source": "octokit.migrations.getImportProgress({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.import_progress(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "patch": { + "summary": "Update existing import", + "description": "An import can be updated with credentials or a project choice by passing in the appropriate parameters in this API request. If no parameters are provided, the import will be restarted.\n\nSome servers (e.g. TFS servers) can have several projects at a single URL. In those cases the import progress will have the status `detection_found_multiple` and the Import Progress response will include a `project_choices` array. You can select the project to import by providing one of the objects in the `project_choices` array in the update request.\n\nThe following example demonstrates the workflow for updating an import with \"project1\" as the project choice. Given a `project_choices` array like such:\n\nTo restart an import, no parameters are provided in the update request.", + "operationId": "migrations/update-import", + "tags": [ + "migrations" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/migrations/source_imports/#update-existing-import" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "vcs": { + "type": "string" + }, + "use_lfs": { + "type": "string" + }, + "vcs_url": { + "type": "string" + }, + "status": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "authors_url": { + "type": "string" + }, + "repository_url": { + "type": "string" + } + } + }, + "examples": { + "example-1": { + "summary": "Example 1", + "value": { + "vcs": "subversion", + "use_lfs": "undecided", + "vcs_url": "http://svn.mycompany.com/svn/myproject", + "status": "detecting", + "url": "https://api.github.com/repos/octocat/socm/import", + "html_url": "https://import.github.com/octocat/socm/import", + "authors_url": "https://api.github.com/repos/octocat/socm/import/authors", + "repository_url": "https://api.github.com/repos/octocat/socm" + } + }, + "example-2": { + "summary": "Example 2", + "value": { + "vcs": "tfvc", + "use_lfs": "undecided", + "vcs_url": "http://tfs.mycompany.com/tfs/myproject", + "tfvc_project": "project1", + "status": "importing", + "status_text": "Importing...", + "has_large_files": false, + "large_files_size": 0, + "large_files_count": 0, + "authors_count": 0, + "percent": 42, + "commit_count": 1042, + "url": "https://api.github.com/repos/octocat/socm/import", + "html_url": "https://import.github.com/octocat/socm/import", + "authors_url": "https://api.github.com/repos/octocat/socm/import/authors", + "repository_url": "https://api.github.com/repos/octocat/socm" + } + }, + "response": { + "summary": "Response", + "value": { + "vcs": "subversion", + "use_lfs": "undecided", + "vcs_url": "http://svn.mycompany.com/svn/myproject", + "status": "importing", + "status_text": "Importing...", + "has_large_files": false, + "large_files_size": 0, + "large_files_count": 0, + "authors_count": 0, + "percent": 42, + "commit_count": 1042, + "url": "https://api.github.com/repos/octocat/socm/import", + "html_url": "https://import.github.com/octocat/socm/import", + "authors_url": "https://api.github.com/repos/octocat/socm/import/authors", + "repository_url": "https://api.github.com/repos/octocat/socm" + } + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/import \\\n -d '{\"vcs_username\":\"vcs_username\"}'" + }, + { + "lang": "JS", + "source": "octokit.migrations.updateImport({\n owner: 'octocat',\n repo: 'hello-world',\n vcs_username: 'vcs_username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.update_import(\n 'hello-world',\n 'vcs_username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "vcs_username": { + "type": "string", + "description": "The username to provide to the originating repository." + }, + "vcs_password": { + "type": "string", + "description": "The password to provide to the originating repository." + } + } + }, + "examples": { + "example-1": { + "summary": "Example 1", + "value": { + "vcs_username": "octocat", + "vcs_password": "secret" + } + } + } + } + } + } + }, + "delete": { + "summary": "Cancel an import", + "description": "Stop an import for a repository.", + "operationId": "migrations/cancel-import", + "tags": [ + "migrations" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/migrations/source_imports/#cancel-an-import" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/import" + }, + { + "lang": "JS", + "source": "octokit.migrations.cancelImport({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.cancel_import(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/import/authors": { + "get": { + "summary": "Get commit authors", + "description": "Each type of source control system represents authors in a different way. For example, a Git commit author has a display name and an email address, but a Subversion commit author just has a username. The GitHub Importer will make the author information valid, but the author might not be correct. For example, it will change the bare Subversion username `hubot` into something like `hubot `.\n\nThis API method and the \"Map a commit author\" method allow you to provide correct Git author information.", + "operationId": "migrations/get-commit-authors", + "tags": [ + "migrations" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/migrations/source_imports/#get-commit-authors" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "since", + "description": "Only authors found after this id are returned. Provide the highest author ID you've seen so far. New authors may be added to the list at any point while the importer is performing the `raw` step.", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "remote_id": { + "type": "string" + }, + "remote_name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "type": "string" + }, + "import_url": { + "type": "string" + } + } + } + }, + "example": [ + { + "id": 2268557, + "remote_id": "nobody@fc7da526-431c-80fe-3c8c-c148ff18d7ef", + "remote_name": "nobody", + "email": "hubot@github.com", + "name": "Hubot", + "url": "https://api.github.com/repos/octocat/socm/import/authors/2268557", + "import_url": "https://api.github.com/repos/octocat/socm/import" + }, + { + "id": 2268558, + "remote_id": "svner@fc7da526-431c-80fe-3c8c-c148ff18d7ef", + "remote_name": "svner", + "email": "svner@fc7da526-431c-80fe-3c8c-c148ff18d7ef", + "name": "svner", + "url": "https://api.github.com/repos/octocat/socm/import/authors/2268558", + "import_url": "https://api.github.com/repos/octocat/socm/import" + }, + { + "id": 2268559, + "remote_id": "svner@example.com@fc7da526-431c-80fe-3c8c-c148ff18d7ef", + "remote_name": "svner@example.com", + "email": "svner@example.com@fc7da526-431c-80fe-3c8c-c148ff18d7ef", + "name": "svner@example.com", + "url": "https://api.github.com/repos/octocat/socm/import/authors/2268559", + "import_url": "https://api.github.com/repos/octocat/socm/import" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/import/authors" + }, + { + "lang": "JS", + "source": "octokit.migrations.getCommitAuthors({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.commit_authors(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/import/authors/{author_id}": { + "patch": { + "summary": "Map a commit author", + "description": "Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository.", + "operationId": "migrations/map-commit-author", + "tags": [ + "migrations" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/migrations/source_imports/#map-a-commit-author" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "author_id", + "description": "author_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "remote_id": { + "type": "string" + }, + "remote_name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "type": "string" + }, + "import_url": { + "type": "string" + } + } + }, + "example": { + "id": 2268557, + "remote_id": "nobody@fc7da526-431c-80fe-3c8c-c148ff18d7ef", + "remote_name": "nobody", + "email": "hubot@github.com", + "name": "Hubot", + "url": "https://api.github.com/repos/octocat/socm/import/authors/2268557", + "import_url": "https://api.github.com/repos/octocat/socm/import" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/import/authors/42 \\\n -d '{\"email\":\"octocat@github.com\"}'" + }, + { + "lang": "JS", + "source": "octokit.migrations.mapCommitAuthor({\n owner: 'octocat',\n repo: 'hello-world',\n author_id: 42,\n email: 'octocat@github.com'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.map_commit_author(\n 'hello-world',\n 42,\n 'octocat@github.com'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "The new Git author email." + }, + "name": { + "type": "string", + "description": "The new Git author name." + } + } + }, + "example": { + "email": "hubot@github.com", + "name": "Hubot the Robot" + } + } + } + } + } + }, + "/repos/{owner}/{repo}/import/large_files": { + "get": { + "summary": "Get large files", + "description": "List files larger than 100MB found during the import", + "operationId": "migrations/get-large-files", + "tags": [ + "migrations" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/migrations/source_imports/#get-large-files" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "ref_name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "oid": { + "type": "string" + }, + "size": { + "type": "number" + } + } + } + }, + "example": [ + { + "ref_name": "refs/heads/master", + "path": "foo/bar/1", + "oid": "d3d9446802a44259755d38e6d163e820", + "size": 10485760 + }, + { + "ref_name": "refs/heads/master", + "path": "foo/bar/2", + "oid": "6512bd43d9caa6e02c990b0a82652dca", + "size": 11534336 + }, + { + "ref_name": "refs/heads/master", + "path": "foo/bar/3", + "oid": "c20ad4d76fe97759aa27a0c99bff6710", + "size": 12582912 + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/import/large_files" + }, + { + "lang": "JS", + "source": "octokit.migrations.getLargeFiles({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.large_files(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/import/lfs": { + "patch": { + "summary": "Set Git LFS preference", + "description": "You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability is powered by [Git LFS](https://git-lfs.github.com). You can learn more about our LFS feature and working with large files [on our help site](https://help.github.com/articles/versioning-large-files/).", + "operationId": "migrations/set-lfs-preference", + "tags": [ + "migrations" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/migrations/source_imports/#set-git-lfs-preference" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "vcs": { + "type": "string" + }, + "use_lfs": { + "type": "string" + }, + "vcs_url": { + "type": "string" + }, + "status": { + "type": "string" + }, + "status_text": { + "type": "string" + }, + "has_large_files": { + "type": "boolean" + }, + "large_files_size": { + "type": "number" + }, + "large_files_count": { + "type": "number" + }, + "authors_count": { + "type": "number" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "authors_url": { + "type": "string" + }, + "repository_url": { + "type": "string" + } + } + }, + "example": { + "vcs": "subversion", + "use_lfs": "opt_in", + "vcs_url": "http://svn.mycompany.com/svn/myproject", + "status": "complete", + "status_text": "Done", + "has_large_files": true, + "large_files_size": 132331036, + "large_files_count": 1, + "authors_count": 4, + "url": "https://api.github.com/repos/octocat/socm/import", + "html_url": "https://import.github.com/octocat/socm/import", + "authors_url": "https://api.github.com/repos/octocat/socm/import/authors", + "repository_url": "https://api.github.com/repos/octocat/socm" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/import/lfs \\\n -d '{\"use_lfs\":\"use_lfs\"}'" + }, + { + "lang": "JS", + "source": "octokit.migrations.setLfsPreference({\n owner: 'octocat',\n repo: 'hello-world',\n use_lfs: 'use_lfs'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.set_lfs_preference(\n 'hello-world',\n 'use_lfs'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "use_lfs": { + "type": "string", + "description": "Can be one of `opt_in` (large files will be stored using Git LFS) or `opt_out` (large files will be removed during the import).", + "enum": [ + "opt_in", + "opt_out" + ] + } + }, + "required": [ + "use_lfs" + ] + }, + "example": { + "use_lfs": "opt_in" + } + } + } + } + } + }, + "/repos/{owner}/{repo}/installation": { + "get": { + "summary": "Get a repository installation", + "description": "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.\n\nYou must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.", + "operationId": "apps/get-repo-installation", + "tags": [ + "apps" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/apps/#get-a-repository-installation" + }, + "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 + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "account": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "repository_selection": { + "type": "string" + }, + "access_tokens_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "app_id": { + "type": "number" + }, + "target_id": { + "type": "number" + }, + "target_type": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "checks": { + "type": "string" + }, + "metadata": { + "type": "string" + }, + "contents": { + "type": "string" + } + } + }, + "events": { + "type": "array", + "items": { + "type": "string" + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "single_file_name": { + "type": "string" + } + } + }, + "example": { + "id": 1, + "account": { + "login": "github", + "id": 1, + "avatar_url": "https://github.com/images/error/hubot_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/orgs/github", + "html_url": "https://github.com/github", + "followers_url": "https://api.github.com/users/github/followers", + "following_url": "https://api.github.com/users/github/following{/other_user}", + "gists_url": "https://api.github.com/users/github/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github/subscriptions", + "organizations_url": "https://api.github.com/users/github/orgs", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "received_events_url": "https://api.github.com/users/github/received_events", + "type": "Organization", + "site_admin": false + }, + "repository_selection": "all", + "access_tokens_url": "https://api.github.com/installations/1/access_tokens", + "repositories_url": "https://api.github.com/installation/repositories", + "html_url": "https://github.com/organizations/github/settings/installations/1", + "app_id": 1, + "target_id": 1, + "target_type": "Organization", + "permissions": { + "checks": "write", + "metadata": "read", + "contents": "read" + }, + "events": [ + "push", + "pull_request" + ], + "created_at": "2018-02-09T20:51:14Z", + "updated_at": "2018-02-09T20:51:14Z", + "single_file_name": null + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.machine-man-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/installation" + }, + { + "lang": "JS", + "source": "octokit.apps.getRepoInstallation({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.repo_installation(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [ + { + "name": "machine-man", + "note": "To access the API with your GitHub App, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` Header for your requests.\n\n`application/vnd.github.machine-man-preview+json`", + "required": true + } + ] + }, + "x-changes": [ + { + "type": "operation", + "date": "2019-04-10", + "note": "\"Find repository installation\" renamed to \"Get a repository installation\"", + "before": { + "operationId": "apps/find-repo-installation" + }, + "after": { + "operationId": "apps/get-repo-installation" + } + } + ] + } + }, + "/repos/{owner}/{repo}/interaction-limits": { + "get": { + "summary": "Get interaction restrictions for a repository", + "description": "Shows which group of GitHub users can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response.", + "operationId": "interactions/get-restrictions-for-repo", + "tags": [ + "interactions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/interactions/repos/#get-interaction-restrictions-for-a-repository" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.sombra-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "limit": { + "type": "string" + }, + "origin": { + "type": "string" + }, + "expires_at": { + "type": "string" + } + } + }, + "example": { + "limit": "collaborators_only", + "origin": "repository", + "expires_at": "2018-08-17T04:18:39Z" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.sombra-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/interaction-limits" + }, + { + "lang": "JS", + "source": "octokit.interactions.getRestrictionsForRepo({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.restrictions_for_repo(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "sombra", + "note": "The Interactions API is currently in public preview. See the [blog post](https://developer.github.com/changes/2018-12-18-interactions-preview) preview for more details. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.sombra-preview\n\n```", + "required": true + } + ] + }, + "x-changes": [] + }, + "put": { + "summary": "Add or update interaction restrictions for a repository", + "description": "Temporarily restricts interactions to certain GitHub users within the given repository. You must have owner or admin access to set restrictions.", + "operationId": "interactions/add-or-update-restrictions-for-repo", + "tags": [ + "interactions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/interactions/repos/#add-or-update-interaction-restrictions-for-a-repository" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.sombra-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "limit": { + "type": "string" + }, + "origin": { + "type": "string" + }, + "expires_at": { + "type": "string" + } + } + }, + "example": { + "limit": "collaborators_only", + "origin": "repository", + "expires_at": "2018-08-17T04:18:39Z" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\n -H\"Accept: application/vnd.github.sombra-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/interaction-limits \\\n -d '{\"limit\":\"limit\"}'" + }, + { + "lang": "JS", + "source": "octokit.interactions.addOrUpdateRestrictionsForRepo({\n owner: 'octocat',\n repo: 'hello-world',\n limit: 'limit'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.add_or_update_restrictions_for_repo(\n 'hello-world',\n 'limit'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "sombra", + "note": "The Interactions API is currently in public preview. See the [blog post](https://developer.github.com/changes/2018-12-18-interactions-preview) preview for more details. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.sombra-preview\n\n```", + "required": true + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "limit": { + "type": "string", + "description": "Specifies the group of GitHub users who can comment, open issues, or create pull requests for the given repository. Must be one of: `existing_users`, `contributors_only`, or `collaborators_only`.", + "enum": [ + "existing_users", + "contributors_only", + "collaborators_only" + ] + } + }, + "required": [ + "limit" + ] + }, + "example": { + "limit": "collaborators_only" + } + } + } + } + }, + "delete": { + "summary": "Remove interaction restrictions for a repository", + "description": "Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions.", + "operationId": "interactions/remove-restrictions-for-repo", + "tags": [ + "interactions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/interactions/repos/#remove-interaction-restrictions-for-a-repository" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.sombra-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.sombra-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/interaction-limits" + }, + { + "lang": "JS", + "source": "octokit.interactions.removeRestrictionsForRepo({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.remove_restrictions_for_repo(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "sombra", + "note": "The Interactions API is currently in public preview. See the [blog post](https://developer.github.com/changes/2018-12-18-interactions-preview) preview for more details. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.sombra-preview\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/invitations": { + "get": { + "summary": "List invitations for a repository", + "description": "When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations.\n\n", + "operationId": "repos/list-invitations", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/invitations/#list-invitations-for-a-repository" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "id": { + "type": "number" + }, + "repository": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + } + } + }, + "invitee": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "inviter": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "permissions": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + } + } + } + }, + "example": [ + { + "id": 1, + "repository": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}" + }, + "invitee": { + "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 + }, + "inviter": { + "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 + }, + "permissions": "write", + "created_at": "2016-06-13T14:52:50-05:00", + "url": "https://api.github.com/user/repository_invitations/1296269", + "html_url": "https://github.com/octocat/Hello-World/invitations" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/invitations" + }, + { + "lang": "JS", + "source": "octokit.repos.listInvitations({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.invitations(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/invitations/{invitation_id}": { + "delete": { + "summary": "Delete a repository invitation", + "description": "", + "operationId": "repos/delete-invitation", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/invitations/#delete-a-repository-invitation" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "invitation_id", + "description": "invitation_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/invitations/42" + }, + { + "lang": "JS", + "source": "octokit.repos.deleteInvitation({\n owner: 'octocat',\n repo: 'hello-world',\n invitation_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_invitation(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "patch": { + "summary": "Update a repository invitation", + "description": "", + "operationId": "repos/update-invitation", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/invitations/#update-a-repository-invitation" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "invitation_id", + "description": "invitation_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "repository": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + } + } + }, + "invitee": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "inviter": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "permissions": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + } + } + }, + "example": { + "id": 1, + "repository": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}" + }, + "invitee": { + "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 + }, + "inviter": { + "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 + }, + "permissions": "write", + "created_at": "2016-06-13T14:52:50-05:00", + "url": "https://api.github.com/user/repository_invitations/1296269", + "html_url": "https://github.com/octocat/Hello-World/invitations" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/invitations/42 \\\n -d '{\"permissions\":\"permissions\"}'" + }, + { + "lang": "JS", + "source": "octokit.repos.updateInvitation({\n owner: 'octocat',\n repo: 'hello-world',\n invitation_id: 42,\n permissions: 'permissions'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.update_invitation(\n 'hello-world',\n 42,\n 'permissions'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "permissions": { + "type": "string", + "description": "The permissions that the associated user will have on the repository. Valid values are `read`, `write`, and `admin`.", + "enum": [ + "read", + "write", + "admin" + ] + } + } + } + } + } + } + } + }, + "/repos/{owner}/{repo}/issues": { + "get": { + "summary": "List issues for a repository", + "description": "**Note**: 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.\n\nBe 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](https://developer.github.com/v3/pulls/#list-pull-requests)\" endpoint.\n\n", + "operationId": "issues/list-for-repo", + "tags": [ + "issues" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/issues/#list-issues-for-a-repository" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "milestone", + "description": "If an `integer` is passed, it should refer to a milestone by its `number` field. If the string `*` is passed, issues with any milestone are accepted. If the string `none` is passed, issues without milestones are returned.", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "state", + "description": "Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "open", + "closed", + "all" + ], + "default": "open" + } + }, + { + "name": "assignee", + "description": "Can be the name of a user. Pass in `none` for issues with no assigned user, and `*` for issues assigned to any user.", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "creator", + "description": "The user that created the issue.", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "mentioned", + "description": "A user that's mentioned in the issue.", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "labels", + "description": "A list of comma separated label names. Example: `bug,ui,@high`", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sort", + "description": "What to sort results by. Can be either `created`, `updated`, `comments`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "created", + "updated", + "comments" + ], + "default": "created" + } + }, + { + "name": "direction", + "description": "The direction of the sort. Can be either `asc` or `desc`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "default": "desc" + } + }, + { + "name": "since", + "description": "Only issues updated at or after this time are returned. 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" + } + }, + { + "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": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repository_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "color": { + "type": "string" + }, + "default": { + "type": "boolean" + } + } + } + }, + "assignee": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "assignees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "milestone": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "open_issues": { + "type": "number" + }, + "closed_issues": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "closed_at": { + "type": "string" + }, + "due_on": { + "type": "string" + } + } + }, + "locked": { + "type": "boolean" + }, + "active_lock_reason": { + "type": "string" + }, + "comments": { + "type": "number" + }, + "pull_request": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "diff_url": { + "type": "string" + }, + "patch_url": { + "type": "string" + } + } + }, + "closed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + } + }, + "example": [ + { + "id": 1, + "node_id": "MDU6SXNzdWUx", + "url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", + "repository_url": "https://api.github.com/repos/octocat/Hello-World", + "labels_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}", + "comments_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/comments", + "events_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/events", + "html_url": "https://github.com/octocat/Hello-World/issues/1347", + "number": 1347, + "state": "open", + "title": "Found a bug", + "body": "I'm having a problem with this.", + "user": { + "login": "octocat", + "id": 1, + "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 + }, + "labels": [ + { + "id": 208045946, + "node_id": "MDU6TGFiZWwyMDgwNDU5NDY=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", + "name": "bug", + "description": "Something isn't working", + "color": "f29513", + "default": true + } + ], + "assignee": { + "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 + }, + "assignees": [ + { + "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 + } + ], + "milestone": { + "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1", + "html_url": "https://github.com/octocat/Hello-World/milestones/v1.0", + "labels_url": "https://api.github.com/repos/octocat/Hello-World/milestones/1/labels", + "id": 1002604, + "node_id": "MDk6TWlsZXN0b25lMTAwMjYwNA==", + "number": 1, + "state": "open", + "title": "v1.0", + "description": "Tracking milestone for version 1.0", + "creator": { + "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 + }, + "open_issues": 4, + "closed_issues": 8, + "created_at": "2011-04-10T20:09:31Z", + "updated_at": "2014-03-03T18:58:10Z", + "closed_at": "2013-02-12T13:22:01Z", + "due_on": "2012-10-09T23:39:01Z" + }, + "locked": true, + "active_lock_reason": "too heated", + "comments": 0, + "pull_request": { + "url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347", + "html_url": "https://github.com/octocat/Hello-World/pull/1347", + "diff_url": "https://github.com/octocat/Hello-World/pull/1347.diff", + "patch_url": "https://github.com/octocat/Hello-World/pull/1347.patch" + }, + "closed_at": null, + "created_at": "2011-04-22T13:33:48Z", + "updated_at": "2011-04-22T13:33:48Z" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues" + }, + { + "lang": "JS", + "source": "octokit.issues.listForRepo({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.for_repo(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "machine-man", + "note": "If an issue is opened via a GitHub App, the response will include the `performed_via_github_app` object with information about the GitHub App. For more information, see the [related blog post](https://developer.github.com/changes/2016-09-14-Integrations-Early-Access).\n\nTo receive the `performed_via_github_app` object is the response, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.machine-man-preview\n\n```", + "required": false + }, + { + "name": "squirrel-girl", + "note": "An additional `reactions` object in the issue 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://developer.github.com/v3/media) in the `Accept` header:\n\n```\n application/vnd.github.squirrel-girl-preview\n\n```\n\nThe `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions.", + "required": false + } + ] + }, + "x-changes": [] + }, + "post": { + "summary": "Create an issue", + "description": "Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://help.github.com/articles/disabling-issues/), the API returns a `410 Gone` status.\n\nThis endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See \"[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)\" and \"[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)\" for details.", + "operationId": "issues/create", + "tags": [ + "issues" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/issues/#create-an-issue" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repository_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "color": { + "type": "string" + }, + "default": { + "type": "boolean" + } + } + } + }, + "assignee": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "assignees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "milestone": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "open_issues": { + "type": "number" + }, + "closed_issues": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "closed_at": { + "type": "string" + }, + "due_on": { + "type": "string" + } + } + }, + "locked": { + "type": "boolean" + }, + "active_lock_reason": { + "type": "string" + }, + "comments": { + "type": "number" + }, + "pull_request": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "diff_url": { + "type": "string" + }, + "patch_url": { + "type": "string" + } + } + }, + "closed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "closed_by": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + } + }, + "example": { + "id": 1, + "node_id": "MDU6SXNzdWUx", + "url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", + "repository_url": "https://api.github.com/repos/octocat/Hello-World", + "labels_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}", + "comments_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/comments", + "events_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/events", + "html_url": "https://github.com/octocat/Hello-World/issues/1347", + "number": 1347, + "state": "open", + "title": "Found a bug", + "body": "I'm having a problem with this.", + "user": { + "login": "octocat", + "id": 1, + "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 + }, + "labels": [ + { + "id": 208045946, + "node_id": "MDU6TGFiZWwyMDgwNDU5NDY=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", + "name": "bug", + "description": "Something isn't working", + "color": "f29513", + "default": true + } + ], + "assignee": { + "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 + }, + "assignees": [ + { + "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 + } + ], + "milestone": { + "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1", + "html_url": "https://github.com/octocat/Hello-World/milestones/v1.0", + "labels_url": "https://api.github.com/repos/octocat/Hello-World/milestones/1/labels", + "id": 1002604, + "node_id": "MDk6TWlsZXN0b25lMTAwMjYwNA==", + "number": 1, + "state": "open", + "title": "v1.0", + "description": "Tracking milestone for version 1.0", + "creator": { + "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 + }, + "open_issues": 4, + "closed_issues": 8, + "created_at": "2011-04-10T20:09:31Z", + "updated_at": "2014-03-03T18:58:10Z", + "closed_at": "2013-02-12T13:22:01Z", + "due_on": "2012-10-09T23:39:01Z" + }, + "locked": true, + "active_lock_reason": "too heated", + "comments": 0, + "pull_request": { + "url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347", + "html_url": "https://github.com/octocat/Hello-World/pull/1347", + "diff_url": "https://github.com/octocat/Hello-World/pull/1347.diff", + "patch_url": "https://github.com/octocat/Hello-World/pull/1347.patch" + }, + "closed_at": null, + "created_at": "2011-04-22T13:33:48Z", + "updated_at": "2011-04-22T13:33:48Z", + "closed_by": { + "login": "octocat", + "id": 1, + "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 + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues \\\n -d '{\"title\":\"title\"}'" + }, + { + "lang": "JS", + "source": "octokit.issues.create({\n owner: 'octocat',\n repo: 'hello-world',\n title: 'title'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create(\n 'hello-world',\n 'title'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [], + "triggersNotification": true + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "The title of the issue." + }, + "body": { + "type": "string", + "description": "The contents of the issue." + }, + "assignee": { + "type": "string", + "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.**_" + }, + "milestone": { + "type": "integer", + "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": { + "type": "array", + "description": "Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._", + "items": { + "type": "string" + } + }, + "assignees": { + "type": "array", + "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" + } + } + }, + "required": [ + "title" + ] + }, + "example": { + "title": "Found a bug", + "body": "I'm having a problem with this.", + "assignees": [ + "octocat" + ], + "milestone": 1, + "labels": [ + "bug" + ] + } + } + } + } + } + }, + "/repos/{owner}/{repo}/issues/comments": { + "get": { + "summary": "List comments in a repository", + "description": "By default, Issue Comments are ordered by ascending ID.\n\n", + "operationId": "issues/list-comments-for-repo", + "tags": [ + "issues" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/issues/comments/#list-comments-in-a-repository" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "sort", + "description": "Either `created` or `updated`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "created", + "updated" + ], + "default": "created" + } + }, + { + "name": "direction", + "description": "Either `asc` or `desc`. Ignored without the `sort` parameter.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + } + }, + { + "name": "since", + "description": "Only comments updated at or after this time are returned. 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" + } + }, + { + "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": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "body": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + } + }, + "example": [ + { + "id": 1, + "node_id": "MDEyOklzc3VlQ29tbWVudDE=", + "url": "https://api.github.com/repos/octocat/Hello-World/issues/comments/1", + "html_url": "https://github.com/octocat/Hello-World/issues/1347#issuecomment-1", + "body": "Me too", + "user": { + "login": "octocat", + "id": 1, + "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 + }, + "created_at": "2011-04-14T16:00:49Z", + "updated_at": "2011-04-14T16:00:49Z" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/comments" + }, + { + "lang": "JS", + "source": "octokit.issues.listCommentsForRepo({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.comments_for_repo(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": 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://developer.github.com/v3/media) in the `Accept` header:\n\n```\n application/vnd.github.squirrel-girl-preview\n\n```\n\nThe `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions.", + "required": false + } + ] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/issues/comments/{comment_id}": { + "get": { + "summary": "Get a single comment", + "description": "", + "operationId": "issues/get-comment", + "tags": [ + "issues" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/issues/comments/#get-a-single-comment" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "comment_id", + "description": "comment_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "body": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + }, + "example": { + "id": 1, + "node_id": "MDEyOklzc3VlQ29tbWVudDE=", + "url": "https://api.github.com/repos/octocat/Hello-World/issues/comments/1", + "html_url": "https://github.com/octocat/Hello-World/issues/1347#issuecomment-1", + "body": "Me too", + "user": { + "login": "octocat", + "id": 1, + "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 + }, + "created_at": "2011-04-14T16:00:49Z", + "updated_at": "2011-04-14T16:00:49Z" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/comments/42" + }, + { + "lang": "JS", + "source": "octokit.issues.getComment({\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.comment(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "machine-man", + "note": "If an issue comment is created via a GitHub App, the response will include the `performed_via_github_app` object with information about the GitHub App. For more information, see the [related blog post](https://developer.github.com/changes/2016-09-14-Integrations-Early-Access).\n\nTo receive the `performed_via_github_app` object is the response, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.machine-man-preview\n\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://developer.github.com/v3/media) in the `Accept` header:\n\n```\n application/vnd.github.squirrel-girl-preview\n\n```\n\nThe `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions.", + "required": false + } + ] + }, + "x-changes": [] + }, + "patch": { + "summary": "Edit a comment", + "description": "", + "operationId": "issues/update-comment", + "tags": [ + "issues" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/issues/comments/#edit-a-comment" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "comment_id", + "description": "comment_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "body": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + }, + "example": { + "id": 1, + "node_id": "MDEyOklzc3VlQ29tbWVudDE=", + "url": "https://api.github.com/repos/octocat/Hello-World/issues/comments/1", + "html_url": "https://github.com/octocat/Hello-World/issues/1347#issuecomment-1", + "body": "Me too", + "user": { + "login": "octocat", + "id": 1, + "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 + }, + "created_at": "2011-04-14T16:00:49Z", + "updated_at": "2011-04-14T16:00:49Z" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/comments/42 \\\n -d '{\"body\":\"body\"}'" + }, + { + "lang": "JS", + "source": "octokit.issues.updateComment({\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42,\n body: 'body'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.update_comment(\n 'hello-world',\n 42,\n 'body'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "type": "string", + "description": "The contents of the comment." + } + }, + "required": [ + "body" + ] + }, + "example": { + "body": "Me too" + } + } + } + } + }, + "delete": { + "summary": "Delete a comment", + "description": "", + "operationId": "issues/delete-comment", + "tags": [ + "issues" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/issues/comments/#delete-a-comment" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "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" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/comments/42" + }, + { + "lang": "JS", + "source": "octokit.issues.deleteComment({\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_comment(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": { + "get": { + "summary": "List reactions for an issue comment", + "description": "List the reactions to an [issue comment](https://developer.github.com/v3/issues/comments/).", + "operationId": "reactions/list-for-issue-comment", + "tags": [ + "reactions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/reactions/#list-reactions-for-an-issue-comment" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.squirrel-girl-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "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://developer.github.com/v3/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" + ] + } + }, + { + "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": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "content": { + "type": "string" + }, + "created_at": { + "type": "string" + } + } + } + }, + "example": [ + { + "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" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "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" + }, + { + "lang": "JS", + "source": "octokit.reactions.listForIssueComment({\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.for_issue_comment(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "APIs for managing reactions are currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\n application/vnd.github.squirrel-girl-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + }, + "post": { + "summary": "Create reaction for an issue comment", + "description": "Create a reaction to an [issue comment](https://developer.github.com/v3/issues/comments/). A response with a `Status: 200 OK` means that you already added the reaction type to this issue comment.", + "operationId": "reactions/create-for-issue-comment", + "tags": [ + "reactions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/reactions/#create-reaction-for-an-issue-comment" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.squirrel-girl-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "comment_id", + "description": "comment_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "content": { + "type": "string" + }, + "created_at": { + "type": "string" + } + } + }, + "example": { + "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" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\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\"}'" + }, + { + "lang": "JS", + "source": "octokit.reactions.createForIssueComment({\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42,\n content: 'content'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_for_issue_comment(\n 'hello-world',\n 42,\n 'content'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "APIs for managing reactions are currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\n application/vnd.github.squirrel-girl-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the issue comment.", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ] + } + }, + "required": [ + "content" + ] + }, + "example": { + "content": "heart" + } + } + } + } + } + }, + "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}": { + "delete": { + "summary": "Delete an issue comment reaction", + "description": "**Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`.\n\nDelete a reaction to an [issue comment](https://developer.github.com/v3/issues/comments/).", + "operationId": "reactions/delete-for-issue-comment", + "tags": [ + "reactions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/reactions/#delete-an-issue-comment-reaction" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.squirrel-girl-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "comment_id", + "description": "comment_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "reaction_id", + "description": "reaction_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/comments/42/reactions/42" + }, + { + "lang": "JS", + "source": "octokit.reactions.deleteForIssueComment({\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42,\n reaction_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_for_issue_comment(\n 'hello-world',\n 42,\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "APIs for managing reactions are currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\n application/vnd.github.squirrel-girl-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/issues/events": { + "get": { + "summary": "List events for a repository", + "description": "", + "operationId": "issues/list-events-for-repo", + "tags": [ + "issues" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/issues/events/#list-events-for-a-repository" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "actor": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "event": { + "type": "string" + }, + "commit_id": { + "type": "string" + }, + "commit_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "issue": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repository_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "color": { + "type": "string" + }, + "default": { + "type": "boolean" + } + } + } + }, + "assignee": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "assignees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "milestone": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "open_issues": { + "type": "number" + }, + "closed_issues": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "closed_at": { + "type": "string" + }, + "due_on": { + "type": "string" + } + } + }, + "locked": { + "type": "boolean" + }, + "active_lock_reason": { + "type": "string" + }, + "comments": { + "type": "number" + }, + "pull_request": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "diff_url": { + "type": "string" + }, + "patch_url": { + "type": "string" + } + } + }, + "closed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + } + } + } + }, + "example": [ + { + "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", + "issue": { + "id": 1, + "node_id": "MDU6SXNzdWUx", + "url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", + "repository_url": "https://api.github.com/repos/octocat/Hello-World", + "labels_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}", + "comments_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/comments", + "events_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/events", + "html_url": "https://github.com/octocat/Hello-World/issues/1347", + "number": 1347, + "state": "open", + "title": "Found a bug", + "body": "I'm having a problem with this.", + "user": { + "login": "octocat", + "id": 1, + "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 + }, + "labels": [ + { + "id": 208045946, + "node_id": "MDU6TGFiZWwyMDgwNDU5NDY=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", + "name": "bug", + "description": "Something isn't working", + "color": "f29513", + "default": true + } + ], + "assignee": { + "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 + }, + "assignees": [ + { + "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 + } + ], + "milestone": { + "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1", + "html_url": "https://github.com/octocat/Hello-World/milestones/v1.0", + "labels_url": "https://api.github.com/repos/octocat/Hello-World/milestones/1/labels", + "id": 1002604, + "node_id": "MDk6TWlsZXN0b25lMTAwMjYwNA==", + "number": 1, + "state": "open", + "title": "v1.0", + "description": "Tracking milestone for version 1.0", + "creator": { + "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 + }, + "open_issues": 4, + "closed_issues": 8, + "created_at": "2011-04-10T20:09:31Z", + "updated_at": "2014-03-03T18:58:10Z", + "closed_at": "2013-02-12T13:22:01Z", + "due_on": "2012-10-09T23:39:01Z" + }, + "locked": true, + "active_lock_reason": "too heated", + "comments": 0, + "pull_request": { + "url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347", + "html_url": "https://github.com/octocat/Hello-World/pull/1347", + "diff_url": "https://github.com/octocat/Hello-World/pull/1347.diff", + "patch_url": "https://github.com/octocat/Hello-World/pull/1347.patch" + }, + "closed_at": null, + "created_at": "2011-04-22T13:33:48Z", + "updated_at": "2011-04-22T13:33:48Z" + } + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/events" + }, + { + "lang": "JS", + "source": "octokit.issues.listEventsForRepo({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.events_for_repo(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "starfox", + "note": "Project 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](https://developer.github.com/changes/2018-09-05-project-card-events).\n\nTo receive the `project_card` attribute, project boards must be [enabled](https://help.github.com/articles/disabling-project-boards-in-a-repository) for a repository, and you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.starfox-preview+json\n\n```", + "required": false + }, + { + "name": "sailor-v", + "note": "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](https://developer.github.com/changes/2018-01-10-lock-reason-api-preview) for full details. To access this feature, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.sailor-v-preview+json\n\n```", + "required": false + } + ] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/issues/events/{event_id}": { + "get": { + "summary": "Get a single event", + "description": "", + "operationId": "issues/get-event", + "tags": [ + "issues" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/issues/events/#get-a-single-event" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "event_id", + "description": "event_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "actor": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "event": { + "type": "string" + }, + "commit_id": { + "type": "string" + }, + "commit_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "issue": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repository_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "color": { + "type": "string" + }, + "default": { + "type": "boolean" + } + } + } + }, + "assignee": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "assignees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "milestone": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "open_issues": { + "type": "number" + }, + "closed_issues": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "closed_at": { + "type": "string" + }, + "due_on": { + "type": "string" + } + } + }, + "locked": { + "type": "boolean" + }, + "active_lock_reason": { + "type": "string" + }, + "comments": { + "type": "number" + }, + "pull_request": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "diff_url": { + "type": "string" + }, + "patch_url": { + "type": "string" + } + } + }, + "closed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + } + } + }, + "example": { + "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", + "issue": { + "id": 1, + "node_id": "MDU6SXNzdWUx", + "url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", + "repository_url": "https://api.github.com/repos/octocat/Hello-World", + "labels_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}", + "comments_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/comments", + "events_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/events", + "html_url": "https://github.com/octocat/Hello-World/issues/1347", + "number": 1347, + "state": "open", + "title": "Found a bug", + "body": "I'm having a problem with this.", + "user": { + "login": "octocat", + "id": 1, + "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 + }, + "labels": [ + { + "id": 208045946, + "node_id": "MDU6TGFiZWwyMDgwNDU5NDY=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", + "name": "bug", + "description": "Something isn't working", + "color": "f29513", + "default": true + } + ], + "assignee": { + "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 + }, + "assignees": [ + { + "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 + } + ], + "milestone": { + "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1", + "html_url": "https://github.com/octocat/Hello-World/milestones/v1.0", + "labels_url": "https://api.github.com/repos/octocat/Hello-World/milestones/1/labels", + "id": 1002604, + "node_id": "MDk6TWlsZXN0b25lMTAwMjYwNA==", + "number": 1, + "state": "open", + "title": "v1.0", + "description": "Tracking milestone for version 1.0", + "creator": { + "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 + }, + "open_issues": 4, + "closed_issues": 8, + "created_at": "2011-04-10T20:09:31Z", + "updated_at": "2014-03-03T18:58:10Z", + "closed_at": "2013-02-12T13:22:01Z", + "due_on": "2012-10-09T23:39:01Z" + }, + "locked": true, + "active_lock_reason": "too heated", + "comments": 0, + "pull_request": { + "url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347", + "html_url": "https://github.com/octocat/Hello-World/pull/1347", + "diff_url": "https://github.com/octocat/Hello-World/pull/1347.diff", + "patch_url": "https://github.com/octocat/Hello-World/pull/1347.patch" + }, + "closed_at": null, + "created_at": "2011-04-22T13:33:48Z", + "updated_at": "2011-04-22T13:33:48Z" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/events/42" + }, + { + "lang": "JS", + "source": "octokit.issues.getEvent({\n owner: 'octocat',\n repo: 'hello-world',\n event_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.event(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "starfox", + "note": "Project 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](https://developer.github.com/changes/2018-09-05-project-card-events).\n\nTo receive the `project_card` attribute, project boards must be [enabled](https://help.github.com/articles/disabling-project-boards-in-a-repository) for a repository, and you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.starfox-preview+json\n\n```", + "required": false + }, + { + "name": "machine-man", + "note": "If an issue event is created via a GitHub App, the response will include the `performed_via_github_app` object with information about the GitHub App. For more information, see the [related blog post](https://developer.github.com/changes/2016-09-14-Integrations-Early-Access).\n\nTo receive the `performed_via_github_app` object is the response, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.machine-man-preview\n\n```", + "required": false + }, + { + "name": "sailor-v", + "note": "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](https://developer.github.com/changes/2018-01-10-lock-reason-api-preview) for full details. To access this feature, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.sailor-v-preview+json\n\n```", + "required": false + } + ] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/issues/{issue_number}": { + "get": { + "summary": "Get a single issue", + "description": "The API returns a [`301 Moved Permanently` status](https://developer.github.com/v3/#http-redirects) if the issue was [transferred](https://help.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. If the issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API returns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has read access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe to the [`issues`](https://developer.github.com/v3/activity/events/types/#issuesevent) webhook.\n\n**Note**: 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.\n\nBe 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](https://developer.github.com/v3/pulls/#list-pull-requests)\" endpoint.\n\n", + "operationId": "issues/get", + "tags": [ + "issues" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/issues/#get-a-single-issue" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "issue_number", + "description": "issue_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repository_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "color": { + "type": "string" + }, + "default": { + "type": "boolean" + } + } + } + }, + "assignee": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "assignees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "milestone": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "open_issues": { + "type": "number" + }, + "closed_issues": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "closed_at": { + "type": "string" + }, + "due_on": { + "type": "string" + } + } + }, + "locked": { + "type": "boolean" + }, + "active_lock_reason": { + "type": "string" + }, + "comments": { + "type": "number" + }, + "pull_request": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "diff_url": { + "type": "string" + }, + "patch_url": { + "type": "string" + } + } + }, + "closed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "closed_by": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + } + }, + "example": { + "id": 1, + "node_id": "MDU6SXNzdWUx", + "url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", + "repository_url": "https://api.github.com/repos/octocat/Hello-World", + "labels_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}", + "comments_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/comments", + "events_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/events", + "html_url": "https://github.com/octocat/Hello-World/issues/1347", + "number": 1347, + "state": "open", + "title": "Found a bug", + "body": "I'm having a problem with this.", + "user": { + "login": "octocat", + "id": 1, + "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 + }, + "labels": [ + { + "id": 208045946, + "node_id": "MDU6TGFiZWwyMDgwNDU5NDY=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", + "name": "bug", + "description": "Something isn't working", + "color": "f29513", + "default": true + } + ], + "assignee": { + "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 + }, + "assignees": [ + { + "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 + } + ], + "milestone": { + "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1", + "html_url": "https://github.com/octocat/Hello-World/milestones/v1.0", + "labels_url": "https://api.github.com/repos/octocat/Hello-World/milestones/1/labels", + "id": 1002604, + "node_id": "MDk6TWlsZXN0b25lMTAwMjYwNA==", + "number": 1, + "state": "open", + "title": "v1.0", + "description": "Tracking milestone for version 1.0", + "creator": { + "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 + }, + "open_issues": 4, + "closed_issues": 8, + "created_at": "2011-04-10T20:09:31Z", + "updated_at": "2014-03-03T18:58:10Z", + "closed_at": "2013-02-12T13:22:01Z", + "due_on": "2012-10-09T23:39:01Z" + }, + "locked": true, + "active_lock_reason": "too heated", + "comments": 0, + "pull_request": { + "url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347", + "html_url": "https://github.com/octocat/Hello-World/pull/1347", + "diff_url": "https://github.com/octocat/Hello-World/pull/1347.diff", + "patch_url": "https://github.com/octocat/Hello-World/pull/1347.patch" + }, + "closed_at": null, + "created_at": "2011-04-22T13:33:48Z", + "updated_at": "2011-04-22T13:33:48Z", + "closed_by": { + "login": "octocat", + "id": 1, + "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 + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42" + }, + { + "lang": "JS", + "source": "octokit.issues.get({\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.get(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "An additional `reactions` object in the issue 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://developer.github.com/v3/media) in the `Accept` header:\n\n```\n application/vnd.github.squirrel-girl-preview\n\n```\n\nThe `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions.", + "required": false + } + ] + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"number\" parameter renamed to \"issue_number\"", + "before": { + "name": "number" + }, + "after": { + "name": "issue_number" + } + } + ] + }, + "patch": { + "summary": "Edit an issue", + "description": "Issue owners and users with push access can edit an issue.", + "operationId": "issues/update", + "tags": [ + "issues" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/issues/#edit-an-issue" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "issue_number", + "description": "issue_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repository_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "color": { + "type": "string" + }, + "default": { + "type": "boolean" + } + } + } + }, + "assignee": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "assignees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "milestone": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "open_issues": { + "type": "number" + }, + "closed_issues": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "closed_at": { + "type": "string" + }, + "due_on": { + "type": "string" + } + } + }, + "locked": { + "type": "boolean" + }, + "active_lock_reason": { + "type": "string" + }, + "comments": { + "type": "number" + }, + "pull_request": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "diff_url": { + "type": "string" + }, + "patch_url": { + "type": "string" + } + } + }, + "closed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "closed_by": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + } + }, + "example": { + "id": 1, + "node_id": "MDU6SXNzdWUx", + "url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", + "repository_url": "https://api.github.com/repos/octocat/Hello-World", + "labels_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}", + "comments_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/comments", + "events_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/events", + "html_url": "https://github.com/octocat/Hello-World/issues/1347", + "number": 1347, + "state": "open", + "title": "Found a bug", + "body": "I'm having a problem with this.", + "user": { + "login": "octocat", + "id": 1, + "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 + }, + "labels": [ + { + "id": 208045946, + "node_id": "MDU6TGFiZWwyMDgwNDU5NDY=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", + "name": "bug", + "description": "Something isn't working", + "color": "f29513", + "default": true + } + ], + "assignee": { + "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 + }, + "assignees": [ + { + "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 + } + ], + "milestone": { + "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1", + "html_url": "https://github.com/octocat/Hello-World/milestones/v1.0", + "labels_url": "https://api.github.com/repos/octocat/Hello-World/milestones/1/labels", + "id": 1002604, + "node_id": "MDk6TWlsZXN0b25lMTAwMjYwNA==", + "number": 1, + "state": "open", + "title": "v1.0", + "description": "Tracking milestone for version 1.0", + "creator": { + "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 + }, + "open_issues": 4, + "closed_issues": 8, + "created_at": "2011-04-10T20:09:31Z", + "updated_at": "2014-03-03T18:58:10Z", + "closed_at": "2013-02-12T13:22:01Z", + "due_on": "2012-10-09T23:39:01Z" + }, + "locked": true, + "active_lock_reason": "too heated", + "comments": 0, + "pull_request": { + "url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347", + "html_url": "https://github.com/octocat/Hello-World/pull/1347", + "diff_url": "https://github.com/octocat/Hello-World/pull/1347.diff", + "patch_url": "https://github.com/octocat/Hello-World/pull/1347.patch" + }, + "closed_at": null, + "created_at": "2011-04-22T13:33:48Z", + "updated_at": "2011-04-22T13:33:48Z", + "closed_by": { + "login": "octocat", + "id": 1, + "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 + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42 \\\n -d '{\"title\":\"title\"}'" + }, + { + "lang": "JS", + "source": "octokit.issues.update({\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42,\n title: 'title'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.update(\n 'hello-world',\n 42,\n 'title'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"number\" parameter renamed to \"issue_number\"", + "before": { + "name": "number" + }, + "after": { + "name": "issue_number" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "The title of the issue." + }, + "body": { + "type": "string", + "description": "The contents of the issue." + }, + "assignee": { + "type": "string", + "description": "Login for the user that this issue should be assigned to. **This field is deprecated.**" + }, + "state": { + "type": "string", + "description": "State of the issue. Either `open` or `closed`.", + "enum": [ + "open", + "closed" + ] + }, + "milestone": { + "type": "integer", + "description": "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._", + "nullable": true + }, + "labels": { + "type": "array", + "description": "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._", + "items": { + "type": "string" + } + }, + "assignees": { + "type": "array", + "description": "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._", + "items": { + "type": "string" + } + } + } + }, + "example": { + "title": "Found a bug", + "body": "I'm having a problem with this.", + "assignees": [ + "octocat" + ], + "milestone": 1, + "state": "open", + "labels": [ + "bug" + ] + } + } + } + } + } + }, + "/repos/{owner}/{repo}/issues/{issue_number}/assignees": { + "post": { + "summary": "Add assignees to an issue", + "description": "Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced.\n\nThis example adds two assignees to the existing `octocat` assignee.", + "operationId": "issues/add-assignees", + "tags": [ + "issues" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/issues/assignees/#add-assignees-to-an-issue" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "issue_number", + "description": "issue_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repository_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "color": { + "type": "string" + }, + "default": { + "type": "boolean" + } + } + } + }, + "assignee": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "assignees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + }, + "required": [ + "login", + "id", + "node_id", + "avatar_url", + "gravatar_id", + "url", + "html_url", + "followers_url", + "following_url", + "gists_url", + "starred_url", + "subscriptions_url", + "organizations_url", + "repos_url", + "events_url", + "received_events_url", + "type", + "site_admin" + ] + } + }, + "milestone": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "open_issues": { + "type": "number" + }, + "closed_issues": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "closed_at": { + "type": "string" + }, + "due_on": { + "type": "string" + } + } + }, + "locked": { + "type": "boolean" + }, + "active_lock_reason": { + "type": "string" + }, + "comments": { + "type": "number" + }, + "pull_request": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "diff_url": { + "type": "string" + }, + "patch_url": { + "type": "string" + } + } + }, + "closed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + }, + "example": { + "id": 1, + "node_id": "MDU6SXNzdWUx", + "url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", + "repository_url": "https://api.github.com/repos/octocat/Hello-World", + "labels_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}", + "comments_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/comments", + "events_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/events", + "html_url": "https://github.com/octocat/Hello-World/issues/1347", + "number": 1347, + "state": "open", + "title": "Found a bug", + "body": "I'm having a problem with this.", + "user": { + "login": "octocat", + "id": 1, + "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 + }, + "labels": [ + { + "id": 208045946, + "node_id": "MDU6TGFiZWwyMDgwNDU5NDY=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", + "name": "bug", + "description": "Something isn't working", + "color": "f29513", + "default": true + } + ], + "assignee": { + "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 + }, + "assignees": [ + { + "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 + }, + { + "login": "hubot", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/hubot_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/hubot", + "html_url": "https://github.com/hubot", + "followers_url": "https://api.github.com/users/hubot/followers", + "following_url": "https://api.github.com/users/hubot/following{/other_user}", + "gists_url": "https://api.github.com/users/hubot/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hubot/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hubot/subscriptions", + "organizations_url": "https://api.github.com/users/hubot/orgs", + "repos_url": "https://api.github.com/users/hubot/repos", + "events_url": "https://api.github.com/users/hubot/events{/privacy}", + "received_events_url": "https://api.github.com/users/hubot/received_events", + "type": "User", + "site_admin": true + }, + { + "login": "other_user", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/other_user_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/other_user", + "html_url": "https://github.com/other_user", + "followers_url": "https://api.github.com/users/other_user/followers", + "following_url": "https://api.github.com/users/other_user/following{/other_user}", + "gists_url": "https://api.github.com/users/other_user/gists{/gist_id}", + "starred_url": "https://api.github.com/users/other_user/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/other_user/subscriptions", + "organizations_url": "https://api.github.com/users/other_user/orgs", + "repos_url": "https://api.github.com/users/other_user/repos", + "events_url": "https://api.github.com/users/other_user/events{/privacy}", + "received_events_url": "https://api.github.com/users/other_user/received_events", + "type": "User", + "site_admin": false + } + ], + "milestone": { + "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1", + "html_url": "https://github.com/octocat/Hello-World/milestones/v1.0", + "labels_url": "https://api.github.com/repos/octocat/Hello-World/milestones/1/labels", + "id": 1002604, + "node_id": "MDk6TWlsZXN0b25lMTAwMjYwNA==", + "number": 1, + "state": "open", + "title": "v1.0", + "description": "Tracking milestone for version 1.0", + "creator": { + "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 + }, + "open_issues": 4, + "closed_issues": 8, + "created_at": "2011-04-10T20:09:31Z", + "updated_at": "2014-03-03T18:58:10Z", + "closed_at": "2013-02-12T13:22:01Z", + "due_on": "2012-10-09T23:39:01Z" + }, + "locked": true, + "active_lock_reason": "too heated", + "comments": 0, + "pull_request": { + "url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347", + "html_url": "https://github.com/octocat/Hello-World/pull/1347", + "diff_url": "https://github.com/octocat/Hello-World/pull/1347.diff", + "patch_url": "https://github.com/octocat/Hello-World/pull/1347.patch" + }, + "closed_at": null, + "created_at": "2011-04-22T13:33:48Z", + "updated_at": "2011-04-22T13:33:48Z" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/assignees \\\n -d '{\"assignees\":[\"assignees\"]}'" + }, + { + "lang": "JS", + "source": "octokit.issues.addAssignees({\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42,\n assignees: [\n 'assignees'\n ]\n})" + }, + { + "lang": "Ruby", + "source": "octokit.add_assignees(\n 'hello-world',\n 42,\n [\n 'assignees'\n ]\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"number\" parameter renamed to \"issue_number\"", + "before": { + "name": "number" + }, + "after": { + "name": "issue_number" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "assignees": { + "type": "array", + "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" + } + } + } + }, + "example": { + "assignees": [ + "hubot", + "other_user" + ] + } + } + } + } + }, + "delete": { + "summary": "Remove assignees from an issue", + "description": "Removes one or more assignees from an issue.\n\nThis example removes two of three assignees, leaving the `octocat` assignee.", + "operationId": "issues/remove-assignees", + "tags": [ + "issues" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/issues/assignees/#remove-assignees-from-an-issue" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "issue_number", + "description": "issue_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repository_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "color": { + "type": "string" + }, + "default": { + "type": "boolean" + } + } + } + }, + "assignee": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "assignees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "milestone": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "open_issues": { + "type": "number" + }, + "closed_issues": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "closed_at": { + "type": "string" + }, + "due_on": { + "type": "string" + } + } + }, + "locked": { + "type": "boolean" + }, + "active_lock_reason": { + "type": "string" + }, + "comments": { + "type": "number" + }, + "pull_request": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "diff_url": { + "type": "string" + }, + "patch_url": { + "type": "string" + } + } + }, + "closed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + }, + "example": { + "id": 1, + "node_id": "MDU6SXNzdWUx", + "url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", + "repository_url": "https://api.github.com/repos/octocat/Hello-World", + "labels_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}", + "comments_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/comments", + "events_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/events", + "html_url": "https://github.com/octocat/Hello-World/issues/1347", + "number": 1347, + "state": "open", + "title": "Found a bug", + "body": "I'm having a problem with this.", + "user": { + "login": "octocat", + "id": 1, + "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 + }, + "labels": [ + { + "id": 208045946, + "node_id": "MDU6TGFiZWwyMDgwNDU5NDY=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", + "name": "bug", + "description": "Something isn't working", + "color": "f29513", + "default": true + } + ], + "assignee": { + "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 + }, + "assignees": [ + { + "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 + } + ], + "milestone": { + "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1", + "html_url": "https://github.com/octocat/Hello-World/milestones/v1.0", + "labels_url": "https://api.github.com/repos/octocat/Hello-World/milestones/1/labels", + "id": 1002604, + "node_id": "MDk6TWlsZXN0b25lMTAwMjYwNA==", + "number": 1, + "state": "open", + "title": "v1.0", + "description": "Tracking milestone for version 1.0", + "creator": { + "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 + }, + "open_issues": 4, + "closed_issues": 8, + "created_at": "2011-04-10T20:09:31Z", + "updated_at": "2014-03-03T18:58:10Z", + "closed_at": "2013-02-12T13:22:01Z", + "due_on": "2012-10-09T23:39:01Z" + }, + "locked": true, + "active_lock_reason": "too heated", + "comments": 0, + "pull_request": { + "url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347", + "html_url": "https://github.com/octocat/Hello-World/pull/1347", + "diff_url": "https://github.com/octocat/Hello-World/pull/1347.diff", + "patch_url": "https://github.com/octocat/Hello-World/pull/1347.patch" + }, + "closed_at": null, + "created_at": "2011-04-22T13:33:48Z", + "updated_at": "2011-04-22T13:33:48Z" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/assignees \\\n -d '{\"assignees\":[\"assignees\"]}'" + }, + { + "lang": "JS", + "source": "octokit.issues.removeAssignees({\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42,\n assignees: [\n 'assignees'\n ]\n})" + }, + { + "lang": "Ruby", + "source": "octokit.remove_assignees(\n 'hello-world',\n 42,\n [\n 'assignees'\n ]\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"number\" parameter renamed to \"issue_number\"", + "before": { + "name": "number" + }, + "after": { + "name": "issue_number" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "assignees": { + "type": "array", + "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" + } + } + } + }, + "example": { + "assignees": [ + "hubot", + "other_user" + ] + } + } + } + } + } + }, + "/repos/{owner}/{repo}/issues/{issue_number}/comments": { + "get": { + "summary": "List comments on an issue", + "description": "Issue Comments are ordered by ascending ID.\n\n", + "operationId": "issues/list-comments", + "tags": [ + "issues" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/issues/comments/#list-comments-on-an-issue" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "issue_number", + "description": "issue_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "since", + "description": "Only comments updated at or after this time are returned. 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" + } + }, + { + "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": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "body": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + } + }, + "example": [ + { + "id": 1, + "node_id": "MDEyOklzc3VlQ29tbWVudDE=", + "url": "https://api.github.com/repos/octocat/Hello-World/issues/comments/1", + "html_url": "https://github.com/octocat/Hello-World/issues/1347#issuecomment-1", + "body": "Me too", + "user": { + "login": "octocat", + "id": 1, + "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 + }, + "created_at": "2011-04-14T16:00:49Z", + "updated_at": "2011-04-14T16:00:49Z" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/comments" + }, + { + "lang": "JS", + "source": "octokit.issues.listComments({\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.comments(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": 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://developer.github.com/v3/media) in the `Accept` header:\n\n```\n application/vnd.github.squirrel-girl-preview\n\n```\n\nThe `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions.", + "required": false + } + ] + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"number\" parameter renamed to \"issue_number\"", + "before": { + "name": "number" + }, + "after": { + "name": "issue_number" + } + } + ] + }, + "post": { + "summary": "Create a comment", + "description": "This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See \"[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)\" and \"[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)\" for details.", + "operationId": "issues/create-comment", + "tags": [ + "issues" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/issues/comments/#create-a-comment" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "issue_number", + "description": "issue_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "body": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + }, + "example": { + "id": 1, + "node_id": "MDEyOklzc3VlQ29tbWVudDE=", + "url": "https://api.github.com/repos/octocat/Hello-World/issues/comments/1", + "html_url": "https://github.com/octocat/Hello-World/issues/1347#issuecomment-1", + "body": "Me too", + "user": { + "login": "octocat", + "id": 1, + "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 + }, + "created_at": "2011-04-14T16:00:49Z", + "updated_at": "2011-04-14T16:00:49Z" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/comments \\\n -d '{\"body\":\"body\"}'" + }, + { + "lang": "JS", + "source": "octokit.issues.createComment({\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42,\n body: 'body'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_comment(\n 'hello-world',\n 42,\n 'body'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [], + "triggersNotification": true + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"number\" parameter renamed to \"issue_number\"", + "before": { + "name": "number" + }, + "after": { + "name": "issue_number" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "type": "string", + "description": "The contents of the comment." + } + }, + "required": [ + "body" + ] + }, + "example": { + "body": "Me too" + } + } + } + } + } + }, + "/repos/{owner}/{repo}/issues/{issue_number}/events": { + "get": { + "summary": "List events for an issue", + "description": "", + "operationId": "issues/list-events", + "tags": [ + "issues" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/issues/events/#list-events-for-an-issue" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "issue_number", + "description": "issue_number parameter", + "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": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "actor": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "event": { + "type": "string" + }, + "commit_id": { + "type": "string" + }, + "commit_url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + } + } + }, + "example": [ + { + "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" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/events" + }, + { + "lang": "JS", + "source": "octokit.issues.listEvents({\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.events(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "starfox", + "note": "Project 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](https://developer.github.com/changes/2018-09-05-project-card-events).\n\nTo receive the `project_card` attribute, project boards must be [enabled](https://help.github.com/articles/disabling-project-boards-in-a-repository) for a repository, and you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.starfox-preview+json\n\n```", + "required": false + }, + { + "name": "sailor-v", + "note": "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](https://developer.github.com/changes/2018-01-10-lock-reason-api-preview) for full details. To access this feature, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.sailor-v-preview+json\n\n```", + "required": false + } + ] + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"number\" parameter renamed to \"issue_number\"", + "before": { + "name": "number" + }, + "after": { + "name": "issue_number" + } + } + ] + } + }, + "/repos/{owner}/{repo}/issues/{issue_number}/labels": { + "get": { + "summary": "List labels on an issue", + "description": "", + "operationId": "issues/list-labels-on-issue", + "tags": [ + "issues" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/issues/labels/#list-labels-on-an-issue" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "issue_number", + "description": "issue_number parameter", + "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": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "color": { + "type": "string" + }, + "default": { + "type": "boolean" + } + } + } + }, + "example": [ + { + "id": 208045946, + "node_id": "MDU6TGFiZWwyMDgwNDU5NDY=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", + "name": "bug", + "description": "Something isn't working", + "color": "f29513", + "default": true + }, + { + "id": 208045947, + "node_id": "MDU6TGFiZWwyMDgwNDU5NDc=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/enhancement", + "name": "enhancement", + "description": "New feature or request", + "color": "a2eeef", + "default": false + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/labels" + }, + { + "lang": "JS", + "source": "octokit.issues.listLabelsOnIssue({\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.labels_on_issue(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"number\" parameter renamed to \"issue_number\"", + "before": { + "name": "number" + }, + "after": { + "name": "issue_number" + } + } + ] + }, + "post": { + "summary": "Add labels to an issue", + "description": "", + "operationId": "issues/add-labels", + "tags": [ + "issues" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/issues/labels/#add-labels-to-an-issue" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "issue_number", + "description": "issue_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "color": { + "type": "string" + }, + "default": { + "type": "boolean" + } + } + } + }, + "example": [ + { + "id": 208045946, + "node_id": "MDU6TGFiZWwyMDgwNDU5NDY=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", + "name": "bug", + "description": "Something isn't working", + "color": "f29513", + "default": true + }, + { + "id": 208045947, + "node_id": "MDU6TGFiZWwyMDgwNDU5NDc=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/enhancement", + "name": "enhancement", + "description": "New feature or request", + "color": "a2eeef", + "default": false + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/labels \\\n -d '{\"labels\":[\"labels\"]}'" + }, + { + "lang": "JS", + "source": "octokit.issues.addLabels({\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42,\n labels: [\n 'labels'\n ]\n})" + }, + { + "lang": "Ruby", + "source": "octokit.add_labels(\n 'hello-world',\n 42,\n [\n 'labels'\n ]\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"number\" parameter renamed to \"issue_number\"", + "before": { + "name": "number" + }, + "after": { + "name": "issue_number" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "labels": { + "type": "array", + "description": "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.", + "items": { + "type": "string" + } + } + }, + "required": [ + "labels" + ] + }, + "example": { + "labels": [ + "bug", + "enhancement" + ] + } + } + } + } + }, + "put": { + "summary": "Replace all labels for an issue", + "description": "", + "operationId": "issues/replace-labels", + "tags": [ + "issues" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/issues/labels/#replace-all-labels-for-an-issue" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "issue_number", + "description": "issue_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "color": { + "type": "string" + }, + "default": { + "type": "boolean" + } + } + } + }, + "example": [ + { + "id": 208045946, + "node_id": "MDU6TGFiZWwyMDgwNDU5NDY=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", + "name": "bug", + "description": "Something isn't working", + "color": "f29513", + "default": true + }, + { + "id": 208045947, + "node_id": "MDU6TGFiZWwyMDgwNDU5NDc=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/enhancement", + "name": "enhancement", + "description": "New feature or request", + "color": "a2eeef", + "default": false + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/labels \\\n -d '{\"labels\":[\"labels\"]}'" + }, + { + "lang": "JS", + "source": "octokit.issues.replaceLabels({\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42,\n labels: [\n 'labels'\n ]\n})" + }, + { + "lang": "Ruby", + "source": "octokit.replace_labels(\n 'hello-world',\n 42,\n [\n 'labels'\n ]\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"number\" parameter renamed to \"issue_number\"", + "before": { + "name": "number" + }, + "after": { + "name": "issue_number" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "labels": { + "type": "array", + "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.", + "items": { + "type": "string" + } + } + } + }, + "example": { + "labels": [ + "bug", + "enhancement" + ] + } + } + } + } + }, + "delete": { + "summary": "Remove all labels from an issue", + "description": "", + "operationId": "issues/remove-labels", + "tags": [ + "issues" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/issues/labels/#remove-all-labels-from-an-issue" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "issue_number", + "description": "issue_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/labels" + }, + { + "lang": "JS", + "source": "octokit.issues.removeLabels({\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.remove_labels(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"number\" parameter renamed to \"issue_number\"", + "before": { + "name": "number" + }, + "after": { + "name": "issue_number" + } + } + ] + } + }, + "/repos/{owner}/{repo}/issues/{issue_number}/labels/{name}": { + "delete": { + "summary": "Remove a label from an issue", + "description": "Removes 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.", + "operationId": "issues/remove-label", + "tags": [ + "issues" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/issues/labels/#remove-a-label-from-an-issue" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "issue_number", + "description": "issue_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "name", + "description": "name parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "color": { + "type": "string" + }, + "default": { + "type": "boolean" + } + } + } + }, + "example": [ + { + "id": 208045946, + "node_id": "MDU6TGFiZWwyMDgwNDU5NDY=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", + "name": "bug", + "description": "Something isn't working", + "color": "f29513", + "default": true + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/labels/NAME" + }, + { + "lang": "JS", + "source": "octokit.issues.removeLabel({\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42,\n name: 'name'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.remove_label(\n 'hello-world',\n 42,\n 'name'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"number\" parameter renamed to \"issue_number\"", + "before": { + "name": "number" + }, + "after": { + "name": "issue_number" + } + } + ] + } + }, + "/repos/{owner}/{repo}/issues/{issue_number}/lock": { + "put": { + "summary": "Lock an issue", + "description": "Users with push access can lock an issue or pull request's conversation.\n\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](https://developer.github.com/v3/#http-verbs).\"", + "operationId": "issues/lock", + "tags": [ + "issues" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/issues/#lock-an-issue" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "issue_number", + "description": "issue_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\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\"}'" + }, + { + "lang": "JS", + "source": "octokit.issues.lock({\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42,\n lock_reason: 'lock_reason'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.lock(\n 'hello-world',\n 42,\n 'lock_reason'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "sailor-v", + "note": "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](https://developer.github.com/changes/2018-01-10-lock-reason-api-preview) for full details. To access this feature, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.sailor-v-preview+json\n\n```", + "required": false + } + ] + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"number\" parameter renamed to \"issue_number\"", + "before": { + "name": "number" + }, + "after": { + "name": "issue_number" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "lock_reason": { + "type": "string", + "description": "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`", + "enum": [ + "off-topic", + "too heated", + "resolved", + "spam" + ] + } + } + } + } + } + } + }, + "delete": { + "summary": "Unlock an issue", + "description": "Users with push access can unlock an issue's conversation.", + "operationId": "issues/unlock", + "tags": [ + "issues" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/issues/#unlock-an-issue" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "issue_number", + "description": "issue_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/lock" + }, + { + "lang": "JS", + "source": "octokit.issues.unlock({\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.unlock(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"number\" parameter renamed to \"issue_number\"", + "before": { + "name": "number" + }, + "after": { + "name": "issue_number" + } + } + ] + } + }, + "/repos/{owner}/{repo}/issues/{issue_number}/reactions": { + "get": { + "summary": "List reactions for an issue", + "description": "List the reactions to an [issue](https://developer.github.com/v3/issues/).", + "operationId": "reactions/list-for-issue", + "tags": [ + "reactions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/reactions/#list-reactions-for-an-issue" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.squirrel-girl-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "issue_number", + "description": "issue_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "content", + "description": "Returns a single [reaction type](https://developer.github.com/v3/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" + ] + } + }, + { + "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": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "content": { + "type": "string" + }, + "created_at": { + "type": "string" + } + } + } + }, + "example": [ + { + "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" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "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" + }, + { + "lang": "JS", + "source": "octokit.reactions.listForIssue({\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.for_issue(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "APIs for managing reactions are currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\n application/vnd.github.squirrel-girl-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"number\" parameter renamed to \"issue_number\"", + "before": { + "name": "number" + }, + "after": { + "name": "issue_number" + } + } + ] + }, + "post": { + "summary": "Create reaction for an issue", + "description": "Create a reaction to an [issue](https://developer.github.com/v3/issues/). A response with a `Status: 200 OK` means that you already added the reaction type to this issue.", + "operationId": "reactions/create-for-issue", + "tags": [ + "reactions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/reactions/#create-reaction-for-an-issue" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.squirrel-girl-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "issue_number", + "description": "issue_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "content": { + "type": "string" + }, + "created_at": { + "type": "string" + } + } + }, + "example": { + "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" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\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\"}'" + }, + { + "lang": "JS", + "source": "octokit.reactions.createForIssue({\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42,\n content: 'content'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_for_issue(\n 'hello-world',\n 42,\n 'content'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "APIs for managing reactions are currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\n application/vnd.github.squirrel-girl-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"number\" parameter renamed to \"issue_number\"", + "before": { + "name": "number" + }, + "after": { + "name": "issue_number" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the issue.", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ] + } + }, + "required": [ + "content" + ] + }, + "example": { + "content": "heart" + } + } + } + } + } + }, + "/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}": { + "delete": { + "summary": "Delete an issue reaction", + "description": "**Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`.\n\nDelete a reaction to an [issue](https://developer.github.com/v3/issues/).", + "operationId": "reactions/delete-for-issue", + "tags": [ + "reactions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/reactions/#delete-an-issue-reaction" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.squirrel-girl-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "issue_number", + "description": "issue_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "reaction_id", + "description": "reaction_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/reactions/42" + }, + { + "lang": "JS", + "source": "octokit.reactions.deleteForIssue({\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42,\n reaction_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_for_issue(\n 'hello-world',\n 42,\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "APIs for managing reactions are currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\n application/vnd.github.squirrel-girl-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/issues/{issue_number}/timeline": { + "get": { + "summary": "List events for an issue", + "description": "", + "operationId": "issues/list-events-for-timeline", + "tags": [ + "issues" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/issues/timeline/#list-events-for-an-issue" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.mockingbird-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "issue_number", + "description": "issue_number parameter", + "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": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "actor": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "event": { + "type": "string" + }, + "commit_id": { + "type": "string" + }, + "commit_url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + } + } + }, + "example": [ + { + "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" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "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" + }, + { + "lang": "JS", + "source": "octokit.issues.listEventsForTimeline({\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.events_for_timeline(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "mockingbird", + "note": "The 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](https://developer.github.com/changes/2016-05-23-timeline-preview-api/) for full details. To access the API you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.mockingbird-preview\n\n```", + "required": true + }, + { + "name": "starfox", + "note": "Project 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](https://developer.github.com/changes/2018-09-05-project-card-events).\n\nTo receive the `project_card` attribute, project boards must be [enabled](https://help.github.com/articles/disabling-project-boards-in-a-repository) for a repository, and you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.starfox-preview+json\n\n```", + "required": false + } + ] + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"number\" parameter renamed to \"issue_number\"", + "before": { + "name": "number" + }, + "after": { + "name": "issue_number" + } + } + ] + } + }, + "/repos/{owner}/{repo}/keys": { + "get": { + "summary": "List deploy keys", + "description": "", + "operationId": "repos/list-deploy-keys", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/keys/#list-deploy-keys" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "id": { + "type": "number" + }, + "key": { + "type": "string" + }, + "url": { + "type": "string" + }, + "title": { + "type": "string" + }, + "verified": { + "type": "boolean" + }, + "created_at": { + "type": "string" + }, + "read_only": { + "type": "boolean" + } + } + } + }, + "example": [ + { + "id": 1, + "key": "ssh-rsa AAA...", + "url": "https://api.github.com/repos/octocat/Hello-World/keys/1", + "title": "octocat@octomac", + "verified": true, + "created_at": "2014-12-10T15:53:42Z", + "read_only": true + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/keys" + }, + { + "lang": "JS", + "source": "octokit.repos.listDeployKeys({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.deploy_keys(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "post": { + "summary": "Add a new deploy key", + "description": "Here's how you can create a read-only deploy key:\n\n", + "operationId": "repos/add-deploy-key", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/keys/#add-a-new-deploy-key" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "key": { + "type": "string" + }, + "url": { + "type": "string" + }, + "title": { + "type": "string" + }, + "verified": { + "type": "boolean" + }, + "created_at": { + "type": "string" + }, + "read_only": { + "type": "boolean" + } + } + }, + "example": { + "id": 1, + "key": "ssh-rsa AAA...", + "url": "https://api.github.com/repos/octocat/Hello-World/keys/1", + "title": "octocat@octomac", + "verified": true, + "created_at": "2014-12-10T15:53:42Z", + "read_only": true + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/keys \\\n -d '{\"key\":\"key\"}'" + }, + { + "lang": "JS", + "source": "octokit.repos.addDeployKey({\n owner: 'octocat',\n repo: 'hello-world',\n key: 'key'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.add_deploy_key(\n 'hello-world',\n 'key'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "A name for the key." + }, + "key": { + "type": "string", + "description": "The contents of the key." + }, + "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. \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/).\"" + } + }, + "required": [ + "key" + ] + }, + "example": { + "title": "octocat@octomac", + "key": "ssh-rsa AAA...", + "read_only": true + } + } + } + } + } + }, + "/repos/{owner}/{repo}/keys/{key_id}": { + "get": { + "summary": "Get a deploy key", + "description": "", + "operationId": "repos/get-deploy-key", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/keys/#get-a-deploy-key" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "key_id", + "description": "key_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "key": { + "type": "string" + }, + "url": { + "type": "string" + }, + "title": { + "type": "string" + }, + "verified": { + "type": "boolean" + }, + "created_at": { + "type": "string" + }, + "read_only": { + "type": "boolean" + } + } + }, + "example": { + "id": 1, + "key": "ssh-rsa AAA...", + "url": "https://api.github.com/repos/octocat/Hello-World/keys/1", + "title": "octocat@octomac", + "verified": true, + "created_at": "2014-12-10T15:53:42Z", + "read_only": true + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/keys/42" + }, + { + "lang": "JS", + "source": "octokit.repos.getDeployKey({\n owner: 'octocat',\n repo: 'hello-world',\n key_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.deploy_key(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "delete": { + "summary": "Remove a deploy key", + "description": "", + "operationId": "repos/remove-deploy-key", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/keys/#remove-a-deploy-key" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "key_id", + "description": "key_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/keys/42" + }, + { + "lang": "JS", + "source": "octokit.repos.removeDeployKey({\n owner: 'octocat',\n repo: 'hello-world',\n key_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.remove_deploy_key(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/labels": { + "get": { + "summary": "List all labels for this repository", + "description": "", + "operationId": "issues/list-labels-for-repo", + "tags": [ + "issues" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/issues/labels/#list-all-labels-for-this-repository" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "color": { + "type": "string" + }, + "default": { + "type": "boolean" + } + } + } + }, + "example": [ + { + "id": 208045946, + "node_id": "MDU6TGFiZWwyMDgwNDU5NDY=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", + "name": "bug", + "description": "Something isn't working", + "color": "f29513", + "default": true + }, + { + "id": 208045947, + "node_id": "MDU6TGFiZWwyMDgwNDU5NDc=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/enhancement", + "name": "enhancement", + "description": "New feature or request", + "color": "a2eeef", + "default": false + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/labels" + }, + { + "lang": "JS", + "source": "octokit.issues.listLabelsForRepo({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.labels_for_repo(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "post": { + "summary": "Create a label", + "description": "", + "operationId": "issues/create-label", + "tags": [ + "issues" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/issues/labels/#create-a-label" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "color": { + "type": "string" + }, + "default": { + "type": "boolean" + } + } + }, + "example": { + "id": 208045946, + "node_id": "MDU6TGFiZWwyMDgwNDU5NDY=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", + "name": "bug", + "description": "Something isn't working", + "color": "f29513", + "default": true + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/labels \\\n -d '{\"name\":\"name\",\"color\":\"color\"}'" + }, + { + "lang": "JS", + "source": "octokit.issues.createLabel({\n owner: 'octocat',\n repo: 'hello-world',\n name: 'name',\n color: 'color'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_label(\n 'hello-world',\n 'name',\n 'color'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "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 ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png \":strawberry:\"). For a full list of available emoji and codes, see [emoji-cheat-sheet.com](http://emoji-cheat-sheet.com/)." + }, + "color": { + "type": "string", + "description": "The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`." + }, + "description": { + "type": "string", + "description": "A short description of the label." + } + }, + "required": [ + "name", + "color" + ] + }, + "example": { + "name": "bug", + "description": "Something isn't working", + "color": "f29513" + } + } + } + } + } + }, + "/repos/{owner}/{repo}/labels/{name}": { + "get": { + "summary": "Get a single label", + "description": "", + "operationId": "issues/get-label", + "tags": [ + "issues" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/issues/labels/#get-a-single-label" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "name", + "description": "name parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "color": { + "type": "string" + }, + "default": { + "type": "boolean" + } + } + }, + "example": { + "id": 208045946, + "node_id": "MDU6TGFiZWwyMDgwNDU5NDY=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", + "name": "bug", + "description": "Something isn't working", + "color": "f29513", + "default": true + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/labels/NAME" + }, + { + "lang": "JS", + "source": "octokit.issues.getLabel({\n owner: 'octocat',\n repo: 'hello-world',\n name: 'name'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.label(\n 'hello-world',\n 'name'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "patch": { + "summary": "Update a label", + "description": "", + "operationId": "issues/update-label", + "tags": [ + "issues" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/issues/labels/#update-a-label" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "name", + "description": "name parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "color": { + "type": "string" + }, + "default": { + "type": "boolean" + } + } + }, + "example": { + "id": 208045946, + "node_id": "MDU6TGFiZWwyMDgwNDU5NDY=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug%20:bug:", + "name": "bug :bug:", + "description": "Small bug fix required", + "color": "b01f26", + "default": true + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\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\"}'" + }, + { + "lang": "JS", + "source": "octokit.issues.updateLabel({\n owner: 'octocat',\n repo: 'hello-world',\n name: 'name',\n new_name: 'new_name'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.update_label(\n 'hello-world',\n 'name',\n 'new_name'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "new_name": { + "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 ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png \":strawberry:\"). For a full list of available emoji and codes, see [emoji-cheat-sheet.com](http://emoji-cheat-sheet.com/)." + }, + "color": { + "type": "string", + "description": "The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`." + }, + "description": { + "type": "string", + "description": "A short description of the label." + } + } + }, + "example": { + "new_name": "bug :bug:", + "description": "Small bug fix required", + "color": "b01f26" + } + } + } + } + }, + "delete": { + "summary": "Delete a label", + "description": "", + "operationId": "issues/delete-label", + "tags": [ + "issues" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/issues/labels/#delete-a-label" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "name", + "description": "name parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/labels/NAME" + }, + { + "lang": "JS", + "source": "octokit.issues.deleteLabel({\n owner: 'octocat',\n repo: 'hello-world',\n name: 'name'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_label(\n 'hello-world',\n 'name'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/languages": { + "get": { + "summary": "List languages", + "description": "Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language.", + "operationId": "repos/list-languages", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/#list-languages" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "C": { + "type": "number" + }, + "Python": { + "type": "number" + } + } + }, + "example": { + "C": 78769, + "Python": 7769 + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/languages" + }, + { + "lang": "JS", + "source": "octokit.repos.listLanguages({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.languages(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/license": { + "get": { + "summary": "Get the contents of a repository's license", + "description": "This method returns the contents of the repository's license file, if one is detected.\n\nSimilar to [the repository contents API](https://developer.github.com/v3/repos/contents/#get-contents), this method also supports [custom media types](https://developer.github.com/v3/repos/contents/#custom-media-types) for retrieving the raw license content or rendered license HTML.", + "operationId": "licenses/get-for-repo", + "tags": [ + "licenses" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/licenses/#get-the-contents-of-a-repositorys-license" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "size": { + "type": "number" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "download_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "content": { + "type": "string" + }, + "encoding": { + "type": "string" + }, + "_links": { + "type": "object", + "properties": { + "self": { + "type": "string" + }, + "git": { + "type": "string" + }, + "html": { + "type": "string" + } + } + }, + "license": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "spdx_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "node_id": { + "type": "string" + } + } + } + } + }, + "example": { + "name": "LICENSE", + "path": "LICENSE", + "sha": "401c59dcc4570b954dd6d345e76199e1f4e76266", + "size": 1077, + "url": "https://api.github.com/repos/benbalter/gman/contents/LICENSE?ref=master", + "html_url": "https://github.com/benbalter/gman/blob/master/LICENSE", + "git_url": "https://api.github.com/repos/benbalter/gman/git/blobs/401c59dcc4570b954dd6d345e76199e1f4e76266", + "download_url": "https://raw.githubusercontent.com/benbalter/gman/master/LICENSE?lab=true", + "type": "file", + "content": "VGhlIE1JVCBMaWNlbnNlIChNSVQpCgpDb3B5cmlnaHQgKGMpIDIwMTMgQmVu\nIEJhbHRlcgoKUGVybWlzc2lvbiBpcyBoZXJlYnkgZ3JhbnRlZCwgZnJlZSBv\nZiBjaGFyZ2UsIHRvIGFueSBwZXJzb24gb2J0YWluaW5nIGEgY29weSBvZgp0\naGlzIHNvZnR3YXJlIGFuZCBhc3NvY2lhdGVkIGRvY3VtZW50YXRpb24gZmls\nZXMgKHRoZSAiU29mdHdhcmUiKSwgdG8gZGVhbCBpbgp0aGUgU29mdHdhcmUg\nd2l0aG91dCByZXN0cmljdGlvbiwgaW5jbHVkaW5nIHdpdGhvdXQgbGltaXRh\ndGlvbiB0aGUgcmlnaHRzIHRvCnVzZSwgY29weSwgbW9kaWZ5LCBtZXJnZSwg\ncHVibGlzaCwgZGlzdHJpYnV0ZSwgc3VibGljZW5zZSwgYW5kL29yIHNlbGwg\nY29waWVzIG9mCnRoZSBTb2Z0d2FyZSwgYW5kIHRvIHBlcm1pdCBwZXJzb25z\nIHRvIHdob20gdGhlIFNvZnR3YXJlIGlzIGZ1cm5pc2hlZCB0byBkbyBzbywK\nc3ViamVjdCB0byB0aGUgZm9sbG93aW5nIGNvbmRpdGlvbnM6CgpUaGUgYWJv\ndmUgY29weXJpZ2h0IG5vdGljZSBhbmQgdGhpcyBwZXJtaXNzaW9uIG5vdGlj\nZSBzaGFsbCBiZSBpbmNsdWRlZCBpbiBhbGwKY29waWVzIG9yIHN1YnN0YW50\naWFsIHBvcnRpb25zIG9mIHRoZSBTb2Z0d2FyZS4KClRIRSBTT0ZUV0FSRSBJ\nUyBQUk9WSURFRCAiQVMgSVMiLCBXSVRIT1VUIFdBUlJBTlRZIE9GIEFOWSBL\nSU5ELCBFWFBSRVNTIE9SCklNUExJRUQsIElOQ0xVRElORyBCVVQgTk9UIExJ\nTUlURUQgVE8gVEhFIFdBUlJBTlRJRVMgT0YgTUVSQ0hBTlRBQklMSVRZLCBG\nSVRORVNTCkZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRSBBTkQgTk9OSU5GUklO\nR0VNRU5ULiBJTiBOTyBFVkVOVCBTSEFMTCBUSEUgQVVUSE9SUyBPUgpDT1BZ\nUklHSFQgSE9MREVSUyBCRSBMSUFCTEUgRk9SIEFOWSBDTEFJTSwgREFNQUdF\nUyBPUiBPVEhFUiBMSUFCSUxJVFksIFdIRVRIRVIKSU4gQU4gQUNUSU9OIE9G\nIENPTlRSQUNULCBUT1JUIE9SIE9USEVSV0lTRSwgQVJJU0lORyBGUk9NLCBP\nVVQgT0YgT1IgSU4KQ09OTkVDVElPTiBXSVRIIFRIRSBTT0ZUV0FSRSBPUiBU\nSEUgVVNFIE9SIE9USEVSIERFQUxJTkdTIElOIFRIRSBTT0ZUV0FSRS4K\n", + "encoding": "base64", + "_links": { + "self": "https://api.github.com/repos/benbalter/gman/contents/LICENSE?ref=master", + "git": "https://api.github.com/repos/benbalter/gman/git/blobs/401c59dcc4570b954dd6d345e76199e1f4e76266", + "html": "https://github.com/benbalter/gman/blob/master/LICENSE" + }, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZW1pdA==" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/license" + }, + { + "lang": "JS", + "source": "octokit.licenses.getForRepo({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.for_repo(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/merges": { + "post": { + "summary": "Perform a merge", + "description": "", + "operationId": "repos/merge", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/merging/#perform-a-merge" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "Successful Response (The resulting merge commit)", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sha": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "commit": { + "type": "object", + "properties": { + "author": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "date": { + "type": "string" + }, + "email": { + "type": "string" + } + } + }, + "committer": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "date": { + "type": "string" + }, + "email": { + "type": "string" + } + } + }, + "message": { + "type": "string" + }, + "tree": { + "type": "object", + "properties": { + "sha": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "url": { + "type": "string" + }, + "comment_count": { + "type": "number" + }, + "verification": { + "type": "object", + "properties": { + "verified": { + "type": "boolean" + }, + "reason": { + "type": "string" + }, + "signature": { + "type": "string" + }, + "payload": { + "type": "string" + } + } + } + } + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "author": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "committer": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "parents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "sha": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "required": [ + "sha", + "url" + ] + } + } + } + }, + "example": { + "sha": "7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "node_id": "MDY6Q29tbWl0N2ZkMWE2MGIwMWY5MWIzMTRmNTk5NTVhNGU0ZDRlODBkOGVkZjExZA==", + "commit": { + "author": { + "name": "The Octocat", + "date": "2012-03-06T15:06:50-08:00", + "email": "octocat@nowhere.com" + }, + "committer": { + "name": "The Octocat", + "date": "2012-03-06T15:06:50-08:00", + "email": "octocat@nowhere.com" + }, + "message": "Shipped cool_feature!", + "tree": { + "sha": "b4eecafa9be2f2006ce1b709d6857b07069b4608", + "url": "https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608" + }, + "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "comment_count": 0, + "verification": { + "verified": false, + "reason": "unsigned", + "signature": null, + "payload": null + } + }, + "url": "https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "html_url": "https://github.com/octocat/Hello-World/commit/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "comments_url": "https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d/comments", + "author": { + "login": "octocat", + "id": 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": [ + { + "sha": "553c2077f0edc3d5dc5d17262f6aa498e69d6f8e", + "url": "https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e" + }, + { + "sha": "762941318ee16e59dabbacb1b4049eec22f0d303", + "url": "https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303" + } + ] + } + } + } + }, + "404": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + }, + "examples": { + "missing-base-response": { + "summary": "Missing base response", + "value": { + "message": "Base does not exist" + } + }, + "missing-head-response": { + "summary": "Missing head response", + "value": { + "message": "Head does not exist" + } + } + } + } + } + }, + "409": { + "description": "Merge conflict response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + }, + "examples": { + "merge-conflict-response": { + "value": { + "message": "Merge Conflict" + } + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/merges \\\n -d '{\"base\":\"base\",\"head\":\"head\"}'" + }, + { + "lang": "JS", + "source": "octokit.repos.merge({\n owner: 'octocat',\n repo: 'hello-world',\n base: 'base',\n head: 'head'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.merge(\n 'hello-world',\n 'base',\n 'head'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "base": { + "type": "string", + "description": "The name of the base branch that the head will be merged into." + }, + "head": { + "type": "string", + "description": "The head to merge. This can be a branch name or a commit SHA1." + }, + "commit_message": { + "type": "string", + "description": "Commit message to use for the merge commit. If omitted, a default message will be used." + } + }, + "required": [ + "base", + "head" + ] + }, + "example": { + "base": "master", + "head": "cool_feature", + "commit_message": "Shipped cool_feature!" + } + } + } + } + } + }, + "/repos/{owner}/{repo}/milestones": { + "get": { + "summary": "List milestones for a repository", + "description": "", + "operationId": "issues/list-milestones-for-repo", + "tags": [ + "issues" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/issues/milestones/#list-milestones-for-a-repository" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "state", + "description": "The state of the milestone. Either `open`, `closed`, or `all`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "open", + "closed", + "all" + ], + "default": "open" + } + }, + { + "name": "sort", + "description": "What to sort results by. Either `due_on` or `completeness`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "due_on", + "completeness" + ], + "default": "due_on" + } + }, + { + "name": "direction", + "description": "The direction of the sort. Either `asc` or `desc`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "default": "asc" + } + }, + { + "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": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "open_issues": { + "type": "number" + }, + "closed_issues": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "closed_at": { + "type": "string" + }, + "due_on": { + "type": "string" + } + } + } + }, + "example": [ + { + "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1", + "html_url": "https://github.com/octocat/Hello-World/milestones/v1.0", + "labels_url": "https://api.github.com/repos/octocat/Hello-World/milestones/1/labels", + "id": 1002604, + "node_id": "MDk6TWlsZXN0b25lMTAwMjYwNA==", + "number": 1, + "state": "open", + "title": "v1.0", + "description": "Tracking milestone for version 1.0", + "creator": { + "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 + }, + "open_issues": 4, + "closed_issues": 8, + "created_at": "2011-04-10T20:09:31Z", + "updated_at": "2014-03-03T18:58:10Z", + "closed_at": "2013-02-12T13:22:01Z", + "due_on": "2012-10-09T23:39:01Z" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/milestones" + }, + { + "lang": "JS", + "source": "octokit.issues.listMilestonesForRepo({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.milestones_for_repo(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "post": { + "summary": "Create a milestone", + "description": "", + "operationId": "issues/create-milestone", + "tags": [ + "issues" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/issues/milestones/#create-a-milestone" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "open_issues": { + "type": "number" + }, + "closed_issues": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "closed_at": { + "type": "string" + }, + "due_on": { + "type": "string" + } + } + }, + "example": { + "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1", + "html_url": "https://github.com/octocat/Hello-World/milestones/v1.0", + "labels_url": "https://api.github.com/repos/octocat/Hello-World/milestones/1/labels", + "id": 1002604, + "node_id": "MDk6TWlsZXN0b25lMTAwMjYwNA==", + "number": 1, + "state": "open", + "title": "v1.0", + "description": "Tracking milestone for version 1.0", + "creator": { + "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 + }, + "open_issues": 4, + "closed_issues": 8, + "created_at": "2011-04-10T20:09:31Z", + "updated_at": "2014-03-03T18:58:10Z", + "closed_at": "2013-02-12T13:22:01Z", + "due_on": "2012-10-09T23:39:01Z" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/milestones \\\n -d '{\"title\":\"title\"}'" + }, + { + "lang": "JS", + "source": "octokit.issues.createMilestone({\n owner: 'octocat',\n repo: 'hello-world',\n title: 'title'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_milestone(\n 'hello-world',\n 'title'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "The title of the milestone." + }, + "state": { + "type": "string", + "description": "The state of the milestone. Either `open` or `closed`.", + "enum": [ + "open", + "closed" + ], + "default": "open" + }, + "description": { + "type": "string", + "description": "A description of the milestone." + }, + "due_on": { + "type": "string", + "description": "The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`." + } + }, + "required": [ + "title" + ] + }, + "example": { + "title": "v1.0", + "state": "open", + "description": "Tracking milestone for version 1.0", + "due_on": "2012-10-09T23:39:01Z" + } + } + } + } + } + }, + "/repos/{owner}/{repo}/milestones/{milestone_number}": { + "get": { + "summary": "Get a single milestone", + "description": "", + "operationId": "issues/get-milestone", + "tags": [ + "issues" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/issues/milestones/#get-a-single-milestone" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "milestone_number", + "description": "milestone_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "open_issues": { + "type": "number" + }, + "closed_issues": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "closed_at": { + "type": "string" + }, + "due_on": { + "type": "string" + } + } + }, + "example": { + "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1", + "html_url": "https://github.com/octocat/Hello-World/milestones/v1.0", + "labels_url": "https://api.github.com/repos/octocat/Hello-World/milestones/1/labels", + "id": 1002604, + "node_id": "MDk6TWlsZXN0b25lMTAwMjYwNA==", + "number": 1, + "state": "open", + "title": "v1.0", + "description": "Tracking milestone for version 1.0", + "creator": { + "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 + }, + "open_issues": 4, + "closed_issues": 8, + "created_at": "2011-04-10T20:09:31Z", + "updated_at": "2014-03-03T18:58:10Z", + "closed_at": "2013-02-12T13:22:01Z", + "due_on": "2012-10-09T23:39:01Z" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/milestones/42" + }, + { + "lang": "JS", + "source": "octokit.issues.getMilestone({\n owner: 'octocat',\n repo: 'hello-world',\n milestone_number: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.milestone(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"number\" parameter renamed to \"milestone_number\"", + "before": { + "name": "number" + }, + "after": { + "name": "milestone_number" + } + } + ] + }, + "patch": { + "summary": "Update a milestone", + "description": "", + "operationId": "issues/update-milestone", + "tags": [ + "issues" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/issues/milestones/#update-a-milestone" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "milestone_number", + "description": "milestone_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "open_issues": { + "type": "number" + }, + "closed_issues": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "closed_at": { + "type": "string" + }, + "due_on": { + "type": "string" + } + } + }, + "example": { + "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1", + "html_url": "https://github.com/octocat/Hello-World/milestones/v1.0", + "labels_url": "https://api.github.com/repos/octocat/Hello-World/milestones/1/labels", + "id": 1002604, + "node_id": "MDk6TWlsZXN0b25lMTAwMjYwNA==", + "number": 1, + "state": "open", + "title": "v1.0", + "description": "Tracking milestone for version 1.0", + "creator": { + "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 + }, + "open_issues": 4, + "closed_issues": 8, + "created_at": "2011-04-10T20:09:31Z", + "updated_at": "2014-03-03T18:58:10Z", + "closed_at": "2013-02-12T13:22:01Z", + "due_on": "2012-10-09T23:39:01Z" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/milestones/42 \\\n -d '{\"title\":\"title\"}'" + }, + { + "lang": "JS", + "source": "octokit.issues.updateMilestone({\n owner: 'octocat',\n repo: 'hello-world',\n milestone_number: 42,\n title: 'title'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.update_milestone(\n 'hello-world',\n 42,\n 'title'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"number\" parameter renamed to \"milestone_number\"", + "before": { + "name": "number" + }, + "after": { + "name": "milestone_number" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "The title of the milestone." + }, + "state": { + "type": "string", + "description": "The state of the milestone. Either `open` or `closed`.", + "enum": [ + "open", + "closed" + ], + "default": "open" + }, + "description": { + "type": "string", + "description": "A description of the milestone." + }, + "due_on": { + "type": "string", + "description": "The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`." + } + } + }, + "example": { + "title": "v1.0", + "state": "open", + "description": "Tracking milestone for version 1.0", + "due_on": "2012-10-09T23:39:01Z" + } + } + } + } + }, + "delete": { + "summary": "Delete a milestone", + "description": "", + "operationId": "issues/delete-milestone", + "tags": [ + "issues" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/issues/milestones/#delete-a-milestone" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "milestone_number", + "description": "milestone_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/milestones/42" + }, + { + "lang": "JS", + "source": "octokit.issues.deleteMilestone({\n owner: 'octocat',\n repo: 'hello-world',\n milestone_number: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_milestone(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"number\" parameter renamed to \"milestone_number\"", + "before": { + "name": "number" + }, + "after": { + "name": "milestone_number" + } + } + ] + } + }, + "/repos/{owner}/{repo}/milestones/{milestone_number}/labels": { + "get": { + "summary": "Get labels for every issue in a milestone", + "description": "", + "operationId": "issues/list-labels-for-milestone", + "tags": [ + "issues" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/issues/labels/#get-labels-for-every-issue-in-a-milestone" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "milestone_number", + "description": "milestone_number parameter", + "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": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "color": { + "type": "string" + }, + "default": { + "type": "boolean" + } + } + } + }, + "example": [ + { + "id": 208045946, + "node_id": "MDU6TGFiZWwyMDgwNDU5NDY=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", + "name": "bug", + "description": "Something isn't working", + "color": "f29513", + "default": true + }, + { + "id": 208045947, + "node_id": "MDU6TGFiZWwyMDgwNDU5NDc=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/enhancement", + "name": "enhancement", + "description": "New feature or request", + "color": "a2eeef", + "default": false + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/milestones/42/labels" + }, + { + "lang": "JS", + "source": "octokit.issues.listLabelsForMilestone({\n owner: 'octocat',\n repo: 'hello-world',\n milestone_number: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.labels_for_milestone(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"number\" parameter renamed to \"milestone_number\"", + "before": { + "name": "number" + }, + "after": { + "name": "milestone_number" + } + } + ] + } + }, + "/repos/{owner}/{repo}/notifications": { + "get": { + "summary": "List your notifications in a repository", + "description": "List all notifications for the current user.", + "operationId": "activity/list-notifications-for-repo", + "tags": [ + "activity" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/activity/notifications/#list-your-notifications-in-a-repository" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "all", + "description": "If `true`, show notifications marked as read.", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "participating", + "description": "If `true`, only shows notifications in which the user is directly participating or mentioned.", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + { + "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" + } + }, + { + "name": "before", + "description": "Only show notifications updated before 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" + } + }, + { + "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": { + "id": { + "type": "string" + }, + "repository": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + } + } + }, + "subject": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "url": { + "type": "string" + }, + "latest_comment_url": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "reason": { + "type": "string" + }, + "unread": { + "type": "boolean" + }, + "updated_at": { + "type": "string" + }, + "last_read_at": { + "type": "string" + }, + "url": { + "type": "string" + } + } + } + }, + "example": [ + { + "id": "1", + "repository": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}" + }, + "subject": { + "title": "Greetings", + "url": "https://api.github.com/repos/octokit/octokit.rb/issues/123", + "latest_comment_url": "https://api.github.com/repos/octokit/octokit.rb/issues/comments/123", + "type": "Issue" + }, + "reason": "subscribed", + "unread": true, + "updated_at": "2014-11-07T22:01:45Z", + "last_read_at": "2014-11-07T22:01:45Z", + "url": "https://api.github.com/notifications/threads/1" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/notifications" + }, + { + "lang": "JS", + "source": "octokit.activity.listNotificationsForRepo({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.notifications_for_repo(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "put": { + "summary": "Mark notifications as read in a repository", + "description": "Marks all notifications in a repository as \"read\" removes them from the [default view on GitHub](https://github.com/notifications). If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as \"read.\" To check whether any \"unread\" notifications remain, you can use the [List your notifications in a repository](https://developer.github.com/v3/activity/notifications/#list-your-notifications-in-a-repository) endpoint and pass the query parameter `all=false`.", + "operationId": "activity/mark-notifications-as-read-for-repo", + "tags": [ + "activity" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/activity/notifications/#mark-notifications-as-read-in-a-repository" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "205": { + "description": "response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\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\"}'" + }, + { + "lang": "JS", + "source": "octokit.activity.markNotificationsAsReadForRepo({\n owner: 'octocat',\n repo: 'hello-world',\n last_read_at: 'last_read_at'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.mark_notifications_as_read_for_repo(\n 'hello-world',\n 'last_read_at'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "last_read_at": { + "type": "string", + "description": "Describes the last point that notifications were checked. Anything updated since this time will not be updated. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp." + } + } + } + } + } + } + } + }, + "/repos/{owner}/{repo}/pages": { + "get": { + "summary": "Get information about a Pages site", + "description": "", + "operationId": "repos/get-pages", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/pages/#get-information-about-a-pages-site" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "status": { + "type": "string" + }, + "cname": { + "type": "string" + }, + "custom_404": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "source": { + "type": "object", + "properties": { + "branch": { + "type": "string" + }, + "directory": { + "type": "string" + } + } + } + } + }, + "example": { + "url": "https://api.github.com/repos/github/developer.github.com/pages", + "status": "built", + "cname": "developer.github.com", + "custom_404": false, + "html_url": "https://developer.github.com", + "source": { + "branch": "master", + "directory": "/" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pages" + }, + { + "lang": "JS", + "source": "octokit.repos.getPages({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.pages(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "post": { + "summary": "Enable a Pages site", + "description": "", + "operationId": "repos/enable-pages-site", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/pages/#enable-a-pages-site" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.switcheroo-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "status": { + "type": "string" + }, + "cname": { + "type": "string" + }, + "custom_404": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "source": { + "type": "object", + "properties": { + "branch": { + "type": "string" + }, + "directory": { + "type": "string" + } + } + } + } + }, + "example": { + "url": "https://api.github.com/repos/github/developer.github.com/pages", + "status": "built", + "cname": "developer.github.com", + "custom_404": false, + "html_url": "https://developer.github.com", + "source": { + "branch": "master", + "directory": "/" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\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\"}}'" + }, + { + "lang": "JS", + "source": "octokit.repos.enablePagesSite({\n owner: 'octocat',\n repo: 'hello-world',\n source: {\n branch: 'branch',\n path: 'path'\n }\n})" + }, + { + "lang": "Ruby", + "source": "octokit.enable_pages_site(\n 'hello-world',\n {\n branch: 'branch',\n path: 'path'\n }\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "switcheroo", + "note": "Enabling and disabling Pages in the Pages API is currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2019-03-14-enabling-disabling-pages/) preview for more details. To access the new endpoints during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.switcheroo-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "source": { + "type": "object", + "description": "source parameter", + "properties": { + "branch": { + "type": "string", + "description": "The repository branch used to publish your [site's source files](https://help.github.com/articles/configuring-a-publishing-source-for-github-pages/). Can be either `master` or `gh-pages`.", + "enum": [ + "master", + "gh-pages" + ] + }, + "path": { + "type": "string", + "description": "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 `/`." + } + } + } + } + }, + "example": { + "source": { + "branch": "master", + "path": "/docs" + } + } + } + } + } + }, + "delete": { + "summary": "Disable a Pages site", + "description": "", + "operationId": "repos/disable-pages-site", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/pages/#disable-a-pages-site" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.switcheroo-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.switcheroo-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/pages" + }, + { + "lang": "JS", + "source": "octokit.repos.disablePagesSite({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.disable_pages_site(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "switcheroo", + "note": "Enabling and disabling Pages in the Pages API is currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2019-03-14-enabling-disabling-pages/) preview for more details. To access the new endpoints during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.switcheroo-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + }, + "put": { + "summary": "Update information about a Pages site", + "description": "", + "operationId": "repos/update-information-about-pages-site", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/pages/#update-information-about-a-pages-site" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pages \\\n -d '{\"cname\":\"cname\"}'" + }, + { + "lang": "JS", + "source": "octokit.repos.updateInformationAboutPagesSite({\n owner: 'octocat',\n repo: 'hello-world',\n cname: 'cname'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.update_information_about_pages_site(\n 'hello-world',\n 'cname'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "cname": { + "type": "string", + "description": "Specify a custom domain for the repository. Sending a `null` value will remove the custom domain. For more about custom domains, see \"[Using a custom domain with GitHub Pages](https://help.github.com/articles/using-a-custom-domain-with-github-pages/).\"" + }, + "source": { + "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\"" + ] + } + } + }, + "example": { + "cname": "octocatblog.com", + "source": "master /docs" + } + } + } + } + } + }, + "/repos/{owner}/{repo}/pages/builds": { + "post": { + "summary": "Request a page build", + "description": "You 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.\n\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.", + "operationId": "repos/request-page-build", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/pages/#request-a-page-build" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + }, + "example": { + "url": "https://api.github.com/repos/github/developer.github.com/pages/builds/latest", + "status": "queued" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pages/builds" + }, + { + "lang": "JS", + "source": "octokit.repos.requestPageBuild({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.request_page_build(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "get": { + "summary": "List Pages builds", + "description": "", + "operationId": "repos/list-pages-builds", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/pages/#list-pages-builds" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "url": { + "type": "string" + }, + "status": { + "type": "string" + }, + "error": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + }, + "pusher": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "commit": { + "type": "string" + }, + "duration": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + } + }, + "example": [ + { + "url": "https://api.github.com/repos/github/developer.github.com/pages/builds/5472601", + "status": "built", + "error": { + "message": null + }, + "pusher": { + "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 + }, + "commit": "351391cdcb88ffae71ec3028c91f375a8036a26b", + "duration": 2104, + "created_at": "2014-02-10T19:00:49Z", + "updated_at": "2014-02-10T19:00:51Z" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pages/builds" + }, + { + "lang": "JS", + "source": "octokit.repos.listPagesBuilds({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.pages_builds(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/pages/builds/latest": { + "get": { + "summary": "Get latest Pages build", + "description": "", + "operationId": "repos/get-latest-pages-build", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/pages/#get-latest-pages-build" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "status": { + "type": "string" + }, + "error": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + }, + "pusher": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "commit": { + "type": "string" + }, + "duration": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + }, + "example": { + "url": "https://api.github.com/repos/github/developer.github.com/pages/builds/5472601", + "status": "built", + "error": { + "message": null + }, + "pusher": { + "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 + }, + "commit": "351391cdcb88ffae71ec3028c91f375a8036a26b", + "duration": 2104, + "created_at": "2014-02-10T19:00:49Z", + "updated_at": "2014-02-10T19:00:51Z" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pages/builds/latest" + }, + { + "lang": "JS", + "source": "octokit.repos.getLatestPagesBuild({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.latest_pages_build(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/pages/builds/{build_id}": { + "get": { + "summary": "Get a specific Pages build", + "description": "", + "operationId": "repos/get-pages-build", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/pages/#get-a-specific-pages-build" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "build_id", + "description": "build_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "status": { + "type": "string" + }, + "error": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + }, + "pusher": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "commit": { + "type": "string" + }, + "duration": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + }, + "example": { + "url": "https://api.github.com/repos/github/developer.github.com/pages/builds/5472601", + "status": "built", + "error": { + "message": null + }, + "pusher": { + "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 + }, + "commit": "351391cdcb88ffae71ec3028c91f375a8036a26b", + "duration": 2104, + "created_at": "2014-02-10T19:00:49Z", + "updated_at": "2014-02-10T19:00:51Z" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pages/builds/42" + }, + { + "lang": "JS", + "source": "octokit.repos.getPagesBuild({\n owner: 'octocat',\n repo: 'hello-world',\n build_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.pages_build(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/projects": { + "get": { + "summary": "List repository projects", + "description": "Lists 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.", + "operationId": "projects/list-for-repo", + "tags": [ + "projects" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/projects/#list-repository-projects" + }, + "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 + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "state", + "description": "Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "open", + "closed", + "all" + ], + "default": "open" + } + }, + { + "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": { + "owner_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "columns_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + } + }, + "example": [ + { + "owner_url": "https://api.github.com/repos/api-playground/projects-test", + "url": "https://api.github.com/projects/1002604", + "html_url": "https://github.com/api-playground/projects-test/projects/1", + "columns_url": "https://api.github.com/projects/1002604/columns", + "id": 1002604, + "node_id": "MDc6UHJvamVjdDEwMDI2MDQ=", + "name": "Projects Documentation", + "body": "Developer documentation project for the developer site.", + "number": 1, + "state": "open", + "creator": { + "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 + }, + "created_at": "2011-04-10T20:09:31Z", + "updated_at": "2014-03-03T18:58:10Z" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/projects" + }, + { + "lang": "JS", + "source": "octokit.projects.listForRepo({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.for_repo(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.inertia-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + }, + "post": { + "summary": "Create a repository project", + "description": "Creates 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.", + "operationId": "projects/create-for-repo", + "tags": [ + "projects" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/projects/#create-a-repository-project" + }, + "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 + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "owner_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "columns_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + }, + "example": { + "owner_url": "https://api.github.com/repos/api-playground/projects-test", + "url": "https://api.github.com/projects/1002604", + "html_url": "https://github.com/api-playground/projects-test/projects/1", + "columns_url": "https://api.github.com/projects/1002604/columns", + "id": 1002604, + "node_id": "MDc6UHJvamVjdDEwMDI2MDQ=", + "name": "Projects Documentation", + "body": "Developer documentation project for the developer site.", + "number": 1, + "state": "open", + "creator": { + "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 + }, + "created_at": "2011-04-10T20:09:31Z", + "updated_at": "2014-03-03T18:58:10Z" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/projects \\\n -d '{\"name\":\"name\"}'" + }, + { + "lang": "JS", + "source": "octokit.projects.createForRepo({\n owner: 'octocat',\n repo: 'hello-world',\n name: 'name'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_for_repo(\n 'hello-world',\n 'name'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.inertia-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the project." + }, + "body": { + "type": "string", + "description": "The description of the project." + } + }, + "required": [ + "name" + ] + }, + "example": { + "name": "Projects Documentation", + "body": "Developer documentation project for the developer site." + } + } + } + } + } + }, + "/repos/{owner}/{repo}/pulls": { + "get": { + "summary": "List pull requests", + "description": "Draft pull requests are available in public repositories with GitHub Free and GitHub Pro, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.", + "operationId": "pulls/list", + "tags": [ + "pulls" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/pulls/#list-pull-requests" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "state", + "description": "Either `open`, `closed`, or `all` to filter by state.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "open", + "closed", + "all" + ], + "default": "open" + } + }, + { + "name": "head", + "description": "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`.", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "base", + "description": "Filter pulls by base branch name. Example: `gh-pages`.", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sort", + "description": "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).", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "created", + "updated", + "popularity", + "long-running" + ], + "default": "created" + } + }, + { + "name": "direction", + "description": "The direction of the sort. Can be either `asc` or `desc`. Default: `desc` when sort is `created` or sort is not specified, otherwise `asc`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "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": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "diff_url": { + "type": "string" + }, + "patch_url": { + "type": "string" + }, + "issue_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "review_comments_url": { + "type": "string" + }, + "review_comment_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "locked": { + "type": "boolean" + }, + "title": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "body": { + "type": "string" + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "color": { + "type": "string" + }, + "default": { + "type": "boolean" + } + } + } + }, + "milestone": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "open_issues": { + "type": "number" + }, + "closed_issues": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "closed_at": { + "type": "string" + }, + "due_on": { + "type": "string" + } + } + }, + "active_lock_reason": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "closed_at": { + "type": "string" + }, + "merged_at": { + "type": "string" + }, + "merge_commit_sha": { + "type": "string" + }, + "assignee": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "assignees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + }, + "required": [ + "login", + "id", + "node_id", + "avatar_url", + "gravatar_id", + "url", + "html_url", + "followers_url", + "following_url", + "gists_url", + "starred_url", + "subscriptions_url", + "organizations_url", + "repos_url", + "events_url", + "received_events_url", + "type", + "site_admin" + ] + } + }, + "requested_reviewers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "requested_teams": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "privacy": { + "type": "string" + }, + "permission": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + }, + "parent": { + "type": "string" + } + } + } + }, + "head": { + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "ref": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "repo": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + } + } + }, + "base": { + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "ref": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "repo": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + } + } + }, + "_links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "html": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "issue": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "comments": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "review_comments": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "review_comment": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "commits": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "statuses": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + } + } + }, + "author_association": { + "type": "string" + }, + "draft": { + "type": "boolean" + } + } + } + }, + "example": [ + { + "url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347", + "id": 1, + "node_id": "MDExOlB1bGxSZXF1ZXN0MQ==", + "html_url": "https://github.com/octocat/Hello-World/pull/1347", + "diff_url": "https://github.com/octocat/Hello-World/pull/1347.diff", + "patch_url": "https://github.com/octocat/Hello-World/pull/1347.patch", + "issue_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", + "commits_url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits", + "review_comments_url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments", + "review_comment_url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}", + "comments_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/comments", + "statuses_url": "https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e", + "number": 1347, + "state": "open", + "locked": true, + "title": "Amazing new feature", + "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": "Please pull these awesome changes in!", + "labels": [ + { + "id": 208045946, + "node_id": "MDU6TGFiZWwyMDgwNDU5NDY=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", + "name": "bug", + "description": "Something isn't working", + "color": "f29513", + "default": true + } + ], + "milestone": { + "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1", + "html_url": "https://github.com/octocat/Hello-World/milestones/v1.0", + "labels_url": "https://api.github.com/repos/octocat/Hello-World/milestones/1/labels", + "id": 1002604, + "node_id": "MDk6TWlsZXN0b25lMTAwMjYwNA==", + "number": 1, + "state": "open", + "title": "v1.0", + "description": "Tracking milestone for version 1.0", + "creator": { + "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 + }, + "open_issues": 4, + "closed_issues": 8, + "created_at": "2011-04-10T20:09:31Z", + "updated_at": "2014-03-03T18:58:10Z", + "closed_at": "2013-02-12T13:22:01Z", + "due_on": "2012-10-09T23:39:01Z" + }, + "active_lock_reason": "too heated", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:01:12Z", + "closed_at": "2011-01-26T19:01:12Z", + "merged_at": "2011-01-26T19:01:12Z", + "merge_commit_sha": "e5bd3914e2e596debea16f433f57875b5b90bcd6", + "assignee": { + "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 + }, + "assignees": [ + { + "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 + }, + { + "login": "hubot", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/hubot_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/hubot", + "html_url": "https://github.com/hubot", + "followers_url": "https://api.github.com/users/hubot/followers", + "following_url": "https://api.github.com/users/hubot/following{/other_user}", + "gists_url": "https://api.github.com/users/hubot/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hubot/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hubot/subscriptions", + "organizations_url": "https://api.github.com/users/hubot/orgs", + "repos_url": "https://api.github.com/users/hubot/repos", + "events_url": "https://api.github.com/users/hubot/events{/privacy}", + "received_events_url": "https://api.github.com/users/hubot/received_events", + "type": "User", + "site_admin": true + } + ], + "requested_reviewers": [ + { + "login": "other_user", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/other_user_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/other_user", + "html_url": "https://github.com/other_user", + "followers_url": "https://api.github.com/users/other_user/followers", + "following_url": "https://api.github.com/users/other_user/following{/other_user}", + "gists_url": "https://api.github.com/users/other_user/gists{/gist_id}", + "starred_url": "https://api.github.com/users/other_user/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/other_user/subscriptions", + "organizations_url": "https://api.github.com/users/other_user/orgs", + "repos_url": "https://api.github.com/users/other_user/repos", + "events_url": "https://api.github.com/users/other_user/events{/privacy}", + "received_events_url": "https://api.github.com/users/other_user/received_events", + "type": "User", + "site_admin": false + } + ], + "requested_teams": [ + { + "id": 1, + "node_id": "MDQ6VGVhbTE=", + "url": "https://api.github.com/teams/1", + "html_url": "https://api.github.com/teams/justice-league", + "name": "Justice League", + "slug": "justice-league", + "description": "A great team.", + "privacy": "closed", + "permission": "admin", + "members_url": "https://api.github.com/teams/1/members{/member}", + "repositories_url": "https://api.github.com/teams/1/repos", + "parent": null + } + ], + "head": { + "label": "octocat:new-topic", + "ref": "new-topic", + "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e", + "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 + }, + "repo": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + }, + "base": { + "label": "octocat:master", + "ref": "master", + "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e", + "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 + }, + "repo": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + }, + "_links": { + "self": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/1347" + }, + "html": { + "href": "https://github.com/octocat/Hello-World/pull/1347" + }, + "issue": { + "href": "https://api.github.com/repos/octocat/Hello-World/issues/1347" + }, + "comments": { + "href": "https://api.github.com/repos/octocat/Hello-World/issues/1347/comments" + }, + "review_comments": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments" + }, + "review_comment": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}" + }, + "commits": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits" + }, + "statuses": { + "href": "https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e" + } + }, + "author_association": "OWNER", + "draft": false + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls" + }, + { + "lang": "JS", + "source": "octokit.pulls.list({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.list(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.shadow-cat-preview+json\n\n```", + "required": false + }, + { + "name": "sailor-v", + "note": "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](https://developer.github.com/changes/2018-01-10-lock-reason-api-preview) for full details. To access this feature, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.sailor-v-preview+json\n\n```", + "required": false + } + ] + }, + "x-changes": [] + }, + "post": { + "summary": "Create a pull request", + "description": "Draft pull requests are available in public repositories with GitHub Free and GitHub Pro, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nTo open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.\n\nYou can create a new pull request.\n\nThis endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See \"[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)\" and \"[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)\" for details.", + "operationId": "pulls/create", + "tags": [ + "pulls" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/pulls/#create-a-pull-request" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "diff_url": { + "type": "string" + }, + "patch_url": { + "type": "string" + }, + "issue_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "review_comments_url": { + "type": "string" + }, + "review_comment_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "locked": { + "type": "boolean" + }, + "title": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "body": { + "type": "string" + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "color": { + "type": "string" + }, + "default": { + "type": "boolean" + } + } + } + }, + "milestone": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "open_issues": { + "type": "number" + }, + "closed_issues": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "closed_at": { + "type": "string" + }, + "due_on": { + "type": "string" + } + } + }, + "active_lock_reason": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "closed_at": { + "type": "string" + }, + "merged_at": { + "type": "string" + }, + "merge_commit_sha": { + "type": "string" + }, + "assignee": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "assignees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + }, + "required": [ + "login", + "id", + "node_id", + "avatar_url", + "gravatar_id", + "url", + "html_url", + "followers_url", + "following_url", + "gists_url", + "starred_url", + "subscriptions_url", + "organizations_url", + "repos_url", + "events_url", + "received_events_url", + "type", + "site_admin" + ] + } + }, + "requested_reviewers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "requested_teams": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "privacy": { + "type": "string" + }, + "permission": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + }, + "parent": { + "type": "string" + } + } + } + }, + "head": { + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "ref": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "repo": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + } + } + }, + "base": { + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "ref": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "repo": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + } + } + }, + "_links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "html": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "issue": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "comments": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "review_comments": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "review_comment": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "commits": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "statuses": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + } + } + }, + "author_association": { + "type": "string" + }, + "draft": { + "type": "boolean" + }, + "merged": { + "type": "boolean" + }, + "mergeable": { + "type": "boolean" + }, + "rebaseable": { + "type": "boolean" + }, + "mergeable_state": { + "type": "string" + }, + "merged_by": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "comments": { + "type": "number" + }, + "review_comments": { + "type": "number" + }, + "maintainer_can_modify": { + "type": "boolean" + }, + "commits": { + "type": "number" + }, + "additions": { + "type": "number" + }, + "deletions": { + "type": "number" + }, + "changed_files": { + "type": "number" + } + } + }, + "example": { + "url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347", + "id": 1, + "node_id": "MDExOlB1bGxSZXF1ZXN0MQ==", + "html_url": "https://github.com/octocat/Hello-World/pull/1347", + "diff_url": "https://github.com/octocat/Hello-World/pull/1347.diff", + "patch_url": "https://github.com/octocat/Hello-World/pull/1347.patch", + "issue_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", + "commits_url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits", + "review_comments_url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments", + "review_comment_url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}", + "comments_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/comments", + "statuses_url": "https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e", + "number": 1347, + "state": "open", + "locked": true, + "title": "Amazing new feature", + "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": "Please pull these awesome changes in!", + "labels": [ + { + "id": 208045946, + "node_id": "MDU6TGFiZWwyMDgwNDU5NDY=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", + "name": "bug", + "description": "Something isn't working", + "color": "f29513", + "default": true + } + ], + "milestone": { + "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1", + "html_url": "https://github.com/octocat/Hello-World/milestones/v1.0", + "labels_url": "https://api.github.com/repos/octocat/Hello-World/milestones/1/labels", + "id": 1002604, + "node_id": "MDk6TWlsZXN0b25lMTAwMjYwNA==", + "number": 1, + "state": "open", + "title": "v1.0", + "description": "Tracking milestone for version 1.0", + "creator": { + "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 + }, + "open_issues": 4, + "closed_issues": 8, + "created_at": "2011-04-10T20:09:31Z", + "updated_at": "2014-03-03T18:58:10Z", + "closed_at": "2013-02-12T13:22:01Z", + "due_on": "2012-10-09T23:39:01Z" + }, + "active_lock_reason": "too heated", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:01:12Z", + "closed_at": "2011-01-26T19:01:12Z", + "merged_at": "2011-01-26T19:01:12Z", + "merge_commit_sha": "e5bd3914e2e596debea16f433f57875b5b90bcd6", + "assignee": { + "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 + }, + "assignees": [ + { + "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 + }, + { + "login": "hubot", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/hubot_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/hubot", + "html_url": "https://github.com/hubot", + "followers_url": "https://api.github.com/users/hubot/followers", + "following_url": "https://api.github.com/users/hubot/following{/other_user}", + "gists_url": "https://api.github.com/users/hubot/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hubot/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hubot/subscriptions", + "organizations_url": "https://api.github.com/users/hubot/orgs", + "repos_url": "https://api.github.com/users/hubot/repos", + "events_url": "https://api.github.com/users/hubot/events{/privacy}", + "received_events_url": "https://api.github.com/users/hubot/received_events", + "type": "User", + "site_admin": true + } + ], + "requested_reviewers": [ + { + "login": "other_user", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/other_user_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/other_user", + "html_url": "https://github.com/other_user", + "followers_url": "https://api.github.com/users/other_user/followers", + "following_url": "https://api.github.com/users/other_user/following{/other_user}", + "gists_url": "https://api.github.com/users/other_user/gists{/gist_id}", + "starred_url": "https://api.github.com/users/other_user/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/other_user/subscriptions", + "organizations_url": "https://api.github.com/users/other_user/orgs", + "repos_url": "https://api.github.com/users/other_user/repos", + "events_url": "https://api.github.com/users/other_user/events{/privacy}", + "received_events_url": "https://api.github.com/users/other_user/received_events", + "type": "User", + "site_admin": false + } + ], + "requested_teams": [ + { + "id": 1, + "node_id": "MDQ6VGVhbTE=", + "url": "https://api.github.com/teams/1", + "html_url": "https://api.github.com/teams/justice-league", + "name": "Justice League", + "slug": "justice-league", + "description": "A great team.", + "privacy": "closed", + "permission": "admin", + "members_url": "https://api.github.com/teams/1/members{/member}", + "repositories_url": "https://api.github.com/teams/1/repos", + "parent": null + } + ], + "head": { + "label": "octocat:new-topic", + "ref": "new-topic", + "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e", + "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 + }, + "repo": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + }, + "base": { + "label": "octocat:master", + "ref": "master", + "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e", + "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 + }, + "repo": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + }, + "_links": { + "self": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/1347" + }, + "html": { + "href": "https://github.com/octocat/Hello-World/pull/1347" + }, + "issue": { + "href": "https://api.github.com/repos/octocat/Hello-World/issues/1347" + }, + "comments": { + "href": "https://api.github.com/repos/octocat/Hello-World/issues/1347/comments" + }, + "review_comments": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments" + }, + "review_comment": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}" + }, + "commits": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits" + }, + "statuses": { + "href": "https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e" + } + }, + "author_association": "OWNER", + "draft": false, + "merged": false, + "mergeable": true, + "rebaseable": true, + "mergeable_state": "clean", + "merged_by": { + "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 + }, + "comments": 10, + "review_comments": 0, + "maintainer_can_modify": true, + "commits": 3, + "additions": 100, + "deletions": 3, + "changed_files": 5 + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls \\\n -d '{\"title\":\"title\",\"head\":\"head\",\"base\":\"base\"}'" + }, + { + "lang": "JS", + "source": "octokit.pulls.create({\n owner: 'octocat',\n repo: 'hello-world',\n title: 'title',\n head: 'head',\n base: 'base'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create(\n 'hello-world',\n 'title',\n 'head',\n 'base'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.shadow-cat-preview+json\n\n```", + "required": false + }, + { + "name": "sailor-v", + "note": "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](https://developer.github.com/changes/2018-01-10-lock-reason-api-preview) for full details. To access this feature, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.sailor-v-preview+json\n\n```", + "required": false + } + ], + "triggersNotification": true + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "The title of the new pull request." + }, + "head": { + "type": "string", + "description": "The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace `head` with a user like this: `username:branch`." + }, + "base": { + "type": "string", + "description": "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." + }, + "body": { + "type": "string", + "description": "The contents of the pull request." + }, + "maintainer_can_modify": { + "type": "boolean", + "description": "Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request." + }, + "draft": { + "type": "boolean", + "description": "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." + } + }, + "required": [ + "title", + "head", + "base" + ] + }, + "example": { + "title": "Amazing new feature", + "body": "Please pull these awesome changes in!", + "head": "octocat:new-feature", + "base": "master" + } + } + } + } + } + }, + "/repos/{owner}/{repo}/pulls/comments": { + "get": { + "summary": "List comments in a repository", + "description": "**Note:** Multi-line comments on pull requests are currently in public beta and subject to change.\n\nLists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID.\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://developer.github.com/v3/pulls/comments/#parameters-2) table.\n\nThe `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions.\n\n", + "operationId": "pulls/list-comments-for-repo", + "tags": [ + "pulls" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/pulls/comments/#list-comments-in-a-repository" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "sort", + "description": "Can be either `created` or `updated` comments.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "created", + "updated" + ], + "default": "created" + } + }, + { + "name": "direction", + "description": "Can be either `asc` or `desc`. Ignored without `sort` parameter.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + } + }, + { + "name": "since", + "description": "This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only returns comments `updated` at or after this time.", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "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": { + "url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "pull_request_review_id": { + "type": "number" + }, + "diff_hunk": { + "type": "string" + }, + "path": { + "type": "string" + }, + "position": { + "type": "number" + }, + "original_position": { + "type": "number" + }, + "commit_id": { + "type": "string" + }, + "original_commit_id": { + "type": "string" + }, + "in_reply_to_id": { + "type": "number" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "body": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "pull_request_url": { + "type": "string" + }, + "author_association": { + "type": "string" + }, + "_links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "html": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "pull_request": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + } + } + }, + "start_line": { + "type": "number" + }, + "original_start_line": { + "type": "number" + }, + "start_side": { + "type": "string" + }, + "line": { + "type": "number" + }, + "original_line": { + "type": "number" + }, + "side": { + "type": "string" + } + } + } + }, + "example": [ + { + "url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1", + "id": 10, + "node_id": "MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw", + "pull_request_review_id": 42, + "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" + } + }, + "start_line": 1, + "original_start_line": 1, + "start_side": "RIGHT", + "line": 2, + "original_line": 2, + "side": "RIGHT" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/comments" + }, + { + "lang": "JS", + "source": "octokit.pulls.listCommentsForRepo({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.comments_for_repo(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.comfort-fade-preview+json\n\n```", + "required": false + }, + { + "name": "squirrel-girl", + "note": "An additional `reactions` object in the review 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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.squirrel-girl-preview\n\n```", + "required": false + } + ] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/pulls/comments/{comment_id}": { + "get": { + "summary": "Get a single comment", + "description": "**Note:** Multi-line comments on pull requests are currently in public beta and subject to change.\n\nProvides details for 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://developer.github.com/v3/pulls/comments/#parameters-2) table.\n\nThe `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions.\n\n", + "operationId": "pulls/get-comment", + "tags": [ + "pulls" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/pulls/comments/#get-a-single-comment" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "comment_id", + "description": "comment_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "pull_request_review_id": { + "type": "number" + }, + "diff_hunk": { + "type": "string" + }, + "path": { + "type": "string" + }, + "position": { + "type": "number" + }, + "original_position": { + "type": "number" + }, + "commit_id": { + "type": "string" + }, + "original_commit_id": { + "type": "string" + }, + "in_reply_to_id": { + "type": "number" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "body": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "pull_request_url": { + "type": "string" + }, + "author_association": { + "type": "string" + }, + "_links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "html": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "pull_request": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + } + } + }, + "start_line": { + "type": "number" + }, + "original_start_line": { + "type": "number" + }, + "start_side": { + "type": "string" + }, + "line": { + "type": "number" + }, + "original_line": { + "type": "number" + }, + "side": { + "type": "string" + } + } + }, + "example": { + "url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1", + "id": 10, + "node_id": "MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw", + "pull_request_review_id": 42, + "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" + } + }, + "start_line": 1, + "original_start_line": 1, + "start_side": "RIGHT", + "line": 2, + "original_line": 2, + "side": "RIGHT" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/comments/42" + }, + { + "lang": "JS", + "source": "octokit.pulls.getComment({\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.comment(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.comfort-fade-preview+json\n\n```", + "required": false + }, + { + "name": "squirrel-girl", + "note": "An additional `reactions` object in the review 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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.squirrel-girl-preview\n\n```", + "required": false + } + ] + }, + "x-changes": [] + }, + "patch": { + "summary": "Edit a comment", + "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://developer.github.com/v3/pulls/comments/#parameters-2) table.", + "operationId": "pulls/update-comment", + "tags": [ + "pulls" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/pulls/comments/#edit-a-comment" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "comment_id", + "description": "comment_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "pull_request_review_id": { + "type": "number" + }, + "diff_hunk": { + "type": "string" + }, + "path": { + "type": "string" + }, + "position": { + "type": "number" + }, + "original_position": { + "type": "number" + }, + "commit_id": { + "type": "string" + }, + "original_commit_id": { + "type": "string" + }, + "in_reply_to_id": { + "type": "number" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "body": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "pull_request_url": { + "type": "string" + }, + "author_association": { + "type": "string" + }, + "_links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "html": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "pull_request": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + } + } + }, + "start_line": { + "type": "number" + }, + "original_start_line": { + "type": "number" + }, + "start_side": { + "type": "string" + }, + "line": { + "type": "number" + }, + "original_line": { + "type": "number" + }, + "side": { + "type": "string" + } + } + }, + "example": { + "url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1", + "id": 10, + "node_id": "MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw", + "pull_request_review_id": 42, + "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" + } + }, + "start_line": 1, + "original_start_line": 1, + "start_side": "RIGHT", + "line": 2, + "original_line": 2, + "side": "RIGHT" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/comments/42 \\\n -d '{\"body\":\"body\"}'" + }, + { + "lang": "JS", + "source": "octokit.pulls.updateComment({\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42,\n body: 'body'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.update_comment(\n 'hello-world',\n 42,\n 'body'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.comfort-fade-preview+json\n\n```", + "required": false + } + ] + }, + "x-changes": [], + "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!" + } + } + } + } + }, + "delete": { + "summary": "Delete a comment", + "description": "Deletes a review comment.", + "operationId": "pulls/delete-comment", + "tags": [ + "pulls" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/pulls/comments/#delete-a-comment" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "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" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/comments/42" + }, + { + "lang": "JS", + "source": "octokit.pulls.deleteComment({\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_comment(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/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://developer.github.com/v3/pulls/comments/).", + "operationId": "reactions/list-for-pull-request-review-comment", + "tags": [ + "reactions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.squirrel-girl-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "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://developer.github.com/v3/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": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "content": { + "type": "string" + }, + "created_at": { + "type": "string" + } + } + } + }, + "example": [ + { + "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" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "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" + }, + { + "lang": "JS", + "source": "octokit.reactions.listForPullRequestReviewComment({\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.for_pull_request_review_comment(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "APIs for managing reactions are currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\n application/vnd.github.squirrel-girl-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + }, + "post": { + "summary": "Create reaction for a pull request review comment", + "description": "Create a reaction to a [pull request review comment](https://developer.github.com/v3/pulls/comments/). A response with a `Status: 200 OK` means that you already added the reaction type to this pull request review comment.", + "operationId": "reactions/create-for-pull-request-review-comment", + "tags": [ + "reactions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/reactions/#create-reaction-for-a-pull-request-review-comment" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.squirrel-girl-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "comment_id", + "description": "comment_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "content": { + "type": "string" + }, + "created_at": { + "type": "string" + } + } + }, + "example": { + "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" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\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\"}'" + }, + { + "lang": "JS", + "source": "octokit.reactions.createForPullRequestReviewComment({\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42,\n content: 'content'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_for_pull_request_review_comment(\n 'hello-world',\n 42,\n 'content'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "APIs for managing reactions are currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\n application/vnd.github.squirrel-girl-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the pull request review comment.", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ] + } + }, + "required": [ + "content" + ] + }, + "example": { + "content": "heart" + } + } + } + } + } + }, + "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}": { + "delete": { + "summary": "Delete a pull request comment reaction", + "description": "**Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.`\n\nDelete a reaction to a [pull request review comment](https://developer.github.com/v3/pulls/comments/).", + "operationId": "reactions/delete-for-pull-request-comment", + "tags": [ + "reactions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/reactions/#delete-a-pull-request-comment-reaction" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.squirrel-girl-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "comment_id", + "description": "comment_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "reaction_id", + "description": "reaction_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/comments/42/reactions/42" + }, + { + "lang": "JS", + "source": "octokit.reactions.deleteForPullRequestComment({\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42,\n reaction_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_for_pull_request_comment(\n 'hello-world',\n 42,\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "APIs for managing reactions are currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\n application/vnd.github.squirrel-girl-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/pulls/{pull_number}": { + "get": { + "summary": "Get a single pull request", + "description": "Draft pull requests are available in public repositories with GitHub Free and GitHub Pro, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nLists details of a pull request by providing its number.\n\nWhen you get, [create](https://developer.github.com/v3/pulls/#create-a-pull-request), or [edit](https://developer.github.com/v3/pulls/#update-a-pull-request) a pull request, GitHub creates a merge commit to test whether the pull request can be automatically merged into the base branch. This test commit is not added to the base branch or the head branch. You can review the status of the test commit using the `mergeable` key. For more information, see \"[Checking mergeability of pull requests](https://developer.github.com/v3/git/#checking-mergeability-of-pull-requests)\".\n\nThe value of the `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub 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.\n\nThe 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:\n\n* If merged as a [merge commit](https://help.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit.\n* If merged via a [squash](https://help.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch.\n* If [rebased](https://help.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to.\n\nPass the appropriate [media type](https://developer.github.com/v3/media/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats.", + "operationId": "pulls/get", + "tags": [ + "pulls" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/pulls/#get-a-single-pull-request" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "pull_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Pass the appropriate [media type](https://developer.github.com/v3/media/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "diff_url": { + "type": "string" + }, + "patch_url": { + "type": "string" + }, + "issue_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "review_comments_url": { + "type": "string" + }, + "review_comment_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "locked": { + "type": "boolean" + }, + "title": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "body": { + "type": "string" + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "color": { + "type": "string" + }, + "default": { + "type": "boolean" + } + } + } + }, + "milestone": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "open_issues": { + "type": "number" + }, + "closed_issues": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "closed_at": { + "type": "string" + }, + "due_on": { + "type": "string" + } + } + }, + "active_lock_reason": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "closed_at": { + "type": "string" + }, + "merged_at": { + "type": "string" + }, + "merge_commit_sha": { + "type": "string" + }, + "assignee": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "assignees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + }, + "required": [ + "login", + "id", + "node_id", + "avatar_url", + "gravatar_id", + "url", + "html_url", + "followers_url", + "following_url", + "gists_url", + "starred_url", + "subscriptions_url", + "organizations_url", + "repos_url", + "events_url", + "received_events_url", + "type", + "site_admin" + ] + } + }, + "requested_reviewers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "requested_teams": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "privacy": { + "type": "string" + }, + "permission": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + }, + "parent": { + "type": "string" + } + } + } + }, + "head": { + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "ref": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "repo": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + } + } + }, + "base": { + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "ref": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "repo": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + } + } + }, + "_links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "html": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "issue": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "comments": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "review_comments": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "review_comment": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "commits": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "statuses": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + } + } + }, + "author_association": { + "type": "string" + }, + "draft": { + "type": "boolean" + }, + "merged": { + "type": "boolean" + }, + "mergeable": { + "type": "boolean" + }, + "rebaseable": { + "type": "boolean" + }, + "mergeable_state": { + "type": "string" + }, + "merged_by": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "comments": { + "type": "number" + }, + "review_comments": { + "type": "number" + }, + "maintainer_can_modify": { + "type": "boolean" + }, + "commits": { + "type": "number" + }, + "additions": { + "type": "number" + }, + "deletions": { + "type": "number" + }, + "changed_files": { + "type": "number" + } + } + }, + "example": { + "url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347", + "id": 1, + "node_id": "MDExOlB1bGxSZXF1ZXN0MQ==", + "html_url": "https://github.com/octocat/Hello-World/pull/1347", + "diff_url": "https://github.com/octocat/Hello-World/pull/1347.diff", + "patch_url": "https://github.com/octocat/Hello-World/pull/1347.patch", + "issue_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", + "commits_url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits", + "review_comments_url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments", + "review_comment_url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}", + "comments_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/comments", + "statuses_url": "https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e", + "number": 1347, + "state": "open", + "locked": true, + "title": "Amazing new feature", + "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": "Please pull these awesome changes in!", + "labels": [ + { + "id": 208045946, + "node_id": "MDU6TGFiZWwyMDgwNDU5NDY=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", + "name": "bug", + "description": "Something isn't working", + "color": "f29513", + "default": true + } + ], + "milestone": { + "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1", + "html_url": "https://github.com/octocat/Hello-World/milestones/v1.0", + "labels_url": "https://api.github.com/repos/octocat/Hello-World/milestones/1/labels", + "id": 1002604, + "node_id": "MDk6TWlsZXN0b25lMTAwMjYwNA==", + "number": 1, + "state": "open", + "title": "v1.0", + "description": "Tracking milestone for version 1.0", + "creator": { + "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 + }, + "open_issues": 4, + "closed_issues": 8, + "created_at": "2011-04-10T20:09:31Z", + "updated_at": "2014-03-03T18:58:10Z", + "closed_at": "2013-02-12T13:22:01Z", + "due_on": "2012-10-09T23:39:01Z" + }, + "active_lock_reason": "too heated", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:01:12Z", + "closed_at": "2011-01-26T19:01:12Z", + "merged_at": "2011-01-26T19:01:12Z", + "merge_commit_sha": "e5bd3914e2e596debea16f433f57875b5b90bcd6", + "assignee": { + "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 + }, + "assignees": [ + { + "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 + }, + { + "login": "hubot", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/hubot_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/hubot", + "html_url": "https://github.com/hubot", + "followers_url": "https://api.github.com/users/hubot/followers", + "following_url": "https://api.github.com/users/hubot/following{/other_user}", + "gists_url": "https://api.github.com/users/hubot/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hubot/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hubot/subscriptions", + "organizations_url": "https://api.github.com/users/hubot/orgs", + "repos_url": "https://api.github.com/users/hubot/repos", + "events_url": "https://api.github.com/users/hubot/events{/privacy}", + "received_events_url": "https://api.github.com/users/hubot/received_events", + "type": "User", + "site_admin": true + } + ], + "requested_reviewers": [ + { + "login": "other_user", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/other_user_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/other_user", + "html_url": "https://github.com/other_user", + "followers_url": "https://api.github.com/users/other_user/followers", + "following_url": "https://api.github.com/users/other_user/following{/other_user}", + "gists_url": "https://api.github.com/users/other_user/gists{/gist_id}", + "starred_url": "https://api.github.com/users/other_user/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/other_user/subscriptions", + "organizations_url": "https://api.github.com/users/other_user/orgs", + "repos_url": "https://api.github.com/users/other_user/repos", + "events_url": "https://api.github.com/users/other_user/events{/privacy}", + "received_events_url": "https://api.github.com/users/other_user/received_events", + "type": "User", + "site_admin": false + } + ], + "requested_teams": [ + { + "id": 1, + "node_id": "MDQ6VGVhbTE=", + "url": "https://api.github.com/teams/1", + "html_url": "https://api.github.com/teams/justice-league", + "name": "Justice League", + "slug": "justice-league", + "description": "A great team.", + "privacy": "closed", + "permission": "admin", + "members_url": "https://api.github.com/teams/1/members{/member}", + "repositories_url": "https://api.github.com/teams/1/repos", + "parent": null + } + ], + "head": { + "label": "octocat:new-topic", + "ref": "new-topic", + "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e", + "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 + }, + "repo": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + }, + "base": { + "label": "octocat:master", + "ref": "master", + "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e", + "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 + }, + "repo": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + }, + "_links": { + "self": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/1347" + }, + "html": { + "href": "https://github.com/octocat/Hello-World/pull/1347" + }, + "issue": { + "href": "https://api.github.com/repos/octocat/Hello-World/issues/1347" + }, + "comments": { + "href": "https://api.github.com/repos/octocat/Hello-World/issues/1347/comments" + }, + "review_comments": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments" + }, + "review_comment": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}" + }, + "commits": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits" + }, + "statuses": { + "href": "https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e" + } + }, + "author_association": "OWNER", + "draft": false, + "merged": false, + "mergeable": true, + "rebaseable": true, + "mergeable_state": "clean", + "merged_by": { + "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 + }, + "comments": 10, + "review_comments": 0, + "maintainer_can_modify": true, + "commits": 3, + "additions": 100, + "deletions": 3, + "changed_files": 5 + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42" + }, + { + "lang": "JS", + "source": "octokit.pulls.get({\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.get(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.shadow-cat-preview+json\n\n```", + "required": false + }, + { + "name": "sailor-v", + "note": "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](https://developer.github.com/changes/2018-01-10-lock-reason-api-preview) for full details. To access this feature, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.sailor-v-preview+json\n\n```", + "required": false + } + ] + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"number\" parameter renamed to \"pull_number\"", + "before": { + "name": "number" + }, + "after": { + "name": "pull_number" + } + } + ] + }, + "patch": { + "summary": "Update a pull request", + "description": "Draft pull requests are available in public repositories with GitHub Free and GitHub Pro, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nTo open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.", + "operationId": "pulls/update", + "tags": [ + "pulls" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/pulls/#update-a-pull-request" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "pull_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "diff_url": { + "type": "string" + }, + "patch_url": { + "type": "string" + }, + "issue_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "review_comments_url": { + "type": "string" + }, + "review_comment_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "locked": { + "type": "boolean" + }, + "title": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "body": { + "type": "string" + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "color": { + "type": "string" + }, + "default": { + "type": "boolean" + } + } + } + }, + "milestone": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "open_issues": { + "type": "number" + }, + "closed_issues": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "closed_at": { + "type": "string" + }, + "due_on": { + "type": "string" + } + } + }, + "active_lock_reason": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "closed_at": { + "type": "string" + }, + "merged_at": { + "type": "string" + }, + "merge_commit_sha": { + "type": "string" + }, + "assignee": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "assignees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + }, + "required": [ + "login", + "id", + "node_id", + "avatar_url", + "gravatar_id", + "url", + "html_url", + "followers_url", + "following_url", + "gists_url", + "starred_url", + "subscriptions_url", + "organizations_url", + "repos_url", + "events_url", + "received_events_url", + "type", + "site_admin" + ] + } + }, + "requested_reviewers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "requested_teams": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "privacy": { + "type": "string" + }, + "permission": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + }, + "parent": { + "type": "string" + } + } + } + }, + "head": { + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "ref": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "repo": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + } + } + }, + "base": { + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "ref": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "repo": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + } + } + }, + "_links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "html": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "issue": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "comments": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "review_comments": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "review_comment": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "commits": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "statuses": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + } + } + }, + "author_association": { + "type": "string" + }, + "draft": { + "type": "boolean" + }, + "merged": { + "type": "boolean" + }, + "mergeable": { + "type": "boolean" + }, + "rebaseable": { + "type": "boolean" + }, + "mergeable_state": { + "type": "string" + }, + "merged_by": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "comments": { + "type": "number" + }, + "review_comments": { + "type": "number" + }, + "maintainer_can_modify": { + "type": "boolean" + }, + "commits": { + "type": "number" + }, + "additions": { + "type": "number" + }, + "deletions": { + "type": "number" + }, + "changed_files": { + "type": "number" + } + } + }, + "example": { + "url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347", + "id": 1, + "node_id": "MDExOlB1bGxSZXF1ZXN0MQ==", + "html_url": "https://github.com/octocat/Hello-World/pull/1347", + "diff_url": "https://github.com/octocat/Hello-World/pull/1347.diff", + "patch_url": "https://github.com/octocat/Hello-World/pull/1347.patch", + "issue_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", + "commits_url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits", + "review_comments_url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments", + "review_comment_url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}", + "comments_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/comments", + "statuses_url": "https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e", + "number": 1347, + "state": "open", + "locked": true, + "title": "Amazing new feature", + "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": "Please pull these awesome changes in!", + "labels": [ + { + "id": 208045946, + "node_id": "MDU6TGFiZWwyMDgwNDU5NDY=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", + "name": "bug", + "description": "Something isn't working", + "color": "f29513", + "default": true + } + ], + "milestone": { + "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1", + "html_url": "https://github.com/octocat/Hello-World/milestones/v1.0", + "labels_url": "https://api.github.com/repos/octocat/Hello-World/milestones/1/labels", + "id": 1002604, + "node_id": "MDk6TWlsZXN0b25lMTAwMjYwNA==", + "number": 1, + "state": "open", + "title": "v1.0", + "description": "Tracking milestone for version 1.0", + "creator": { + "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 + }, + "open_issues": 4, + "closed_issues": 8, + "created_at": "2011-04-10T20:09:31Z", + "updated_at": "2014-03-03T18:58:10Z", + "closed_at": "2013-02-12T13:22:01Z", + "due_on": "2012-10-09T23:39:01Z" + }, + "active_lock_reason": "too heated", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:01:12Z", + "closed_at": "2011-01-26T19:01:12Z", + "merged_at": "2011-01-26T19:01:12Z", + "merge_commit_sha": "e5bd3914e2e596debea16f433f57875b5b90bcd6", + "assignee": { + "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 + }, + "assignees": [ + { + "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 + }, + { + "login": "hubot", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/hubot_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/hubot", + "html_url": "https://github.com/hubot", + "followers_url": "https://api.github.com/users/hubot/followers", + "following_url": "https://api.github.com/users/hubot/following{/other_user}", + "gists_url": "https://api.github.com/users/hubot/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hubot/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hubot/subscriptions", + "organizations_url": "https://api.github.com/users/hubot/orgs", + "repos_url": "https://api.github.com/users/hubot/repos", + "events_url": "https://api.github.com/users/hubot/events{/privacy}", + "received_events_url": "https://api.github.com/users/hubot/received_events", + "type": "User", + "site_admin": true + } + ], + "requested_reviewers": [ + { + "login": "other_user", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/other_user_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/other_user", + "html_url": "https://github.com/other_user", + "followers_url": "https://api.github.com/users/other_user/followers", + "following_url": "https://api.github.com/users/other_user/following{/other_user}", + "gists_url": "https://api.github.com/users/other_user/gists{/gist_id}", + "starred_url": "https://api.github.com/users/other_user/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/other_user/subscriptions", + "organizations_url": "https://api.github.com/users/other_user/orgs", + "repos_url": "https://api.github.com/users/other_user/repos", + "events_url": "https://api.github.com/users/other_user/events{/privacy}", + "received_events_url": "https://api.github.com/users/other_user/received_events", + "type": "User", + "site_admin": false + } + ], + "requested_teams": [ + { + "id": 1, + "node_id": "MDQ6VGVhbTE=", + "url": "https://api.github.com/teams/1", + "html_url": "https://api.github.com/teams/justice-league", + "name": "Justice League", + "slug": "justice-league", + "description": "A great team.", + "privacy": "closed", + "permission": "admin", + "members_url": "https://api.github.com/teams/1/members{/member}", + "repositories_url": "https://api.github.com/teams/1/repos", + "parent": null + } + ], + "head": { + "label": "octocat:new-topic", + "ref": "new-topic", + "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e", + "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 + }, + "repo": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + }, + "base": { + "label": "octocat:master", + "ref": "master", + "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e", + "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 + }, + "repo": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + }, + "_links": { + "self": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/1347" + }, + "html": { + "href": "https://github.com/octocat/Hello-World/pull/1347" + }, + "issue": { + "href": "https://api.github.com/repos/octocat/Hello-World/issues/1347" + }, + "comments": { + "href": "https://api.github.com/repos/octocat/Hello-World/issues/1347/comments" + }, + "review_comments": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments" + }, + "review_comment": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}" + }, + "commits": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits" + }, + "statuses": { + "href": "https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e" + } + }, + "author_association": "OWNER", + "draft": false, + "merged": false, + "mergeable": true, + "rebaseable": true, + "mergeable_state": "clean", + "merged_by": { + "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 + }, + "comments": 10, + "review_comments": 0, + "maintainer_can_modify": true, + "commits": 3, + "additions": 100, + "deletions": 3, + "changed_files": 5 + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42 \\\n -d '{\"title\":\"title\"}'" + }, + { + "lang": "JS", + "source": "octokit.pulls.update({\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n title: 'title'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.update(\n 'hello-world',\n 42,\n 'title'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.shadow-cat-preview+json\n\n```", + "required": false + }, + { + "name": "sailor-v", + "note": "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](https://developer.github.com/changes/2018-01-10-lock-reason-api-preview) for full details. To access this feature, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.sailor-v-preview+json\n\n```", + "required": false + } + ] + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"number\" parameter renamed to \"pull_number\"", + "before": { + "name": "number" + }, + "after": { + "name": "pull_number" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "The title of the pull request." + }, + "body": { + "type": "string", + "description": "The contents of the pull request." + }, + "state": { + "type": "string", + "description": "State of this Pull Request. Either `open` or `closed`.", + "enum": [ + "open", + "closed" + ] + }, + "base": { + "type": "string", + "description": "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." + }, + "maintainer_can_modify": { + "type": "boolean", + "description": "Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request." + } + } + }, + "example": { + "title": "new title", + "body": "updated body", + "state": "open", + "base": "master" + } + } + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{pull_number}/comments": { + "get": { + "summary": "List comments on a pull request", + "description": "**Note:** Multi-line comments on pull requests are currently in public beta and subject to change.\n\nLists review comments for a pull request. By default, review comments are in ascending order by ID.\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://developer.github.com/v3/pulls/comments/#parameters-2) table.\n\nThe `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions.\n\n", + "operationId": "pulls/list-comments", + "tags": [ + "pulls" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/pulls/comments/#list-comments-on-a-pull-request" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "pull_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "sort", + "description": "Can be either `created` or `updated` comments.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "created", + "updated" + ], + "default": "created" + } + }, + { + "name": "direction", + "description": "Can be either `asc` or `desc`. Ignored without `sort` parameter.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + } + }, + { + "name": "since", + "description": "This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only returns comments `updated` at or after this time.", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "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": { + "url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "pull_request_review_id": { + "type": "number" + }, + "diff_hunk": { + "type": "string" + }, + "path": { + "type": "string" + }, + "position": { + "type": "number" + }, + "original_position": { + "type": "number" + }, + "commit_id": { + "type": "string" + }, + "original_commit_id": { + "type": "string" + }, + "in_reply_to_id": { + "type": "number" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "body": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "pull_request_url": { + "type": "string" + }, + "author_association": { + "type": "string" + }, + "_links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "html": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "pull_request": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + } + } + }, + "start_line": { + "type": "number" + }, + "original_start_line": { + "type": "number" + }, + "start_side": { + "type": "string" + }, + "line": { + "type": "number" + }, + "original_line": { + "type": "number" + }, + "side": { + "type": "string" + } + } + } + }, + "example": [ + { + "url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1", + "id": 10, + "node_id": "MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw", + "pull_request_review_id": 42, + "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" + } + }, + "start_line": 1, + "original_start_line": 1, + "start_side": "RIGHT", + "line": 2, + "original_line": 2, + "side": "RIGHT" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/comments" + }, + { + "lang": "JS", + "source": "octokit.pulls.listComments({\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.comments(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.comfort-fade-preview+json\n\n```", + "required": false + }, + { + "name": "squirrel-girl", + "note": "An additional `reactions` object in the review 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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.squirrel-girl-preview\n\n```", + "required": false + } + ] + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"number\" parameter renamed to \"pull_number\"", + "before": { + "name": "number" + }, + "after": { + "name": "pull_number" + } + } + ] + }, + "post": { + "summary": "Create a comment", + "description": "**Note:** Multi-line comments on pull requests are currently in public beta and subject to change.\n\nCreates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see \"[Comments](https://developer.github.com/v3/issues/comments/#create-a-comment).\" We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff.\n\nYou can still create a review comment using the `position` parameter. When you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. For more information, see [Multi-line comment summary](https://developer.github.com/v3/pulls/comments/#multi-line-comment-summary-3).\n\n**Note:** 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\nThis endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See \"[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)\" and \"[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)\" for details.\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://developer.github.com/v3/pulls/comments/#parameters-2) table.", + "operationId": "pulls/create-comment", + "tags": [ + "pulls" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/pulls/comments/#create-a-comment" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "pull_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "pull_request_review_id": { + "type": "number" + }, + "diff_hunk": { + "type": "string" + }, + "path": { + "type": "string" + }, + "position": { + "type": "number" + }, + "original_position": { + "type": "number" + }, + "commit_id": { + "type": "string" + }, + "original_commit_id": { + "type": "string" + }, + "in_reply_to_id": { + "type": "number" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "body": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "pull_request_url": { + "type": "string" + }, + "author_association": { + "type": "string" + }, + "_links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "html": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "pull_request": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + } + } + }, + "start_line": { + "type": "number" + }, + "original_start_line": { + "type": "number" + }, + "start_side": { + "type": "string" + }, + "line": { + "type": "number" + }, + "original_line": { + "type": "number" + }, + "side": { + "type": "string" + } + } + }, + "examples": { + "example-for-a-single-line-comment": { + "value": { + "url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1", + "id": 10, + "node_id": "MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw", + "pull_request_review_id": 42, + "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" + } + }, + "start_line": 1, + "original_start_line": 1, + "start_side": "RIGHT", + "line": 2, + "original_line": 2, + "side": "RIGHT" + } + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/comments \\\n -d '{\"body\":\"body\",\"commit_id\":\"commit_id\",\"path\":\"path\"}'" + }, + { + "lang": "JS", + "source": "octokit.pulls.createComment({\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n body: 'body',\n commit_id: 'commit_id',\n path: 'path'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_comment(\n 'hello-world',\n 42,\n 'body',\n 'commit_id',\n 'path'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.comfort-fade-preview+json\n\n```", + "required": false + } + ], + "triggersNotification": true + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"number\" parameter renamed to \"pull_number\"", + "before": { + "name": "number" + }, + "after": { + "name": "pull_number" + } + }, + { + "type": "operation", + "date": "2019-09-09", + "note": "\"Create a comment reply\" is now \"Create a comment\". To create a pull request review comment reply, use the new \"Create a review comment reply\" endpoint", + "before": { + "operationId": "pulls/create-comment-reply" + }, + "after": { + "operationId": "pulls/create-comment" + } + }, + { + "type": "parameter", + "date": "2019-09-09", + "note": "\"in_reply_to\" parameter is deprecated for \"Create a comment\". To create a pull request review comment reply, use the new \"Create a review comment reply\" endpoint", + "before": { + "name": "in_reply_to", + "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.", + "in": "body", + "type": "integer" + }, + "after": {} + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "type": "string", + "description": "The text of the review comment." + }, + "commit_id": { + "type": "string", + "description": "The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`." + }, + "path": { + "type": "string", + "description": "The relative path to the file that necessitates a comment." + }, + "position": { + "type": "integer", + "description": "**Required without `comfort-fade` preview**. 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 above." + }, + "side": { + "type": "string", + "description": "**Required with `comfort-fade` preview**. In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see \"[Diff view options](https://help.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)\" in the GitHub Help documentation.", + "enum": [ + "LEFT", + "RIGHT" + ] + }, + "line": { + "type": "integer", + "description": "**Required with `comfort-fade` preview**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to." + }, + "start_line": { + "type": "integer", + "description": "**Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see \"[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)\" in the GitHub Help documentation." + }, + "start_side": { + "type": "string", + "description": "**Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see \"[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)\" in the GitHub Help documentation. See `side` in this table for additional context.", + "enum": [ + "LEFT", + "RIGHT", + "side" + ] + } + }, + "required": [ + "body", + "commit_id", + "path" + ] + }, + "examples": { + "example-for-a-multi-line-comment": { + "summary": "Example for a multi-line comment", + "value": { + "path": "test-plan.md", + "start_line": 1, + "start_side": "LEFT", + "line": 3, + "side": "RIGHT", + "body": "Can you expand on this?" + } + }, + "example-for-a-single-line-comment": { + "summary": "Example for a single-line comment", + "value": { + "path": "test-plan.md", + "line": 5, + "side": "LEFT", + "body": "Let's add this deleted line back." + } + } + } + } + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies": { + "post": { + "summary": "Create a review comment reply", + "description": "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.\n\nThis endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See \"[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)\" and \"[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)\" for details.", + "operationId": "pulls/create-review-comment-reply", + "tags": [ + "pulls" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/pulls/comments/#create-a-review-comment-reply" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "pull_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "comment_id", + "description": "comment_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "pull_request_review_id": { + "type": "number" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "diff_hunk": { + "type": "string" + }, + "path": { + "type": "string" + }, + "position": { + "type": "number" + }, + "original_position": { + "type": "number" + }, + "commit_id": { + "type": "string" + }, + "original_commit_id": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "body": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "pull_request_url": { + "type": "string" + }, + "author_association": { + "type": "string" + }, + "_links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "html": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "pull_request": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + } + } + } + } + }, + "example": { + "url": "https://api.github.com/repos/octocat/Hello-World/comments/1", + "pull_request_review_id": 1, + "id": 2, + "node_id": "MDEzOkNvbW1pdENvbW1lbnQx", + "diff_hunk": "@@ -18,3 +18,5 @@ This is my amazing work.", + "path": "file1.txt", + "position": 4, + "original_position": 4, + "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e", + "original_commit_id": "9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840", + "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": "I like this too!", + "created_at": "2019-08-11T16:00:49Z", + "updated_at": "2019-08-11T16: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-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\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\"}'" + }, + { + "lang": "JS", + "source": "octokit.pulls.createReviewCommentReply({\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n comment_id: 42,\n body: 'body'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_review_comment_reply(\n 'hello-world',\n 42,\n 42,\n 'body'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [], + "triggersNotification": true + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "type": "string", + "description": "The text of the review comment." + } + }, + "required": [ + "body" + ] + }, + "example": { + "body": "Great stuff!" + } + } + } + } + } + }, + "/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 [Commit List API](https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository).", + "operationId": "pulls/list-commits", + "tags": [ + "pulls" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/pulls/#list-commits-on-a-pull-request" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "pull_number parameter", + "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": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commit": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "author": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "date": { + "type": "string" + } + } + }, + "committer": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "date": { + "type": "string" + } + } + }, + "message": { + "type": "string" + }, + "tree": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "sha": { + "type": "string" + } + } + }, + "comment_count": { + "type": "number" + }, + "verification": { + "type": "object", + "properties": { + "verified": { + "type": "boolean" + }, + "reason": { + "type": "string" + }, + "signature": { + "type": "string" + }, + "payload": { + "type": "string" + } + } + } + } + }, + "author": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "committer": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "parents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "sha": { + "type": "string" + } + } + } + } + } + } + }, + "example": [ + { + "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" + } + ] + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/commits" + }, + { + "lang": "JS", + "source": "octokit.pulls.listCommits({\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.commits(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"number\" parameter renamed to \"pull_number\"", + "before": { + "name": "number" + }, + "after": { + "name": "pull_number" + } + } + ] + } + }, + "/repos/{owner}/{repo}/pulls/{pull_number}/files": { + "get": { + "summary": "List pull requests files", + "description": "**Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default.", + "operationId": "pulls/list-files", + "tags": [ + "pulls" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/pulls/#list-pull-requests-files" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "pull_number parameter", + "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": { + "type": "object", + "properties": { + "sha": { + "type": "string" + }, + "filename": { + "type": "string" + }, + "status": { + "type": "string" + }, + "additions": { + "type": "number" + }, + "deletions": { + "type": "number" + }, + "changes": { + "type": "number" + }, + "blob_url": { + "type": "string" + }, + "raw_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "patch": { + "type": "string" + } + } + } + }, + "example": [ + { + "sha": "bbcd538c8e72b8c175046e27cc8f907076331401", + "filename": "file1.txt", + "status": "added", + "additions": 103, + "deletions": 21, + "changes": 124, + "blob_url": "https://github.com/octocat/Hello-World/blob/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt", + "raw_url": "https://github.com/octocat/Hello-World/raw/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt", + "contents_url": "https://api.github.com/repos/octocat/Hello-World/contents/file1.txt?ref=6dcb09b5b57875f334f61aebed695e2e4193db5e", + "patch": "@@ -132,7 +132,7 @@ module Test @@ -1000,7 +1000,7 @@ module Test" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/files" + }, + { + "lang": "JS", + "source": "octokit.pulls.listFiles({\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.files(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"number\" parameter renamed to \"pull_number\"", + "before": { + "name": "number" + }, + "after": { + "name": "pull_number" + } + } + ] + } + }, + "/repos/{owner}/{repo}/pulls/{pull_number}/merge": { + "get": { + "summary": "Get if a pull request has been merged", + "description": "", + "operationId": "pulls/check-if-merged", + "tags": [ + "pulls" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/pulls/#get-if-a-pull-request-has-been-merged" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "pull_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Response if pull request has been merged" + }, + "404": { + "description": "Response if pull request has not been merged" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/merge" + }, + { + "lang": "JS", + "source": "octokit.pulls.checkIfMerged({\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.check_if_merged(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"number\" parameter renamed to \"pull_number\"", + "before": { + "name": "number" + }, + "after": { + "name": "pull_number" + } + } + ] + }, + "put": { + "summary": "Merge a pull request (Merge Button)", + "description": "This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See \"[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)\" and \"[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)\" for details.", + "operationId": "pulls/merge", + "tags": [ + "pulls" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/pulls/#merge-a-pull-request-merge-button" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "pull_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Response if merge was successful", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sha": { + "type": "string" + }, + "merged": { + "type": "boolean" + }, + "message": { + "type": "string" + } + } + }, + "examples": { + "response-if-merge-was-successful": { + "value": { + "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e", + "merged": true, + "message": "Pull Request successfully merged" + } + } + } + } + } + }, + "405": { + "description": "Response if merge cannot be performed", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + } + } + }, + "examples": { + "response-if-merge-cannot-be-performed": { + "value": { + "message": "Pull Request is not mergeable", + "documentation_url": "https://developer.github.com/v3/pulls/#merge-a-pull-request-merge-button" + } + } + } + } + } + }, + "409": { + "description": "Response if sha was provided and pull request head did not match", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + } + } + }, + "examples": { + "response-if-sha-was-provided-and-pull-request-head-did-not-match": { + "value": { + "message": "Head branch was modified. Review and try the merge again.", + "documentation_url": "https://developer.github.com/v3/pulls/#merge-a-pull-request-merge-button" + } + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\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\"}'" + }, + { + "lang": "JS", + "source": "octokit.pulls.merge({\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n commit_title: 'commit_title'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.merge(\n 'hello-world',\n 42,\n 'commit_title'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [], + "triggersNotification": true + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"number\" parameter renamed to \"pull_number\"", + "before": { + "name": "number" + }, + "after": { + "name": "pull_number" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "commit_title": { + "type": "string", + "description": "Title for the automatic commit message." + }, + "commit_message": { + "type": "string", + "description": "Extra detail to append to automatic commit message." + }, + "sha": { + "type": "string", + "description": "SHA that pull request head must match to allow merge." + }, + "merge_method": { + "type": "string", + "description": "Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`.", + "enum": [ + "merge", + "squash", + "rebase" + ] + } + } + } + } + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": { + "get": { + "summary": "List review requests", + "description": "", + "operationId": "pulls/list-review-requests", + "tags": [ + "pulls" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/pulls/review_requests/#list-review-requests" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "pull_number parameter", + "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": "object", + "properties": { + "users": { + "type": "array", + "items": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "teams": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "privacy": { + "type": "string" + }, + "permission": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + }, + "parent": { + "type": "string" + } + } + } + } + } + }, + "example": { + "users": [ + { + "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 + } + ], + "teams": [ + { + "id": 1, + "node_id": "MDQ6VGVhbTE=", + "url": "https://api.github.com/teams/1", + "html_url": "https://api.github.com/teams/justice-league", + "name": "Justice League", + "slug": "justice-league", + "description": "A great team.", + "privacy": "closed", + "permission": "admin", + "members_url": "https://api.github.com/teams/1/members{/member}", + "repositories_url": "https://api.github.com/teams/1/repos", + "parent": null + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "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" + }, + { + "lang": "JS", + "source": "octokit.pulls.listReviewRequests({\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.review_requests(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"number\" parameter renamed to \"pull_number\"", + "before": { + "name": "number" + }, + "after": { + "name": "pull_number" + } + } + ] + }, + "post": { + "summary": "Create a review request", + "description": "This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See \"[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)\" and \"[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)\" for details.", + "operationId": "pulls/create-review-request", + "tags": [ + "pulls" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/pulls/review_requests/#create-a-review-request" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "pull_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "diff_url": { + "type": "string" + }, + "patch_url": { + "type": "string" + }, + "issue_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "review_comments_url": { + "type": "string" + }, + "review_comment_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "locked": { + "type": "boolean" + }, + "title": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "body": { + "type": "string" + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "color": { + "type": "string" + }, + "default": { + "type": "boolean" + } + } + } + }, + "milestone": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "open_issues": { + "type": "number" + }, + "closed_issues": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "closed_at": { + "type": "string" + }, + "due_on": { + "type": "string" + } + } + }, + "active_lock_reason": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "closed_at": { + "type": "string" + }, + "merged_at": { + "type": "string" + }, + "merge_commit_sha": { + "type": "string" + }, + "assignee": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "assignees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + }, + "required": [ + "login", + "id", + "node_id", + "avatar_url", + "gravatar_id", + "url", + "html_url", + "followers_url", + "following_url", + "gists_url", + "starred_url", + "subscriptions_url", + "organizations_url", + "repos_url", + "events_url", + "received_events_url", + "type", + "site_admin" + ] + } + }, + "requested_reviewers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + }, + "required": [ + "login", + "id", + "node_id", + "avatar_url", + "gravatar_id", + "url", + "html_url", + "followers_url", + "following_url", + "gists_url", + "starred_url", + "subscriptions_url", + "organizations_url", + "repos_url", + "events_url", + "received_events_url", + "type", + "site_admin" + ] + } + }, + "requested_teams": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "privacy": { + "type": "string" + }, + "permission": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + }, + "parent": { + "type": "string" + } + } + } + }, + "head": { + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "ref": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "repo": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + } + } + }, + "base": { + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "ref": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "repo": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + } + } + }, + "_links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "html": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "issue": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "comments": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "review_comments": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "review_comment": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "commits": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "statuses": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + } + } + }, + "author_association": { + "type": "string" + }, + "draft": { + "type": "boolean" + } + } + }, + "example": { + "url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347", + "id": 1, + "node_id": "MDExOlB1bGxSZXF1ZXN0MQ==", + "html_url": "https://github.com/octocat/Hello-World/pull/1347", + "diff_url": "https://github.com/octocat/Hello-World/pull/1347.diff", + "patch_url": "https://github.com/octocat/Hello-World/pull/1347.patch", + "issue_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", + "commits_url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits", + "review_comments_url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments", + "review_comment_url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}", + "comments_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/comments", + "statuses_url": "https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e", + "number": 1347, + "state": "open", + "locked": true, + "title": "Amazing new feature", + "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": "Please pull these awesome changes in!", + "labels": [ + { + "id": 208045946, + "node_id": "MDU6TGFiZWwyMDgwNDU5NDY=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", + "name": "bug", + "description": "Something isn't working", + "color": "f29513", + "default": true + } + ], + "milestone": { + "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1", + "html_url": "https://github.com/octocat/Hello-World/milestones/v1.0", + "labels_url": "https://api.github.com/repos/octocat/Hello-World/milestones/1/labels", + "id": 1002604, + "node_id": "MDk6TWlsZXN0b25lMTAwMjYwNA==", + "number": 1, + "state": "open", + "title": "v1.0", + "description": "Tracking milestone for version 1.0", + "creator": { + "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 + }, + "open_issues": 4, + "closed_issues": 8, + "created_at": "2011-04-10T20:09:31Z", + "updated_at": "2014-03-03T18:58:10Z", + "closed_at": "2013-02-12T13:22:01Z", + "due_on": "2012-10-09T23:39:01Z" + }, + "active_lock_reason": "too heated", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:01:12Z", + "closed_at": "2011-01-26T19:01:12Z", + "merged_at": "2011-01-26T19:01:12Z", + "merge_commit_sha": "e5bd3914e2e596debea16f433f57875b5b90bcd6", + "assignee": { + "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 + }, + "assignees": [ + { + "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 + }, + { + "login": "hubot", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/hubot_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/hubot", + "html_url": "https://github.com/hubot", + "followers_url": "https://api.github.com/users/hubot/followers", + "following_url": "https://api.github.com/users/hubot/following{/other_user}", + "gists_url": "https://api.github.com/users/hubot/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hubot/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hubot/subscriptions", + "organizations_url": "https://api.github.com/users/hubot/orgs", + "repos_url": "https://api.github.com/users/hubot/repos", + "events_url": "https://api.github.com/users/hubot/events{/privacy}", + "received_events_url": "https://api.github.com/users/hubot/received_events", + "type": "User", + "site_admin": true + } + ], + "requested_reviewers": [ + { + "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 + }, + { + "login": "hubot", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/hubot_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/hubot", + "html_url": "https://github.com/hubot", + "followers_url": "https://api.github.com/users/hubot/followers", + "following_url": "https://api.github.com/users/hubot/following{/other_user}", + "gists_url": "https://api.github.com/users/hubot/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hubot/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hubot/subscriptions", + "organizations_url": "https://api.github.com/users/hubot/orgs", + "repos_url": "https://api.github.com/users/hubot/repos", + "events_url": "https://api.github.com/users/hubot/events{/privacy}", + "received_events_url": "https://api.github.com/users/hubot/received_events", + "type": "User", + "site_admin": true + }, + { + "login": "other_user", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/other_user_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/other_user", + "html_url": "https://github.com/other_user", + "followers_url": "https://api.github.com/users/other_user/followers", + "following_url": "https://api.github.com/users/other_user/following{/other_user}", + "gists_url": "https://api.github.com/users/other_user/gists{/gist_id}", + "starred_url": "https://api.github.com/users/other_user/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/other_user/subscriptions", + "organizations_url": "https://api.github.com/users/other_user/orgs", + "repos_url": "https://api.github.com/users/other_user/repos", + "events_url": "https://api.github.com/users/other_user/events{/privacy}", + "received_events_url": "https://api.github.com/users/other_user/received_events", + "type": "User", + "site_admin": false + } + ], + "requested_teams": [ + { + "id": 1, + "node_id": "MDQ6VGVhbTE=", + "url": "https://api.github.com/teams/1", + "html_url": "https://api.github.com/teams/justice-league", + "name": "Justice League", + "slug": "justice-league", + "description": "A great team.", + "privacy": "closed", + "permission": "admin", + "members_url": "https://api.github.com/teams/1/members{/member}", + "repositories_url": "https://api.github.com/teams/1/repos", + "parent": null + } + ], + "head": { + "label": "octocat:new-topic", + "ref": "new-topic", + "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e", + "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 + }, + "repo": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + }, + "base": { + "label": "octocat:master", + "ref": "master", + "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e", + "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 + }, + "repo": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + }, + "_links": { + "self": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/1347" + }, + "html": { + "href": "https://github.com/octocat/Hello-World/pull/1347" + }, + "issue": { + "href": "https://api.github.com/repos/octocat/Hello-World/issues/1347" + }, + "comments": { + "href": "https://api.github.com/repos/octocat/Hello-World/issues/1347/comments" + }, + "review_comments": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments" + }, + "review_comment": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}" + }, + "commits": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits" + }, + "statuses": { + "href": "https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e" + } + }, + "author_association": "OWNER", + "draft": false + } + } + } + }, + "422": { + "description": "Response if user is not a collaborator" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\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\"]}'" + }, + { + "lang": "JS", + "source": "octokit.pulls.createReviewRequest({\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n reviewers: [\n 'reviewers'\n ]\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_review_request(\n 'hello-world',\n 42,\n [\n 'reviewers'\n ]\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [], + "triggersNotification": true + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"number\" parameter renamed to \"pull_number\"", + "before": { + "name": "number" + }, + "after": { + "name": "pull_number" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "reviewers": { + "type": "array", + "description": "An array of user `login`s that will be requested.", + "items": { + "type": "string" + } + }, + "team_reviewers": { + "type": "array", + "description": "An array of team `slug`s that will be requested.", + "items": { + "type": "string" + } + } + } + }, + "example": { + "reviewers": [ + "octocat", + "hubot", + "other_user" + ], + "team_reviewers": [ + "justice-league" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete a review request", + "description": "", + "operationId": "pulls/delete-review-request", + "tags": [ + "pulls" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/pulls/review_requests/#delete-a-review-request" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "pull_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\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\"]}'" + }, + { + "lang": "JS", + "source": "octokit.pulls.deleteReviewRequest({\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n reviewers: [\n 'reviewers'\n ]\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_review_request(\n 'hello-world',\n 42,\n [\n 'reviewers'\n ]\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"number\" parameter renamed to \"pull_number\"", + "before": { + "name": "number" + }, + "after": { + "name": "pull_number" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "reviewers": { + "type": "array", + "description": "An array of user `login`s that will be removed.", + "items": { + "type": "string" + } + }, + "team_reviewers": { + "type": "array", + "description": "An array of team `slug`s that will be removed.", + "items": { + "type": "string" + } + } + } + }, + "example": { + "reviewers": [ + "octocat", + "hubot", + "other_user" + ], + "team_reviewers": [ + "justice-league" + ] + } + } + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews": { + "get": { + "summary": "List reviews on a pull request", + "description": "The list of reviews returns in chronological order.", + "operationId": "pulls/list-reviews", + "tags": [ + "pulls" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/pulls/reviews/#list-reviews-on-a-pull-request" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "pull_number parameter", + "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": "The list of reviews returns in chronological order.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "body": { + "type": "string" + }, + "submitted_at": { + "type": "string" + }, + "commit_id": { + "type": "string" + }, + "state": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "pull_request_url": { + "type": "string" + }, + "_links": { + "type": "object", + "properties": { + "html": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "pull_request": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + } + } + } + } + } + }, + "example": [ + { + "id": 80, + "node_id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=", + "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": "Here is the body for the review.", + "submitted_at": "2019-11-17T17:43:43Z", + "commit_id": "ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091", + "state": "APPROVED", + "html_url": "https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80", + "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/12", + "_links": { + "html": { + "href": "https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80" + }, + "pull_request": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/12" + } + } + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/reviews" + }, + { + "lang": "JS", + "source": "octokit.pulls.listReviews({\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.reviews(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"number\" parameter renamed to \"pull_number\"", + "before": { + "name": "number" + }, + "after": { + "name": "pull_number" + } + } + ] + }, + "post": { + "summary": "Create a pull request review", + "description": "This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See \"[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)\" and \"[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)\" for details.\n\n**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](https://developer.github.com/v3/media/#commits-commit-comparison-and-pull-requests). To see a pull request diff, add this media type to the `Accept` header of a call to the [single pull request](https://developer.github.com/v3/pulls/#get-a-single-pull-request) endpoint.\n\nThe `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.", + "operationId": "pulls/create-review", + "tags": [ + "pulls" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/pulls/reviews/#create-a-pull-request-review" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "pull_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "body": { + "type": "string" + }, + "commit_id": { + "type": "string" + }, + "state": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "pull_request_url": { + "type": "string" + }, + "_links": { + "type": "object", + "properties": { + "html": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "pull_request": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + } + } + } + } + }, + "example": { + "id": 80, + "node_id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=", + "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": "This is close to perfect! Please address the suggested inline change.", + "commit_id": "ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091", + "state": "CHANGES_REQUESTED", + "html_url": "https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80", + "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/12", + "_links": { + "html": { + "href": "https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80" + }, + "pull_request": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/12" + } + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\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\"}'" + }, + { + "lang": "JS", + "source": "octokit.pulls.createReview({\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n commit_id: 'commit_id'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_review(\n 'hello-world',\n 42,\n 'commit_id'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [], + "triggersNotification": true + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"number\" parameter renamed to \"pull_number\"", + "before": { + "name": "number" + }, + "after": { + "name": "pull_number" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "commit_id": { + "type": "string", + "description": "The 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." + }, + "body": { + "type": "string", + "description": "**Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review." + }, + "event": { + "type": "string", + "description": "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](https://developer.github.com/v3/pulls/reviews/#submit-a-pull-request-review) when you are ready.", + "enum": [ + "APPROVE", + "REQUEST_CHANGES", + "COMMENT" + ] + }, + "comments": { + "type": "array", + "description": "Use the following table to specify the location, destination, and contents of the draft review comment.", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "description": "The relative path to the file that necessitates a review comment." + }, + "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." + }, + "body": { + "type": "string", + "description": "Text of the review comment." + } + }, + "required": [ + "path", + "position", + "body" + ] + } + } + } + }, + "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." + } + ] + } + } + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": { + "get": { + "summary": "Get a single review", + "description": "", + "operationId": "pulls/get-review", + "tags": [ + "pulls" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/pulls/reviews/#get-a-single-review" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "pull_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "review_id", + "description": "review_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "body": { + "type": "string" + }, + "submitted_at": { + "type": "string" + }, + "commit_id": { + "type": "string" + }, + "state": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "pull_request_url": { + "type": "string" + }, + "_links": { + "type": "object", + "properties": { + "html": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "pull_request": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + } + } + } + } + }, + "example": { + "id": 80, + "node_id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=", + "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": "Here is the body for the review.", + "submitted_at": "2019-11-17T17:43:43Z", + "commit_id": "ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091", + "state": "APPROVED", + "html_url": "https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80", + "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/12", + "_links": { + "html": { + "href": "https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80" + }, + "pull_request": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/12" + } + } + } + } + } + } + }, + "x-code-samples": [ + { + "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" + }, + { + "lang": "JS", + "source": "octokit.pulls.getReview({\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n review_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.review(\n 'hello-world',\n 42,\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"number\" parameter renamed to \"pull_number\"", + "before": { + "name": "number" + }, + "after": { + "name": "pull_number" + } + } + ] + }, + "delete": { + "summary": "Delete a pending review", + "description": "", + "operationId": "pulls/delete-pending-review", + "tags": [ + "pulls" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/pulls/reviews/#delete-a-pending-review" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "pull_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "review_id", + "description": "review_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "body": { + "type": "string" + }, + "commit_id": { + "type": "string" + }, + "state": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "pull_request_url": { + "type": "string" + }, + "_links": { + "type": "object", + "properties": { + "html": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "pull_request": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + } + } + } + } + }, + "example": { + "id": 80, + "node_id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=", + "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": "Here is the body for the review.", + "commit_id": "ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091", + "state": "PENDING", + "html_url": "https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80", + "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/12", + "_links": { + "html": { + "href": "https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80" + }, + "pull_request": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/12" + } + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/reviews/42" + }, + { + "lang": "JS", + "source": "octokit.pulls.deletePendingReview({\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n review_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_pending_review(\n 'hello-world',\n 42,\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"number\" parameter renamed to \"pull_number\"", + "before": { + "name": "number" + }, + "after": { + "name": "pull_number" + } + } + ] + }, + "put": { + "summary": "Update a pull request review", + "description": "Update the review summary comment with new text.", + "operationId": "pulls/update-review", + "tags": [ + "pulls" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/pulls/reviews/#update-a-pull-request-review" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "pull_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "review_id", + "description": "review_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "body": { + "type": "string" + }, + "commit_id": { + "type": "string" + }, + "state": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "pull_request_url": { + "type": "string" + }, + "_links": { + "type": "object", + "properties": { + "html": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "pull_request": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + } + } + } + } + }, + "example": { + "id": 80, + "node_id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=", + "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": "This is close to perfect! Please address the suggested inline change. And add more about this.", + "commit_id": "ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091", + "state": "CHANGES_REQUESTED", + "html_url": "https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80", + "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/12", + "_links": { + "html": { + "href": "https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80" + }, + "pull_request": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/12" + } + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\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\"}'" + }, + { + "lang": "JS", + "source": "octokit.pulls.updateReview({\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n review_id: 42,\n body: 'body'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.update_review(\n 'hello-world',\n 42,\n 42,\n 'body'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"number\" parameter renamed to \"pull_number\"", + "before": { + "name": "number" + }, + "after": { + "name": "pull_number" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "type": "string", + "description": "The body text of the pull request review." + } + }, + "required": [ + "body" + ] + }, + "example": { + "body": "This is close to perfect! Please address the suggested inline change. And add more about this." + } + } + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments": { + "get": { + "summary": "Get comments for a single review", + "description": "", + "operationId": "pulls/get-comments-for-review", + "tags": [ + "pulls" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/pulls/reviews/#get-comments-for-a-single-review" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "pull_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "review_id", + "description": "review_id parameter", + "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": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "pull_request_review_id": { + "type": "number" + }, + "diff_hunk": { + "type": "string" + }, + "path": { + "type": "string" + }, + "position": { + "type": "number" + }, + "original_position": { + "type": "number" + }, + "commit_id": { + "type": "string" + }, + "original_commit_id": { + "type": "string" + }, + "in_reply_to_id": { + "type": "number" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "body": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "pull_request_url": { + "type": "string" + }, + "author_association": { + "type": "string" + }, + "_links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "html": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "pull_request": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + } + } + } + } + } + }, + "example": [ + { + "url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1", + "id": 10, + "node_id": "MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw", + "pull_request_review_id": 42, + "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-code-samples": [ + { + "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" + }, + { + "lang": "JS", + "source": "octokit.pulls.getCommentsForReview({\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n review_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.comments_for_review(\n 'hello-world',\n 42,\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"number\" parameter renamed to \"pull_number\"", + "before": { + "name": "number" + }, + "after": { + "name": "pull_number" + } + } + ] + } + }, + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals": { + "put": { + "summary": "Dismiss a pull request review", + "description": "**Note:** To dismiss a pull request review on a [protected branch](https://developer.github.com/v3/repos/branches/), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews.", + "operationId": "pulls/dismiss-review", + "tags": [ + "pulls" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/pulls/reviews/#dismiss-a-pull-request-review" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "pull_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "review_id", + "description": "review_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "body": { + "type": "string" + }, + "commit_id": { + "type": "string" + }, + "state": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "pull_request_url": { + "type": "string" + }, + "_links": { + "type": "object", + "properties": { + "html": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "pull_request": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + } + } + } + } + }, + "example": { + "id": 80, + "node_id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=", + "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": "Here is the body for the review.", + "commit_id": "ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091", + "state": "DISMISSED", + "html_url": "https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80", + "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/12", + "_links": { + "html": { + "href": "https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80" + }, + "pull_request": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/12" + } + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\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\"}'" + }, + { + "lang": "JS", + "source": "octokit.pulls.dismissReview({\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n review_id: 42,\n message: 'message'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.dismiss_review(\n 'hello-world',\n 42,\n 42,\n 'message'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"number\" parameter renamed to \"pull_number\"", + "before": { + "name": "number" + }, + "after": { + "name": "pull_number" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "The message for the pull request review dismissal" + } + }, + "required": [ + "message" + ] + } + } + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events": { + "post": { + "summary": "Submit a pull request review", + "description": "", + "operationId": "pulls/submit-review", + "tags": [ + "pulls" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/pulls/reviews/#submit-a-pull-request-review" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "pull_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "review_id", + "description": "review_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "body": { + "type": "string" + }, + "submitted_at": { + "type": "string" + }, + "commit_id": { + "type": "string" + }, + "state": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "pull_request_url": { + "type": "string" + }, + "_links": { + "type": "object", + "properties": { + "html": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + }, + "pull_request": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + } + } + } + } + } + }, + "example": { + "id": 80, + "node_id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=", + "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": "Here is the body for the review.", + "submitted_at": "2019-11-17T17:43:43Z", + "commit_id": "ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091", + "state": "APPROVED", + "html_url": "https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80", + "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/12", + "_links": { + "html": { + "href": "https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80" + }, + "pull_request": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/12" + } + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\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\"}'" + }, + { + "lang": "JS", + "source": "octokit.pulls.submitReview({\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n review_id: 42,\n event: 'event'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.submit_review(\n 'hello-world',\n 42,\n 42,\n 'event'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"number\" parameter renamed to \"pull_number\"", + "before": { + "name": "number" + }, + "after": { + "name": "pull_number" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "type": "string", + "description": "The body text of the pull request review" + }, + "event": { + "type": "string", + "description": "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.", + "enum": [ + "APPROVE", + "REQUEST_CHANGES", + "COMMENT" + ] + } + }, + "required": [ + "event" + ] + } + } + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{pull_number}/update-branch": { + "put": { + "summary": "Update a pull request branch", + "description": "Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch.", + "operationId": "pulls/update-branch", + "tags": [ + "pulls" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/pulls/#update-a-pull-request-branch" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.lydian-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "pull_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "202": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "example": { + "message": "Updating pull request branch.", + "url": "https://github.com/repos/octocat/Hello-World/pulls/53" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\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\"}'" + }, + { + "lang": "JS", + "source": "octokit.pulls.updateBranch({\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n expected_head_sha: 'expected_head_sha'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.update_branch(\n 'hello-world',\n 42,\n 'expected_head_sha'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [ + { + "name": "lydian", + "note": "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](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.lydian-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "expected_head_sha": { + "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 on a repository](https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository)\" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref." + } + } + }, + "example": { + "expected_head_sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e" + } + } + } + } + } + }, + "/repos/{owner}/{repo}/readme": { + "get": { + "summary": "Get the README", + "description": "Gets the preferred README for a repository.\n\nREADMEs support [custom media types](https://developer.github.com/v3/repos/contents/#custom-media-types) for retrieving the raw content or rendered HTML.", + "operationId": "repos/get-readme", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/contents/#get-the-readme" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "encoding": { + "type": "string" + }, + "size": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "content": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "download_url": { + "type": "string" + }, + "_links": { + "type": "object", + "properties": { + "git": { + "type": "string" + }, + "self": { + "type": "string" + }, + "html": { + "type": "string" + } + } + } + } + }, + "example": { + "type": "file", + "encoding": "base64", + "size": 5362, + "name": "README.md", + "path": "README.md", + "content": "encoded content ...", + "sha": "3d21ec53a331a6f037a91c368710b99387d012c1", + "url": "https://api.github.com/repos/octokit/octokit.rb/contents/README.md", + "git_url": "https://api.github.com/repos/octokit/octokit.rb/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1", + "html_url": "https://github.com/octokit/octokit.rb/blob/master/README.md", + "download_url": "https://raw.githubusercontent.com/octokit/octokit.rb/master/README.md", + "_links": { + "git": "https://api.github.com/repos/octokit/octokit.rb/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1", + "self": "https://api.github.com/repos/octokit/octokit.rb/contents/README.md", + "html": "https://github.com/octokit/octokit.rb/blob/master/README.md" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/readme" + }, + { + "lang": "JS", + "source": "octokit.repos.getReadme({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.readme(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/releases": { + "get": { + "summary": "List releases for a repository", + "description": "This returns a list of releases, which does not include regular Git tags that have not been associated with a release. To get a list of Git tags, use the [Repository Tags API](https://developer.github.com/v3/repos/#list-tags).\n\nInformation about published releases are available to everyone. Only users with push access will receive listings for draft releases.", + "operationId": "repos/list-releases", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/releases/#list-releases-for-a-repository" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "assets_url": { + "type": "string" + }, + "upload_url": { + "type": "string" + }, + "tarball_url": { + "type": "string" + }, + "zipball_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "tag_name": { + "type": "string" + }, + "target_commitish": { + "type": "string" + }, + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "draft": { + "type": "boolean" + }, + "prerelease": { + "type": "boolean" + }, + "created_at": { + "type": "string" + }, + "published_at": { + "type": "string" + }, + "author": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "assets": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "browser_download_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "label": { + "type": "string" + }, + "state": { + "type": "string" + }, + "content_type": { + "type": "string" + }, + "size": { + "type": "number" + }, + "download_count": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "uploader": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "example": [ + { + "url": "https://api.github.com/repos/octocat/Hello-World/releases/1", + "html_url": "https://github.com/octocat/Hello-World/releases/v1.0.0", + "assets_url": "https://api.github.com/repos/octocat/Hello-World/releases/1/assets", + "upload_url": "https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}", + "tarball_url": "https://api.github.com/repos/octocat/Hello-World/tarball/v1.0.0", + "zipball_url": "https://api.github.com/repos/octocat/Hello-World/zipball/v1.0.0", + "id": 1, + "node_id": "MDc6UmVsZWFzZTE=", + "tag_name": "v1.0.0", + "target_commitish": "master", + "name": "v1.0.0", + "body": "Description of the release", + "draft": false, + "prerelease": false, + "created_at": "2013-02-27T19:35:32Z", + "published_at": "2013-02-27T19:35:32Z", + "author": { + "login": "octocat", + "id": 1, + "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 + }, + "assets": [ + { + "url": "https://api.github.com/repos/octocat/Hello-World/releases/assets/1", + "browser_download_url": "https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip", + "id": 1, + "node_id": "MDEyOlJlbGVhc2VBc3NldDE=", + "name": "example.zip", + "label": "short description", + "state": "uploaded", + "content_type": "application/zip", + "size": 1024, + "download_count": 42, + "created_at": "2013-02-27T19:35:32Z", + "updated_at": "2013-02-27T19:35:32Z", + "uploader": { + "login": "octocat", + "id": 1, + "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 + } + } + ] + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases" + }, + { + "lang": "JS", + "source": "octokit.repos.listReleases({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.releases(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "post": { + "summary": "Create a release", + "description": "Users with push access to the repository can create a release.\n\nThis endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See \"[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)\" and \"[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)\" for details.", + "operationId": "repos/create-release", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/releases/#create-a-release" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "assets_url": { + "type": "string" + }, + "upload_url": { + "type": "string" + }, + "tarball_url": { + "type": "string" + }, + "zipball_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "tag_name": { + "type": "string" + }, + "target_commitish": { + "type": "string" + }, + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "draft": { + "type": "boolean" + }, + "prerelease": { + "type": "boolean" + }, + "created_at": { + "type": "string" + }, + "published_at": { + "type": "string" + }, + "author": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "assets": { + "type": "array", + "items": {} + } + } + }, + "example": { + "url": "https://api.github.com/repos/octocat/Hello-World/releases/1", + "html_url": "https://github.com/octocat/Hello-World/releases/v1.0.0", + "assets_url": "https://api.github.com/repos/octocat/Hello-World/releases/1/assets", + "upload_url": "https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}", + "tarball_url": "https://api.github.com/repos/octocat/Hello-World/tarball/v1.0.0", + "zipball_url": "https://api.github.com/repos/octocat/Hello-World/zipball/v1.0.0", + "id": 1, + "node_id": "MDc6UmVsZWFzZTE=", + "tag_name": "v1.0.0", + "target_commitish": "master", + "name": "v1.0.0", + "body": "Description of the release", + "draft": false, + "prerelease": false, + "created_at": "2013-02-27T19:35:32Z", + "published_at": "2013-02-27T19:35:32Z", + "author": { + "login": "octocat", + "id": 1, + "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 + }, + "assets": [] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases \\\n -d '{\"tag_name\":\"tag_name\"}'" + }, + { + "lang": "JS", + "source": "octokit.repos.createRelease({\n owner: 'octocat',\n repo: 'hello-world',\n tag_name: 'tag_name'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_release(\n 'hello-world',\n 'tag_name'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [], + "triggersNotification": true + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "tag_name": { + "type": "string", + "description": "The name of the tag." + }, + "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`)." + }, + "name": { + "type": "string", + "description": "The name of the release." + }, + "body": { + "type": "string", + "description": "Text describing the contents of the tag." + }, + "draft": { + "type": "boolean", + "description": "`true` to create a draft (unpublished) release, `false` to create a published one.", + "default": false + }, + "prerelease": { + "type": "boolean", + "description": "`true` to identify the release as a prerelease. `false` to identify the release as a full release.", + "default": false + } + }, + "required": [ + "tag_name" + ] + }, + "example": { + "tag_name": "v1.0.0", + "target_commitish": "master", + "name": "v1.0.0", + "body": "Description of the release", + "draft": false, + "prerelease": false + } + } + } + } + } + }, + "/repos/{owner}/{repo}/releases/assets/{asset_id}": { + "get": { + "summary": "Get a single release asset", + "description": "To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://developer.github.com/v3/media/#media-types). 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.", + "operationId": "repos/get-release-asset", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/releases/#get-a-single-release-asset" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "asset_id", + "description": "asset_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://developer.github.com/v3/media/#media-types). 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.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "browser_download_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "label": { + "type": "string" + }, + "state": { + "type": "string" + }, + "content_type": { + "type": "string" + }, + "size": { + "type": "number" + }, + "download_count": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "uploader": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + } + }, + "example": { + "url": "https://api.github.com/repos/octocat/Hello-World/releases/assets/1", + "browser_download_url": "https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip", + "id": 1, + "node_id": "MDEyOlJlbGVhc2VBc3NldDE=", + "name": "example.zip", + "label": "short description", + "state": "uploaded", + "content_type": "application/zip", + "size": 1024, + "download_count": 42, + "created_at": "2013-02-27T19:35:32Z", + "updated_at": "2013-02-27T19:35:32Z", + "uploader": { + "login": "octocat", + "id": 1, + "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 + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/assets/42" + }, + { + "lang": "JS", + "source": "octokit.repos.getReleaseAsset({\n owner: 'octocat',\n repo: 'hello-world',\n asset_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.release_asset(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "patch": { + "summary": "Edit a release asset", + "description": "Users with push access to the repository can edit a release asset.", + "operationId": "repos/update-release-asset", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/releases/#edit-a-release-asset" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "asset_id", + "description": "asset_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "browser_download_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "label": { + "type": "string" + }, + "state": { + "type": "string" + }, + "content_type": { + "type": "string" + }, + "size": { + "type": "number" + }, + "download_count": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "uploader": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + } + }, + "example": { + "url": "https://api.github.com/repos/octocat/Hello-World/releases/assets/1", + "browser_download_url": "https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip", + "id": 1, + "node_id": "MDEyOlJlbGVhc2VBc3NldDE=", + "name": "example.zip", + "label": "short description", + "state": "uploaded", + "content_type": "application/zip", + "size": 1024, + "download_count": 42, + "created_at": "2013-02-27T19:35:32Z", + "updated_at": "2013-02-27T19:35:32Z", + "uploader": { + "login": "octocat", + "id": 1, + "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 + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/assets/42 \\\n -d '{\"name\":\"name\"}'" + }, + { + "lang": "JS", + "source": "octokit.repos.updateReleaseAsset({\n owner: 'octocat',\n repo: 'hello-world',\n asset_id: 42,\n name: 'name'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.update_release_asset(\n 'hello-world',\n 42,\n 'name'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The file name of the asset." + }, + "label": { + "type": "string", + "description": "An alternate short description of the asset. Used in place of the filename." + } + } + }, + "example": { + "name": "foo-1.0.0-osx.zip", + "label": "Mac binary" + } + } + } + } + }, + "delete": { + "summary": "Delete a release asset", + "description": "", + "operationId": "repos/delete-release-asset", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/releases/#delete-a-release-asset" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "asset_id", + "description": "asset_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/assets/42" + }, + { + "lang": "JS", + "source": "octokit.repos.deleteReleaseAsset({\n owner: 'octocat',\n repo: 'hello-world',\n asset_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_release_asset(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/releases/latest": { + "get": { + "summary": "Get the latest release", + "description": "View the latest published full release for the repository.\n\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.", + "operationId": "repos/get-latest-release", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/releases/#get-the-latest-release" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "assets_url": { + "type": "string" + }, + "upload_url": { + "type": "string" + }, + "tarball_url": { + "type": "string" + }, + "zipball_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "tag_name": { + "type": "string" + }, + "target_commitish": { + "type": "string" + }, + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "draft": { + "type": "boolean" + }, + "prerelease": { + "type": "boolean" + }, + "created_at": { + "type": "string" + }, + "published_at": { + "type": "string" + }, + "author": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "assets": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "browser_download_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "label": { + "type": "string" + }, + "state": { + "type": "string" + }, + "content_type": { + "type": "string" + }, + "size": { + "type": "number" + }, + "download_count": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "uploader": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "example": { + "url": "https://api.github.com/repos/octocat/Hello-World/releases/1", + "html_url": "https://github.com/octocat/Hello-World/releases/v1.0.0", + "assets_url": "https://api.github.com/repos/octocat/Hello-World/releases/1/assets", + "upload_url": "https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}", + "tarball_url": "https://api.github.com/repos/octocat/Hello-World/tarball/v1.0.0", + "zipball_url": "https://api.github.com/repos/octocat/Hello-World/zipball/v1.0.0", + "id": 1, + "node_id": "MDc6UmVsZWFzZTE=", + "tag_name": "v1.0.0", + "target_commitish": "master", + "name": "v1.0.0", + "body": "Description of the release", + "draft": false, + "prerelease": false, + "created_at": "2013-02-27T19:35:32Z", + "published_at": "2013-02-27T19:35:32Z", + "author": { + "login": "octocat", + "id": 1, + "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 + }, + "assets": [ + { + "url": "https://api.github.com/repos/octocat/Hello-World/releases/assets/1", + "browser_download_url": "https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip", + "id": 1, + "node_id": "MDEyOlJlbGVhc2VBc3NldDE=", + "name": "example.zip", + "label": "short description", + "state": "uploaded", + "content_type": "application/zip", + "size": 1024, + "download_count": 42, + "created_at": "2013-02-27T19:35:32Z", + "updated_at": "2013-02-27T19:35:32Z", + "uploader": { + "login": "octocat", + "id": 1, + "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 + } + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/latest" + }, + { + "lang": "JS", + "source": "octokit.repos.getLatestRelease({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.latest_release(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/releases/tags/{tag}": { + "get": { + "summary": "Get a release by tag name", + "description": "Get a published release with the specified tag.", + "operationId": "repos/get-release-by-tag", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/releases/#get-a-release-by-tag-name" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "tag", + "description": "tag parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "assets_url": { + "type": "string" + }, + "upload_url": { + "type": "string" + }, + "tarball_url": { + "type": "string" + }, + "zipball_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "tag_name": { + "type": "string" + }, + "target_commitish": { + "type": "string" + }, + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "draft": { + "type": "boolean" + }, + "prerelease": { + "type": "boolean" + }, + "created_at": { + "type": "string" + }, + "published_at": { + "type": "string" + }, + "author": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "assets": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "browser_download_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "label": { + "type": "string" + }, + "state": { + "type": "string" + }, + "content_type": { + "type": "string" + }, + "size": { + "type": "number" + }, + "download_count": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "uploader": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "example": { + "url": "https://api.github.com/repos/octocat/Hello-World/releases/1", + "html_url": "https://github.com/octocat/Hello-World/releases/v1.0.0", + "assets_url": "https://api.github.com/repos/octocat/Hello-World/releases/1/assets", + "upload_url": "https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}", + "tarball_url": "https://api.github.com/repos/octocat/Hello-World/tarball/v1.0.0", + "zipball_url": "https://api.github.com/repos/octocat/Hello-World/zipball/v1.0.0", + "id": 1, + "node_id": "MDc6UmVsZWFzZTE=", + "tag_name": "v1.0.0", + "target_commitish": "master", + "name": "v1.0.0", + "body": "Description of the release", + "draft": false, + "prerelease": false, + "created_at": "2013-02-27T19:35:32Z", + "published_at": "2013-02-27T19:35:32Z", + "author": { + "login": "octocat", + "id": 1, + "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 + }, + "assets": [ + { + "url": "https://api.github.com/repos/octocat/Hello-World/releases/assets/1", + "browser_download_url": "https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip", + "id": 1, + "node_id": "MDEyOlJlbGVhc2VBc3NldDE=", + "name": "example.zip", + "label": "short description", + "state": "uploaded", + "content_type": "application/zip", + "size": 1024, + "download_count": 42, + "created_at": "2013-02-27T19:35:32Z", + "updated_at": "2013-02-27T19:35:32Z", + "uploader": { + "login": "octocat", + "id": 1, + "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 + } + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/tags/TAG" + }, + { + "lang": "JS", + "source": "octokit.repos.getReleaseByTag({\n owner: 'octocat',\n repo: 'hello-world',\n tag: 'tag'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.release_by_tag(\n 'hello-world',\n 'tag'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/releases/{release_id}": { + "get": { + "summary": "Get a single release", + "description": "**Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://developer.github.com/v3/#hypermedia).", + "operationId": "repos/get-release", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/releases/#get-a-single-release" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "release_id", + "description": "release_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "**Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://developer.github.com/v3/#hypermedia).", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "assets_url": { + "type": "string" + }, + "upload_url": { + "type": "string" + }, + "tarball_url": { + "type": "string" + }, + "zipball_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "tag_name": { + "type": "string" + }, + "target_commitish": { + "type": "string" + }, + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "draft": { + "type": "boolean" + }, + "prerelease": { + "type": "boolean" + }, + "created_at": { + "type": "string" + }, + "published_at": { + "type": "string" + }, + "author": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "assets": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "browser_download_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "label": { + "type": "string" + }, + "state": { + "type": "string" + }, + "content_type": { + "type": "string" + }, + "size": { + "type": "number" + }, + "download_count": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "uploader": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "example": { + "url": "https://api.github.com/repos/octocat/Hello-World/releases/1", + "html_url": "https://github.com/octocat/Hello-World/releases/v1.0.0", + "assets_url": "https://api.github.com/repos/octocat/Hello-World/releases/1/assets", + "upload_url": "https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}", + "tarball_url": "https://api.github.com/repos/octocat/Hello-World/tarball/v1.0.0", + "zipball_url": "https://api.github.com/repos/octocat/Hello-World/zipball/v1.0.0", + "id": 1, + "node_id": "MDc6UmVsZWFzZTE=", + "tag_name": "v1.0.0", + "target_commitish": "master", + "name": "v1.0.0", + "body": "Description of the release", + "draft": false, + "prerelease": false, + "created_at": "2013-02-27T19:35:32Z", + "published_at": "2013-02-27T19:35:32Z", + "author": { + "login": "octocat", + "id": 1, + "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 + }, + "assets": [ + { + "url": "https://api.github.com/repos/octocat/Hello-World/releases/assets/1", + "browser_download_url": "https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip", + "id": 1, + "node_id": "MDEyOlJlbGVhc2VBc3NldDE=", + "name": "example.zip", + "label": "short description", + "state": "uploaded", + "content_type": "application/zip", + "size": 1024, + "download_count": 42, + "created_at": "2013-02-27T19:35:32Z", + "updated_at": "2013-02-27T19:35:32Z", + "uploader": { + "login": "octocat", + "id": 1, + "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 + } + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/42" + }, + { + "lang": "JS", + "source": "octokit.repos.getRelease({\n owner: 'octocat',\n repo: 'hello-world',\n release_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.release(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "patch": { + "summary": "Edit a release", + "description": "Users with push access to the repository can edit a release.", + "operationId": "repos/update-release", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/releases/#edit-a-release" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "release_id", + "description": "release_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "assets_url": { + "type": "string" + }, + "upload_url": { + "type": "string" + }, + "tarball_url": { + "type": "string" + }, + "zipball_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "tag_name": { + "type": "string" + }, + "target_commitish": { + "type": "string" + }, + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "draft": { + "type": "boolean" + }, + "prerelease": { + "type": "boolean" + }, + "created_at": { + "type": "string" + }, + "published_at": { + "type": "string" + }, + "author": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "assets": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "browser_download_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "label": { + "type": "string" + }, + "state": { + "type": "string" + }, + "content_type": { + "type": "string" + }, + "size": { + "type": "number" + }, + "download_count": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "uploader": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "example": { + "url": "https://api.github.com/repos/octocat/Hello-World/releases/1", + "html_url": "https://github.com/octocat/Hello-World/releases/v1.0.0", + "assets_url": "https://api.github.com/repos/octocat/Hello-World/releases/1/assets", + "upload_url": "https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}", + "tarball_url": "https://api.github.com/repos/octocat/Hello-World/tarball/v1.0.0", + "zipball_url": "https://api.github.com/repos/octocat/Hello-World/zipball/v1.0.0", + "id": 1, + "node_id": "MDc6UmVsZWFzZTE=", + "tag_name": "v1.0.0", + "target_commitish": "master", + "name": "v1.0.0", + "body": "Description of the release", + "draft": false, + "prerelease": false, + "created_at": "2013-02-27T19:35:32Z", + "published_at": "2013-02-27T19:35:32Z", + "author": { + "login": "octocat", + "id": 1, + "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 + }, + "assets": [ + { + "url": "https://api.github.com/repos/octocat/Hello-World/releases/assets/1", + "browser_download_url": "https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip", + "id": 1, + "node_id": "MDEyOlJlbGVhc2VBc3NldDE=", + "name": "example.zip", + "label": "short description", + "state": "uploaded", + "content_type": "application/zip", + "size": 1024, + "download_count": 42, + "created_at": "2013-02-27T19:35:32Z", + "updated_at": "2013-02-27T19:35:32Z", + "uploader": { + "login": "octocat", + "id": 1, + "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 + } + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\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\"}'" + }, + { + "lang": "JS", + "source": "octokit.repos.updateRelease({\n owner: 'octocat',\n repo: 'hello-world',\n release_id: 42,\n tag_name: 'tag_name'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.update_release(\n 'hello-world',\n 42,\n 'tag_name'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "tag_name": { + "type": "string", + "description": "The name of the tag." + }, + "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`)." + }, + "name": { + "type": "string", + "description": "The name of the release." + }, + "body": { + "type": "string", + "description": "Text describing the contents of the tag." + }, + "draft": { + "type": "boolean", + "description": "`true` makes the release a draft, and `false` publishes the release." + }, + "prerelease": { + "type": "boolean", + "description": "`true` to identify the release as a prerelease, `false` to identify the release as a full release." + } + } + }, + "example": { + "tag_name": "v1.0.0", + "target_commitish": "master", + "name": "v1.0.0", + "body": "Description of the release", + "draft": false, + "prerelease": false + } + } + } + } + }, + "delete": { + "summary": "Delete a release", + "description": "Users with push access to the repository can delete a release.", + "operationId": "repos/delete-release", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/releases/#delete-a-release" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "release_id", + "description": "release_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/42" + }, + { + "lang": "JS", + "source": "octokit.repos.deleteRelease({\n owner: 'octocat',\n repo: 'hello-world',\n release_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_release(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/releases/{release_id}/assets": { + "get": { + "summary": "List assets for a release", + "description": "", + "operationId": "repos/list-assets-for-release", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/releases/#list-assets-for-a-release" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "release_id", + "description": "release_id parameter", + "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": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "browser_download_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "label": { + "type": "string" + }, + "state": { + "type": "string" + }, + "content_type": { + "type": "string" + }, + "size": { + "type": "number" + }, + "download_count": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "uploader": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + } + } + }, + "example": [ + { + "url": "https://api.github.com/repos/octocat/Hello-World/releases/assets/1", + "browser_download_url": "https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip", + "id": 1, + "node_id": "MDEyOlJlbGVhc2VBc3NldDE=", + "name": "example.zip", + "label": "short description", + "state": "uploaded", + "content_type": "application/zip", + "size": 1024, + "download_count": 42, + "created_at": "2013-02-27T19:35:32Z", + "updated_at": "2013-02-27T19:35:32Z", + "uploader": { + "login": "octocat", + "id": 1, + "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 + } + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/42/assets" + }, + { + "lang": "JS", + "source": "octokit.repos.listAssetsForRelease({\n owner: 'octocat',\n repo: 'hello-world',\n release_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.assets_for_release(\n 'hello-world',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "post": { + "summary": "Upload a release asset", + "description": "This endpoint makes use of [a Hypermedia relation](https://developer.github.com/v3/#hypermedia) 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 the response of the [Create a release endpoint](https://developer.github.com/v3/repos/releases/#create-a-release) to upload a release asset.\n\nYou need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint.\n\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](https://www.iana.org/assignments/media-types/media-types.xhtml). For example:\n\n`application/zip`\n\nGitHub 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, you'll still need to pass your authentication to be able to upload an asset.\n\n**Notes:**\n\n* GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The \"[List assets for a release](https://developer.github.com/v3/repos/releases/#list-assets-for-a-release)\" endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://github.com/contact).\n* If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset.\n\nThis may leave an empty asset with a state of `starter`. It can be safely deleted.", + "operationId": "repos/upload-release-asset", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/releases/#upload-a-release-asset" + }, + "servers": [ + { + "url": "{origin}", + "variables": { + "origin": { + "default": "https://uploads.github.com", + "description": "The URL origin (protocol + host name + port) is included in `upload_url` returned in the response of the \"Create a release\" endpoint" + } + } + } + ], + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "content-length", + "description": "Size of the asset in bytes. Most libraries will calculate the header automatically", + "in": "header", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "content-type", + "description": "Media Type of the asset. For a list of media types, see https://www.iana.org/assignments/media-types/media-types.xhtml", + "in": "header", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "release_id", + "description": "release_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "name", + "in": "query", + "schema": { + "type": "string" + }, + "description": "name parameter" + }, + { + "name": "label", + "in": "query", + "schema": { + "type": "string" + }, + "description": "label parameter" + } + ], + "responses": { + "201": { + "description": "Response for successful upload", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "browser_download_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "label": { + "type": "string" + }, + "state": { + "type": "string" + }, + "content_type": { + "type": "string" + }, + "size": { + "type": "number" + }, + "download_count": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "uploader": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + } + }, + "examples": { + "response-for-successful-upload": { + "value": { + "url": "https://api.github.com/repos/octocat/Hello-World/releases/assets/1", + "browser_download_url": "https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip", + "id": 1, + "node_id": "MDEyOlJlbGVhc2VBc3NldDE=", + "name": "example.zip", + "label": "short description", + "state": "uploaded", + "content_type": "application/zip", + "size": 1024, + "download_count": 42, + "created_at": "2013-02-27T19:35:32Z", + "updated_at": "2013-02-27T19:35:32Z", + "uploader": { + "login": "octocat", + "id": 1, + "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 + } + } + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/SERVER/repos/octocat/hello-world/releases/42/assets \\\n -d '{\"name\":\"name\"}'" + }, + { + "lang": "JS", + "source": "octokit.repos.uploadReleaseAsset({\n owner: 'octocat',\n repo: 'hello-world',\n release_id: 42,\n name: 'name'\n})" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [], + "requestBodyParameterName": "data", + "overridden": true + }, + "x-changes": [ + { + "type": "parameter", + "date": "2020-01-31", + "note": "\"file\" parameter renamed to \"data\"", + "before": { + "name": "file" + }, + "after": { + "name": "data" + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "type": "string", + "description": "The raw file data" + } + } + } + } + } + }, + "/repos/{owner}/{repo}/stargazers": { + "get": { + "summary": "List Stargazers", + "description": "You can also find out _when_ stars were created by passing the following custom [media type](https://developer.github.com/v3/media/) via the `Accept` header:", + "operationId": "activity/list-stargazers-for-repo", + "tags": [ + "activity" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/activity/starring/#list-stargazers" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "examples": { + "default-response": { + "summary": "Default response", + "value": [ + { + "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 + } + ] + } + } + }, + "application/vnd.github.v3.star+json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "starred_at": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + } + } + }, + "examples": { + "alternative-response-with-star-creation-timestamps": { + "summary": "Alternative response with star creation timestamps", + "value": [ + { + "starred_at": "2011-01-16T19:06:43Z", + "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 + } + } + ] + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/stargazers" + }, + { + "lang": "JS", + "source": "octokit.activity.listStargazersForRepo({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.stargazers_for_repo(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/stats/code_frequency": { + "get": { + "summary": "Get the number of additions and deletions per week", + "description": "Returns a weekly aggregate of the number of additions and deletions pushed to a repository.\n\n", + "operationId": "repos/get-code-frequency-stats", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/statistics/#get-the-number-of-additions-and-deletions-per-week" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Returns a weekly aggregate of the number of additions and deletions pushed to a repository.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "example": [ + [ + 1302998400, + 1124, + -435 + ] + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/stats/code_frequency" + }, + { + "lang": "JS", + "source": "octokit.repos.getCodeFrequencyStats({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.code_frequency_stats(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/stats/commit_activity": { + "get": { + "summary": "Get the last year of commit activity data", + "description": "Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`.\n\n", + "operationId": "repos/get-commit-activity-stats", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/statistics/#get-the-last-year-of-commit-activity-data" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "days": { + "type": "array", + "items": { + "type": "number" + } + }, + "total": { + "type": "number" + }, + "week": { + "type": "number" + } + } + } + }, + "example": [ + { + "days": [ + 0, + 3, + 26, + 20, + 39, + 1, + 0 + ], + "total": 89, + "week": 1336280400 + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/stats/commit_activity" + }, + { + "lang": "JS", + "source": "octokit.repos.getCommitActivityStats({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.commit_activity_stats(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/stats/contributors": { + "get": { + "summary": "Get contributors list with additions, deletions, and commit counts", + "description": "* `total` - The Total number of commits authored by the contributor.\n\nWeekly Hash (`weeks` array):\n\n* `w` - Start of the week, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time).\n* `a` - Number of additions\n* `d` - Number of deletions\n* `c` - Number of commits\n\n", + "operationId": "repos/get-contributors-stats", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/statistics/#get-contributors-list-with-additions-deletions-and-commit-counts" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "* `w` - Start of the week, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time).\n* `a` - Number of additions\n* `d` - Number of deletions\n* `c` - Number of commits", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "author": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "total": { + "type": "number" + }, + "weeks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "w": { + "type": "string" + }, + "a": { + "type": "number" + }, + "d": { + "type": "number" + }, + "c": { + "type": "number" + } + } + } + } + } + } + }, + "example": [ + { + "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 + }, + "total": 135, + "weeks": [ + { + "w": "1367712000", + "a": 6898, + "d": 77, + "c": 10 + } + ] + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/stats/contributors" + }, + { + "lang": "JS", + "source": "octokit.repos.getContributorsStats({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.contributors_stats(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/stats/participation": { + "get": { + "summary": "Get the weekly commit count for the repository owner and everyone else", + "description": "Returns 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`.\n\nThe array order is oldest week (index 0) to most recent week.\n\n", + "operationId": "repos/get-participation-stats", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/statistics/#get-the-weekly-commit-count-for-the-repository-owner-and-everyone-else" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The array order is oldest week (index 0) to most recent week.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "all": { + "type": "array", + "items": { + "type": "number" + } + }, + "owner": { + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "example": { + "all": [ + 11, + 21, + 15, + 2, + 8, + 1, + 8, + 23, + 17, + 21, + 11, + 10, + 33, + 91, + 38, + 34, + 22, + 23, + 32, + 3, + 43, + 87, + 71, + 18, + 13, + 5, + 13, + 16, + 66, + 27, + 12, + 45, + 110, + 117, + 13, + 8, + 18, + 9, + 19, + 26, + 39, + 12, + 20, + 31, + 46, + 91, + 45, + 10, + 24, + 9, + 29, + 7 + ], + "owner": [ + 3, + 2, + 3, + 0, + 2, + 0, + 5, + 14, + 7, + 9, + 1, + 5, + 0, + 48, + 19, + 2, + 0, + 1, + 10, + 2, + 23, + 40, + 35, + 8, + 8, + 2, + 10, + 6, + 30, + 0, + 2, + 9, + 53, + 104, + 3, + 3, + 10, + 4, + 7, + 11, + 21, + 4, + 4, + 22, + 26, + 63, + 11, + 2, + 14, + 1, + 10, + 3 + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/stats/participation" + }, + { + "lang": "JS", + "source": "octokit.repos.getParticipationStats({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.participation_stats(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/stats/punch_card": { + "get": { + "summary": "Get the number of commits per hour in each day", + "description": "Each array contains the day number, hour number, and number of commits:\n\n* `0-6`: Sunday - Saturday\n* `0-23`: Hour of day\n* Number of commits\n\nFor 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.", + "operationId": "repos/get-punch-card-stats", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/statistics/#get-the-number-of-commits-per-hour-in-each-day" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "For 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.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "example": [ + [ + 0, + 0, + 5 + ], + [ + 0, + 1, + 43 + ], + [ + 0, + 2, + 21 + ] + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/stats/punch_card" + }, + { + "lang": "JS", + "source": "octokit.repos.getPunchCardStats({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.punch_card_stats(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/statuses/{sha}": { + "post": { + "summary": "Create a status", + "description": "Users with push access in a repository can create commit statuses for a given SHA.\n\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.", + "operationId": "repos/create-status", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/statuses/#create-a-status" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "sha", + "description": "sha parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "state": { + "type": "string" + }, + "description": { + "type": "string" + }, + "target_url": { + "type": "string" + }, + "context": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + } + }, + "example": { + "url": "https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e", + "avatar_url": "https://github.com/images/error/hubot_happy.gif", + "id": 1, + "node_id": "MDY6U3RhdHVzMQ==", + "state": "success", + "description": "Build has completed successfully", + "target_url": "https://ci.example.com/1000/output", + "context": "continuous-integration/jenkins", + "created_at": "2012-07-20T01:19:13Z", + "updated_at": "2012-07-20T01:19:13Z", + "creator": { + "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 + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/statuses/SHA \\\n -d '{\"state\":\"state\"}'" + }, + { + "lang": "JS", + "source": "octokit.repos.createStatus({\n owner: 'octocat',\n repo: 'hello-world',\n sha: 'sha',\n state: 'state'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_status(\n 'hello-world',\n 'sha',\n 'state'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "state": { + "type": "string", + "description": "The state of the status. Can be one of `error`, `failure`, `pending`, or `success`.", + "enum": [ + "error", + "failure", + "pending", + "success" + ] + }, + "target_url": { + "type": "string", + "description": "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: \n`http://ci.example.com/user/repo/build/sha`" + }, + "description": { + "type": "string", + "description": "A short description of the status." + }, + "context": { + "type": "string", + "description": "A string label to differentiate this status from the status of other systems.", + "default": "default" + } + }, + "required": [ + "state" + ] + }, + "example": { + "state": "success", + "target_url": "https://example.com/build/status", + "description": "The build succeeded!", + "context": "continuous-integration/jenkins" + } + } + } + } + } + }, + "/repos/{owner}/{repo}/subscribers": { + "get": { + "summary": "List watchers", + "description": "", + "operationId": "activity/list-watchers-for-repo", + "tags": [ + "activity" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/activity/watching/#list-watchers" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "example": [ + { + "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 + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/subscribers" + }, + { + "lang": "JS", + "source": "octokit.activity.listWatchersForRepo({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.watchers_for_repo(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/subscription": { + "get": { + "summary": "Get a Repository Subscription", + "description": "", + "operationId": "activity/get-repo-subscription", + "tags": [ + "activity" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/activity/watching/#get-a-repository-subscription" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Response if you are subscribed to the repository", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "subscribed": { + "type": "boolean" + }, + "ignored": { + "type": "boolean" + }, + "reason": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repository_url": { + "type": "string" + } + } + }, + "examples": { + "response-if-you-are-subscribed-to-the-repository": { + "value": { + "subscribed": true, + "ignored": false, + "reason": null, + "created_at": "2012-10-06T21:34:12Z", + "url": "https://api.github.com/repos/octocat/example/subscription", + "repository_url": "https://api.github.com/repos/octocat/example" + } + } + } + } + } + }, + "404": { + "description": "Response if you are not subscribed to the repository" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/subscription" + }, + { + "lang": "JS", + "source": "octokit.activity.getRepoSubscription({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.repo_subscription(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "put": { + "summary": "Set a Repository Subscription", + "description": "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](https://developer.github.com/v3/activity/watching/#delete-a-repository-subscription) completely.", + "operationId": "activity/set-repo-subscription", + "tags": [ + "activity" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/activity/watching/#set-a-repository-subscription" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "subscribed": { + "type": "boolean" + }, + "ignored": { + "type": "boolean" + }, + "reason": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repository_url": { + "type": "string" + } + } + }, + "example": { + "subscribed": true, + "ignored": false, + "reason": null, + "created_at": "2012-10-06T21:34:12Z", + "url": "https://api.github.com/repos/octocat/example/subscription", + "repository_url": "https://api.github.com/repos/octocat/example" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/subscription \\\n -d '{\"subscribed\":true}'" + }, + { + "lang": "JS", + "source": "octokit.activity.setRepoSubscription({\n owner: 'octocat',\n repo: 'hello-world',\n subscribed: true\n})" + }, + { + "lang": "Ruby", + "source": "octokit.set_repo_subscription(\n 'hello-world',\n true\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "subscribed": { + "type": "boolean", + "description": "Determines if notifications should be received from this repository." + }, + "ignored": { + "type": "boolean", + "description": "Determines if all notifications should be blocked from this repository." + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete a Repository Subscription", + "description": "This 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](https://developer.github.com/v3/activity/watching/#set-a-repository-subscription).", + "operationId": "activity/delete-repo-subscription", + "tags": [ + "activity" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/activity/watching/#delete-a-repository-subscription" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/subscription" + }, + { + "lang": "JS", + "source": "octokit.activity.deleteRepoSubscription({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_repo_subscription(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/tags": { + "get": { + "summary": "List tags", + "description": "", + "operationId": "repos/list-tags", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/#list-tags" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "name": { + "type": "string" + }, + "commit": { + "type": "object", + "properties": { + "sha": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "zipball_url": { + "type": "string" + }, + "tarball_url": { + "type": "string" + } + } + } + }, + "example": [ + { + "name": "v0.1", + "commit": { + "sha": "c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc", + "url": "https://api.github.com/repos/octocat/Hello-World/commits/c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc" + }, + "zipball_url": "https://github.com/octocat/Hello-World/zipball/v0.1", + "tarball_url": "https://github.com/octocat/Hello-World/tarball/v0.1" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/tags" + }, + { + "lang": "JS", + "source": "octokit.repos.listTags({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.tags(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/teams": { + "get": { + "summary": "List teams", + "description": "", + "operationId": "repos/list-teams", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/#list-teams" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "privacy": { + "type": "string" + }, + "permission": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + }, + "parent": { + "type": "string" + } + } + } + }, + "example": [ + { + "id": 1, + "node_id": "MDQ6VGVhbTE=", + "url": "https://api.github.com/teams/1", + "html_url": "https://api.github.com/teams/justice-league", + "name": "Justice League", + "slug": "justice-league", + "description": "A great team.", + "privacy": "closed", + "permission": "admin", + "members_url": "https://api.github.com/teams/1/members{/member}", + "repositories_url": "https://api.github.com/teams/1/repos", + "parent": null + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/teams" + }, + { + "lang": "JS", + "source": "octokit.repos.listTeams({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.teams(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/topics": { + "get": { + "summary": "List all topics for a repository", + "description": "", + "operationId": "repos/list-topics", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/#list-all-topics-for-a-repository" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.mercy-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "names": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "example": { + "names": [ + "octocat", + "atom", + "electron", + "api" + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.mercy-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/topics" + }, + { + "lang": "JS", + "source": "octokit.repos.listTopics({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.topics(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "mercy", + "note": "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](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.mercy-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + }, + "put": { + "summary": "Replace all topics for a repository", + "description": "", + "operationId": "repos/replace-topics", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/#replace-all-topics-for-a-repository" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.mercy-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "names": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "example": { + "names": [ + "octocat", + "atom", + "electron", + "api" + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\n -H\"Accept: application/vnd.github.mercy-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/topics \\\n -d '{\"names\":[\"names\"]}'" + }, + { + "lang": "JS", + "source": "octokit.repos.replaceTopics({\n owner: 'octocat',\n repo: 'hello-world',\n names: [\n 'names'\n ]\n})" + }, + { + "lang": "Ruby", + "source": "octokit.replace_topics(\n 'hello-world',\n [\n 'names'\n ]\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "mercy", + "note": "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](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.mercy-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "names": { + "type": "array", + "description": "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.", + "items": { + "type": "string" + } + } + }, + "required": [ + "names" + ] + }, + "example": { + "names": [ + "octocat", + "atom", + "electron", + "api" + ] + } + } + } + } + } + }, + "/repos/{owner}/{repo}/traffic/clones": { + "get": { + "summary": "Clones", + "description": "Get the total number of clones and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday.", + "operationId": "repos/get-clones", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/traffic/#clones" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "per", + "description": "Must be one of: `day`, `week`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "day", + "week" + ], + "default": "day" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "uniques": { + "type": "number" + }, + "clones": { + "type": "array", + "items": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "count": { + "type": "number" + }, + "uniques": { + "type": "number" + } + }, + "required": [ + "timestamp", + "count", + "uniques" + ] + } + } + } + }, + "example": { + "count": 173, + "uniques": 128, + "clones": [ + { + "timestamp": "2016-10-10T00:00:00Z", + "count": 2, + "uniques": 1 + }, + { + "timestamp": "2016-10-11T00:00:00Z", + "count": 17, + "uniques": 16 + }, + { + "timestamp": "2016-10-12T00:00:00Z", + "count": 21, + "uniques": 15 + }, + { + "timestamp": "2016-10-13T00:00:00Z", + "count": 8, + "uniques": 7 + }, + { + "timestamp": "2016-10-14T00:00:00Z", + "count": 5, + "uniques": 5 + }, + { + "timestamp": "2016-10-15T00:00:00Z", + "count": 2, + "uniques": 2 + }, + { + "timestamp": "2016-10-16T00:00:00Z", + "count": 8, + "uniques": 7 + }, + { + "timestamp": "2016-10-17T00:00:00Z", + "count": 26, + "uniques": 15 + }, + { + "timestamp": "2016-10-18T00:00:00Z", + "count": 19, + "uniques": 17 + }, + { + "timestamp": "2016-10-19T00:00:00Z", + "count": 19, + "uniques": 14 + }, + { + "timestamp": "2016-10-20T00:00:00Z", + "count": 19, + "uniques": 15 + }, + { + "timestamp": "2016-10-21T00:00:00Z", + "count": 9, + "uniques": 7 + }, + { + "timestamp": "2016-10-22T00:00:00Z", + "count": 5, + "uniques": 5 + }, + { + "timestamp": "2016-10-23T00:00:00Z", + "count": 6, + "uniques": 5 + }, + { + "timestamp": "2016-10-24T00:00:00Z", + "count": 7, + "uniques": 5 + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/traffic/clones" + }, + { + "lang": "JS", + "source": "octokit.repos.getClones({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.clones(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/traffic/popular/paths": { + "get": { + "summary": "List paths", + "description": "Get the top 10 popular contents over the last 14 days.", + "operationId": "repos/get-top-paths", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/traffic/#list-paths" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string" + }, + "title": { + "type": "string" + }, + "count": { + "type": "number" + }, + "uniques": { + "type": "number" + } + } + } + }, + "example": [ + { + "path": "/github/hubot", + "title": "github/hubot: A customizable life embetterment robot.", + "count": 3542, + "uniques": 2225 + }, + { + "path": "/github/hubot/blob/master/docs/scripting.md", + "title": "hubot/scripting.md at master · github/hubot · GitHub", + "count": 1707, + "uniques": 804 + }, + { + "path": "/github/hubot/tree/master/docs", + "title": "hubot/docs at master · github/hubot · GitHub", + "count": 685, + "uniques": 435 + }, + { + "path": "/github/hubot/tree/master/src", + "title": "hubot/src at master · github/hubot · GitHub", + "count": 577, + "uniques": 347 + }, + { + "path": "/github/hubot/blob/master/docs/index.md", + "title": "hubot/index.md at master · github/hubot · GitHub", + "count": 379, + "uniques": 259 + }, + { + "path": "/github/hubot/blob/master/docs/adapters.md", + "title": "hubot/adapters.md at master · github/hubot · GitHub", + "count": 354, + "uniques": 201 + }, + { + "path": "/github/hubot/tree/master/examples", + "title": "hubot/examples at master · github/hubot · GitHub", + "count": 340, + "uniques": 260 + }, + { + "path": "/github/hubot/blob/master/docs/deploying/heroku.md", + "title": "hubot/heroku.md at master · github/hubot · GitHub", + "count": 324, + "uniques": 217 + }, + { + "path": "/github/hubot/blob/master/src/robot.coffee", + "title": "hubot/robot.coffee at master · github/hubot · GitHub", + "count": 293, + "uniques": 191 + }, + { + "path": "/github/hubot/blob/master/LICENSE.md", + "title": "hubot/LICENSE.md at master · github/hubot · GitHub", + "count": 281, + "uniques": 222 + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/traffic/popular/paths" + }, + { + "lang": "JS", + "source": "octokit.repos.getTopPaths({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.top_paths(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/traffic/popular/referrers": { + "get": { + "summary": "List referrers", + "description": "Get the top 10 referrers over the last 14 days.", + "operationId": "repos/get-top-referrers", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/traffic/#list-referrers" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "referrer": { + "type": "string" + }, + "count": { + "type": "number" + }, + "uniques": { + "type": "number" + } + } + } + }, + "example": [ + { + "referrer": "Google", + "count": 4, + "uniques": 3 + }, + { + "referrer": "stackoverflow.com", + "count": 2, + "uniques": 2 + }, + { + "referrer": "eggsonbread.com", + "count": 1, + "uniques": 1 + }, + { + "referrer": "yandex.ru", + "count": 1, + "uniques": 1 + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/traffic/popular/referrers" + }, + { + "lang": "JS", + "source": "octokit.repos.getTopReferrers({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.top_referrers(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/traffic/views": { + "get": { + "summary": "Views", + "description": "Get the total number of views and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday.", + "operationId": "repos/get-views", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/traffic/#views" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "per", + "description": "Must be one of: `day`, `week`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "day", + "week" + ], + "default": "day" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "uniques": { + "type": "number" + }, + "views": { + "type": "array", + "items": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "count": { + "type": "number" + }, + "uniques": { + "type": "number" + } + }, + "required": [ + "timestamp", + "count", + "uniques" + ] + } + } + } + }, + "example": { + "count": 14850, + "uniques": 3782, + "views": [ + { + "timestamp": "2016-10-10T00:00:00Z", + "count": 440, + "uniques": 143 + }, + { + "timestamp": "2016-10-11T00:00:00Z", + "count": 1308, + "uniques": 414 + }, + { + "timestamp": "2016-10-12T00:00:00Z", + "count": 1486, + "uniques": 452 + }, + { + "timestamp": "2016-10-13T00:00:00Z", + "count": 1170, + "uniques": 401 + }, + { + "timestamp": "2016-10-14T00:00:00Z", + "count": 868, + "uniques": 266 + }, + { + "timestamp": "2016-10-15T00:00:00Z", + "count": 495, + "uniques": 157 + }, + { + "timestamp": "2016-10-16T00:00:00Z", + "count": 524, + "uniques": 175 + }, + { + "timestamp": "2016-10-17T00:00:00Z", + "count": 1263, + "uniques": 412 + }, + { + "timestamp": "2016-10-18T00:00:00Z", + "count": 1402, + "uniques": 417 + }, + { + "timestamp": "2016-10-19T00:00:00Z", + "count": 1394, + "uniques": 424 + }, + { + "timestamp": "2016-10-20T00:00:00Z", + "count": 1492, + "uniques": 448 + }, + { + "timestamp": "2016-10-21T00:00:00Z", + "count": 1153, + "uniques": 332 + }, + { + "timestamp": "2016-10-22T00:00:00Z", + "count": 566, + "uniques": 168 + }, + { + "timestamp": "2016-10-23T00:00:00Z", + "count": 675, + "uniques": 184 + }, + { + "timestamp": "2016-10-24T00:00:00Z", + "count": 614, + "uniques": 237 + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/traffic/views" + }, + { + "lang": "JS", + "source": "octokit.repos.getViews({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.views(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/transfer": { + "post": { + "summary": "Transfer a repository", + "description": "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](https://help.github.com/articles/about-repository-transfers/).", + "operationId": "repos/transfer", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/#transfer-a-repository" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "202": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + }, + "example": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/transfer \\\n -d '{\"new_owner\":\"new_owner\"}'" + }, + { + "lang": "JS", + "source": "octokit.repos.transfer({\n owner: 'octocat',\n repo: 'hello-world',\n new_owner: 'new_owner'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.transfer(\n 'hello-world',\n 'new_owner'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "new_owner": { + "type": "string", + "description": "**Required:** The username or organization name the repository will be transferred to." + }, + "team_ids": { + "type": "array", + "description": "ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories.", + "items": { + "type": "integer" + } + } + } + }, + "example": { + "new_owner": "github", + "team_ids": [ + 12, + 345 + ] + } + } + } + } + } + }, + "/repos/{owner}/{repo}/vulnerability-alerts": { + "get": { + "summary": "Check if vulnerability alerts are enabled for a repository", + "description": "Shows whether vulnerability alerts are enabled or disabled for a repository. The authenticated user must have admin access to the repository. For more information, see \"[About security alerts for vulnerable dependencies](https://help.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)\" in the GitHub Help documentation.", + "operationId": "repos/check-vulnerability-alerts", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/#check-if-vulnerability-alerts-are-enabled-for-a-repository" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.dorian-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Response if repository is enabled with vulnerability alerts" + }, + "404": { + "description": "Response if repository is not enabled with vulnerability alerts" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.dorian-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/vulnerability-alerts" + }, + { + "lang": "JS", + "source": "octokit.repos.checkVulnerabilityAlerts({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.check_vulnerability_alerts(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [ + { + "name": "dorian", + "note": "Enabling and disabling vulnerability 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](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.dorian-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + }, + "put": { + "summary": "Enable vulnerability alerts", + "description": "Enables vulnerability 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](https://help.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)\" in the GitHub Help documentation.", + "operationId": "repos/enable-vulnerability-alerts", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/#enable-vulnerability-alerts" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.dorian-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\n -H\"Accept: application/vnd.github.dorian-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/vulnerability-alerts" + }, + { + "lang": "JS", + "source": "octokit.repos.enableVulnerabilityAlerts({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.enable_vulnerability_alerts(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "dorian", + "note": "Enabling and disabling vulnerability 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](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.dorian-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + }, + "delete": { + "summary": "Disable vulnerability alerts", + "description": "Disables vulnerability 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](https://help.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)\" in the GitHub Help documentation.", + "operationId": "repos/disable-vulnerability-alerts", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/#disable-vulnerability-alerts" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.dorian-preview+json" + }, + "required": true + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.dorian-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/vulnerability-alerts" + }, + { + "lang": "JS", + "source": "octokit.repos.disableVulnerabilityAlerts({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.disable_vulnerability_alerts(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "dorian", + "note": "Enabling and disabling vulnerability 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](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.dorian-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/repos/{owner}/{repo}/{archive_format}/{ref}": { + "get": { + "summary": "Get archive link", + "description": "Gets a redirect URL to download an archive for a repository. The `:archive_format` can be either `tarball` or `zipball`. The `:ref` must be a valid Git reference. If you omit `:ref`, the repository’s default branch (usually `master`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use the `Location` header to make a second `GET` request.\n\n_Note_: For private repositories, these links are temporary and expire after five minutes.\n\nTo follow redirects with curl, use the `-L` switch:\n\n", + "operationId": "repos/get-archive-link", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/contents/#get-archive-link" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "archive_format", + "description": "archive_format parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "ref", + "description": "ref parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "302": { + "description": "response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/ARCHIVE_FORMAT/REF" + }, + { + "lang": "JS", + "source": "octokit.repos.getArchiveLink({\n owner: 'octocat',\n repo: 'hello-world',\n archive_format: 'archive_format',\n ref: 'ref'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.archive_link(\n 'hello-world',\n 'archive_format',\n 'ref'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/repos/{template_owner}/{template_repo}/generate": { + "post": { + "summary": "Create repository using a repository template", + "description": "Creates 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 /repos/:owner/:repo`](https://developer.github.com/v3/repos/#get) endpoint and check that the `is_template` key is `true`.\n\n**OAuth scope requirements**\n\nWhen using [OAuth](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include:\n\n* `public_repo` scope or `repo` scope to create a public repository\n* `repo` scope to create a private repository\n\n\\`", + "operationId": "repos/create-using-template", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/#create-repository-using-a-repository-template" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.baptiste-preview+json" + }, + "required": true + }, + { + "name": "template_owner", + "description": "template_owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "template_repo", + "description": "template_repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + }, + "example": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": false, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + }, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.baptiste-preview+json\" \\\n https://api.github.com/repos/TEMPLATE_OWNER/TEMPLATE_REPO/generate \\\n -d '{\"name\":\"name\"}'" + }, + { + "lang": "JS", + "source": "octokit.repos.createUsingTemplate({\n template_owner: 'template_owner',\n template_repo: 'template_repo',\n name: 'name'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_using_template(\n 'template_owner',\n 'template_repo',\n 'name'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [ + { + "name": "baptiste", + "note": "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](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.baptiste-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "owner": { + "type": "string", + "description": "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." + }, + "name": { + "type": "string", + "description": "The name of the new repository." + }, + "description": { + "type": "string", + "description": "A short description of the new repository." + }, + "private": { + "type": "boolean", + "description": "Either `true` to create a new private repository or `false` to create a new public one.", + "default": false + } + }, + "required": [ + "name" + ] + }, + "example": { + "owner": "octocat", + "name": "Hello-World", + "description": "This is your first repository", + "private": false + } + } + } + } + } + }, + "/repositories": { + "get": { + "summary": "List all public repositories", + "description": "Lists all public repositories in the order that they were created.\n\nNote: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://developer.github.com/v3/#link-header) to get the URL for the next page of repositories.", + "operationId": "repos/list-public", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/#list-all-public-repositories" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "since", + "description": "The integer ID of the last repository that you've seen.", + "in": "query", + "required": false, + "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": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + } + } + } + }, + "example": [ + { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repositories" + }, + { + "lang": "JS", + "source": "octokit.repos.listPublic()" + }, + { + "lang": "Ruby", + "source": "octokit.public()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/scim/v2/organizations/{org}/Users": { + "get": { + "summary": "Get a list of provisioned identities", + "description": "To filter for a specific email address, use the `email` query parameter and the `eq` operator:\n\nYour filter would look like this cURL command:\n\nRetrieves users that match the filter. In the example, we searched only for [octocat@github.com](mailto:octocat@github.com).\n\nRetrieves a paginated list of all provisioned organization members, including pending invitations.", + "operationId": "scim/list-provisioned-identities", + "tags": [ + "scim" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/scim/#get-a-list-of-provisioned-identities" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "startIndex", + "description": "Used for pagination: the index of the first result to return.", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "count", + "description": "Used for pagination: the number of results to return.", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "filter", + "description": "Filters results using the equals query parameter operator (`eq`). You can filter results that are equal to `id`, `userName`, `emails`, and `external_id`. For example, to search for an identity with the `userName` Octocat, you would use this query: `?filter=userName%20eq%20\\\"Octocat\\\"`.", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "schemas": { + "type": "array", + "items": { + "type": "string" + } + }, + "totalResults": { + "type": "number" + }, + "itemsPerPage": { + "type": "number" + }, + "startIndex": { + "type": "number" + }, + "Resources": { + "type": "array", + "items": { + "type": "object", + "properties": { + "schemas": { + "type": "array", + "items": { + "type": "string" + } + }, + "id": { + "type": "string" + }, + "externalId": { + "type": "string" + }, + "userName": { + "type": "string" + }, + "name": { + "type": "object", + "properties": { + "givenName": { + "type": "string" + }, + "familyName": { + "type": "string" + } + } + }, + "emails": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "primary": { + "type": "boolean" + }, + "type": { + "type": "string" + } + } + } + }, + "active": { + "type": "boolean" + }, + "meta": { + "type": "object", + "properties": { + "resourceType": { + "type": "string" + }, + "created": { + "type": "string" + }, + "lastModified": { + "type": "string" + }, + "location": { + "type": "string" + } + } + } + } + } + } + } + }, + "examples": { + "response-with-filter": { + "summary": "Response with filter", + "value": { + "schemas": [ + "urn:ietf:params:scim:api:messages:2.0:ListResponse" + ], + "totalResults": 1, + "itemsPerPage": 1, + "startIndex": 1, + "Resources": [ + { + "schemas": [ + "urn:ietf:params:scim:schemas:core:2.0:User" + ], + "id": "5fc0c238-1112-11e8-8e45-920c87bdbd75", + "externalId": "00u1dhhb1fkIGP7RL1d8", + "userName": "octocat@github.com", + "name": { + "givenName": "Mona", + "familyName": "Octocat" + }, + "emails": [ + { + "value": "octocat@github.com", + "primary": true, + "type": "work" + } + ], + "active": true, + "meta": { + "resourceType": "User", + "created": "2018-02-13T15:05:24.000-08:00", + "lastModified": "2018-02-13T15:05:55.000-08:00", + "location": "https://api.github.com/scim/v2/organizations/octo-org/Users/5fc0c238-1112-11e8-8e45-920c87bdbd75" + } + } + ] + } + }, + "response-without-filter": { + "summary": "Response without filter", + "value": { + "schemas": [ + "urn:ietf:params:scim:api:messages:2.0:ListResponse" + ], + "totalResults": 2, + "itemsPerPage": 2, + "startIndex": 1, + "Resources": [ + { + "schemas": [ + "urn:ietf:params:scim:schemas:core:2.0:User" + ], + "id": "edefdfedf-050c-11e7-8d32", + "externalId": "a7d0f98382", + "userName": "mona.octocat@okta.example.com", + "name": { + "givenName": "Mona", + "familyName": "Octocat" + }, + "emails": [ + { + "value": "mona.octocat@okta.example.com", + "type": "work", + "primary": true + } + ], + "active": true, + "meta": { + "resourceType": "User", + "created": "2017-03-09T16:11:13-05:00", + "lastModified": "2017-03-09T16:11:13-05:00", + "location": "https://api.github.com/scim/v2/organizations/octo-org/Users/edefdfedf-050c-11e7-8d32" + } + }, + { + "schemas": [ + "urn:ietf:params:scim:schemas:core:2.0:User" + ], + "id": "77563764-eb6-24-0598234-958243", + "externalId": "sdfoiausdofiua", + "userName": "hubot@example.com", + "name": { + "givenName": "hu", + "familyName": "bot" + }, + "emails": [ + { + "value": "hubot@example.com", + "type": "work", + "primary": true + } + ], + "active": true, + "meta": { + "resourceType": "User", + "created": "2017-03-09T16:11:13-05:00", + "lastModified": "2017-03-09T16:11:13-05:00", + "location": "https://api.github.com/scim/v2/organizations/octo-org/Users/77563764-eb6-24-0598234-958243" + } + } + ] + } + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/organizations/ORG/Users" + }, + { + "lang": "JS", + "source": "octokit.scim.listProvisionedIdentities({\n org: 'org'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.provisioned_identities(\n 'org'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": true, + "previews": [] + }, + "x-changes": [] + }, + "post": { + "summary": "Provision and invite users", + "description": "Provision organization membership for a user, and send an activation email to the email address.\n\nAs shown in the following example, you must at least provide the required values for the user: `userName`, `name`, and `emails`.", + "operationId": "scim/provision-and-invite-users", + "tags": [ + "scim" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/scim/#provision-and-invite-users" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "schemas": { + "type": "array", + "items": { + "type": "string" + } + }, + "id": { + "type": "string" + }, + "externalId": { + "type": "string" + }, + "userName": { + "type": "string" + }, + "name": { + "type": "object", + "properties": { + "givenName": { + "type": "string" + }, + "familyName": { + "type": "string" + } + } + }, + "emails": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "type": { + "type": "string" + }, + "primary": { + "type": "boolean" + } + } + } + }, + "active": { + "type": "boolean" + }, + "meta": { + "type": "object", + "properties": { + "resourceType": { + "type": "string" + }, + "created": { + "type": "string" + }, + "lastModified": { + "type": "string" + }, + "location": { + "type": "string" + } + } + } + } + }, + "example": { + "schemas": [ + "urn:ietf:params:scim:schemas:core:2.0:User" + ], + "id": "edefdfedf-050c-11e7-8d32", + "externalId": "a7d0f98382", + "userName": "mona.octocat@okta.example.com", + "name": { + "givenName": "Mona", + "familyName": "Octocat" + }, + "emails": [ + { + "value": "mona.octocat@okta.example.com", + "type": "work", + "primary": true + } + ], + "active": true, + "meta": { + "resourceType": "User", + "created": "2017-03-09T16:11:13-05:00", + "lastModified": "2017-03-09T16:11:13-05:00", + "location": "https://api.github.com/scim/v2/organizations/octo-org/Users/edefdfedf-050c-11e7-8d32" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/organizations/ORG/Users" + }, + { + "lang": "JS", + "source": "octokit.scim.provisionAndInviteUsers({\n org: 'org'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.provision_and_invite_users(\n 'org'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": true, + "previews": [] + }, + "x-changes": [ + { + "type": "operation", + "date": "2018-12-27", + "note": "`idName` changed for \"Provision and invite users\". It now includes `-and-`", + "before": { + "operationId": "scim/provision-invite-users" + }, + "after": { + "operationId": "scim/provision-and-invite-users" + } + } + ] + } + }, + "/scim/v2/organizations/{org}/Users/{scim_user_id}": { + "get": { + "summary": "Get provisioning details for a single user", + "description": "", + "operationId": "scim/get-provisioning-details-for-user", + "tags": [ + "scim" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/scim/#get-provisioning-details-for-a-single-user" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "scim_user_id", + "description": "scim_user_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "schemas": { + "type": "array", + "items": { + "type": "string" + } + }, + "id": { + "type": "string" + }, + "externalId": { + "type": "string" + }, + "userName": { + "type": "string" + }, + "name": { + "type": "object", + "properties": { + "givenName": { + "type": "string" + }, + "familyName": { + "type": "string" + } + } + }, + "emails": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "type": { + "type": "string" + }, + "primary": { + "type": "boolean" + } + } + } + }, + "active": { + "type": "boolean" + }, + "meta": { + "type": "object", + "properties": { + "resourceType": { + "type": "string" + }, + "created": { + "type": "string" + }, + "lastModified": { + "type": "string" + }, + "location": { + "type": "string" + } + } + } + } + }, + "example": { + "schemas": [ + "urn:ietf:params:scim:schemas:core:2.0:User" + ], + "id": "edefdfedf-050c-11e7-8d32", + "externalId": "a7d0f98382", + "userName": "mona.octocat@okta.example.com", + "name": { + "givenName": "Mona", + "familyName": "Octocat" + }, + "emails": [ + { + "value": "mona.octocat@okta.example.com", + "type": "work", + "primary": true + } + ], + "active": true, + "meta": { + "resourceType": "User", + "created": "2017-03-09T16:11:13-05:00", + "lastModified": "2017-03-09T16:11:13-05:00", + "location": "https://api.github.com/scim/v2/organizations/octo-org/Users/edefdfedf-050c-11e7-8d32" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/organizations/ORG/Users/42" + }, + { + "lang": "JS", + "source": "octokit.scim.getProvisioningDetailsForUser({\n org: 'org',\n scim_user_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.provisioning_details_for_user(\n 'org',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": true, + "previews": [] + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"external_identity_guid\" parameter renamed to \"scim_user_id\"", + "before": { + "name": "external_identity_guid" + }, + "after": { + "name": "scim_user_id" + } + } + ] + }, + "put": { + "summary": "Replace a provisioned user's information", + "description": "Replaces an existing provisioned user's information. You must provide all the information required for the user as if you were provisioning them for the first time. Any existing user information that you don't provide will be removed. If you want to only update a specific attribute, use the [Update a user attribute](https://developer.github.com/v3/scim/#update-a-user-attribute) endpoint instead.\n\nAs shown in the following example, you must at least provide the required values for the user: `userName`, `name`, and `emails`.\n\n**Warning:** Setting `active: false` removes the user from the organization, deletes the external identity, and deletes the associated `:scim_user_id`.", + "operationId": "scim/replace-provisioned-user-information", + "tags": [ + "scim" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/scim/#replace-a-provisioned-users-information" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "scim_user_id", + "description": "scim_user_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "schemas": { + "type": "array", + "items": { + "type": "string" + } + }, + "id": { + "type": "string" + }, + "externalId": { + "type": "string" + }, + "userName": { + "type": "string" + }, + "name": { + "type": "object", + "properties": { + "givenName": { + "type": "string" + }, + "familyName": { + "type": "string" + } + } + }, + "emails": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "type": { + "type": "string" + }, + "primary": { + "type": "boolean" + } + } + } + }, + "active": { + "type": "boolean" + }, + "meta": { + "type": "object", + "properties": { + "resourceType": { + "type": "string" + }, + "created": { + "type": "string" + }, + "lastModified": { + "type": "string" + }, + "location": { + "type": "string" + } + } + } + } + }, + "example": { + "schemas": [ + "urn:ietf:params:scim:schemas:core:2.0:User" + ], + "id": "edefdfedf-050c-11e7-8d32", + "externalId": "a7d0f98382", + "userName": "mona.octocat@okta.example.com", + "name": { + "givenName": "Mona", + "familyName": "Octocat" + }, + "emails": [ + { + "value": "mona.octocat@okta.example.com", + "type": "work", + "primary": true + } + ], + "active": true, + "meta": { + "resourceType": "User", + "created": "2017-03-09T16:11:13-05:00", + "lastModified": "2017-03-09T16:11:13-05:00", + "location": "https://api.github.com/scim/v2/organizations/octo-org/Users/edefdfedf-050c-11e7-8d32" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/organizations/ORG/Users/42" + }, + { + "lang": "JS", + "source": "octokit.scim.replaceProvisionedUserInformation({\n org: 'org',\n scim_user_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.replace_provisioned_user_information(\n 'org',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": true, + "previews": [] + }, + "x-changes": [ + { + "type": "operation", + "date": "2019-04-10", + "note": "\"Update a provisioned organization membership\" renamed to \"Replace a provisioned user's information\"", + "before": { + "operationId": "scim/update-provisioned-org-membership" + }, + "after": { + "operationId": "scim/replace-provisioned-user-information" + } + }, + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"external_identity_guid\" parameter renamed to \"scim_user_id\"", + "before": { + "name": "external_identity_guid" + }, + "after": { + "name": "scim_user_id" + } + } + ] + }, + "patch": { + "summary": "Update a user attribute", + "description": "Allows you to change a provisioned user's individual attributes. To change a user's values, you must provide a specific `Operations` JSON format that contains at least one of the `add`, `remove`, or `replace` operations.\n\nThe following example shows adding a new email address and updating the user's given name. For other examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2).\n\n**Note:** Complicated SCIM `path` selectors that include filters are not supported. For example, a `path` selector defined as `\"path\": \"emails[type eq \\\"work\\\"]\"` will not work.\n\n**Warning:** If you set `active:false` using the `replace` operation (as shown in the JSON example below), it removes the user from the organization, deletes the external identity, and deletes the associated `:scim_user_id`.\n\n```\n{\n \"Operations\":[{\n \"op\":\"replace\",\n \"value\":{\n \"active\":false\n }\n }]\n}\n\n```", + "operationId": "scim/update-user-attribute", + "tags": [ + "scim" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/scim/#update-a-user-attribute" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "scim_user_id", + "description": "scim_user_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "schemas": { + "type": "array", + "items": { + "type": "string" + } + }, + "id": { + "type": "string" + }, + "externalId": { + "type": "string" + }, + "userName": { + "type": "string" + }, + "name": { + "type": "object", + "properties": { + "givenName": { + "type": "string" + }, + "familyName": { + "type": "string" + } + } + }, + "emails": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "type": { + "type": "string" + }, + "primary": { + "type": "boolean" + } + }, + "required": [ + "value", + "type" + ] + } + }, + "active": { + "type": "boolean" + }, + "meta": { + "type": "object", + "properties": { + "resourceType": { + "type": "string" + }, + "created": { + "type": "string" + }, + "lastModified": { + "type": "string" + }, + "location": { + "type": "string" + } + } + } + } + }, + "example": { + "schemas": [ + "urn:ietf:params:scim:schemas:core:2.0:User" + ], + "id": "edefdfedf-050c-11e7-8d32", + "externalId": "a7d0f98382", + "userName": "mona.octocat@okta.example.com", + "name": { + "givenName": "Monalisa", + "familyName": "Octocat" + }, + "emails": [ + { + "value": "mona.octocat@okta.example.com", + "type": "work", + "primary": true + }, + { + "value": "monalisa@octocat.github.com", + "type": "home" + } + ], + "active": true, + "meta": { + "resourceType": "User", + "created": "2017-03-09T16:11:13-05:00", + "lastModified": "2017-03-09T16:11:13-05:00", + "location": "https://api.github.com/scim/v2/organizations/octo-org/Users/edefdfedf-050c-11e7-8d32" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/organizations/ORG/Users/42" + }, + { + "lang": "JS", + "source": "octokit.scim.updateUserAttribute({\n org: 'org',\n scim_user_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.update_user_attribute(\n 'org',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": true, + "previews": [] + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"external_identity_guid\" parameter renamed to \"scim_user_id\"", + "before": { + "name": "external_identity_guid" + }, + "after": { + "name": "scim_user_id" + } + } + ] + }, + "delete": { + "summary": "Remove a user from the organization", + "description": "", + "operationId": "scim/remove-user-from-org", + "tags": [ + "scim" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/scim/#remove-a-user-from-the-organization" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "scim_user_id", + "description": "scim_user_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/organizations/ORG/Users/42" + }, + { + "lang": "JS", + "source": "octokit.scim.removeUserFromOrg({\n org: 'org',\n scim_user_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.remove_user_from_org(\n 'org',\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": true, + "previews": [] + }, + "x-changes": [ + { + "type": "parameter", + "date": "2019-04-10", + "note": "\"external_identity_guid\" parameter renamed to \"scim_user_id\"", + "before": { + "name": "external_identity_guid" + }, + "after": { + "name": "scim_user_id" + } + } + ] + } + }, + "/search/code": { + "get": { + "summary": "Search code", + "description": "Find file contents via various criteria. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination).\n\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](https://developer.github.com/v3/search/#text-match-metadata).\n\n**Note:** You must [authenticate](https://developer.github.com/v3/#authentication) to search for code across all public repositories.\n\n**Considerations for code search**\n\nDue to the complexity of searching code, there are a few restrictions on how searches are performed:\n\n* Only the _default branch_ is considered. In most cases, this will be the `master` branch.\n* Only files smaller than 384 KB are searchable.\n* You must always include at least one search term when searching source code. For example, searching for [`language:go`](https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code) is not valid, while [`amazing language:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is.\n\nSuppose you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery). Your query would look something like this:\n\nHere, we're searching for the keyword `addClass` within a file's contents. We're making sure that we're only looking in files where the language is JavaScript. And we're scoping the search to the `repo:jquery/jquery` repository.", + "operationId": "search/code", + "tags": [ + "search" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/search/#search-code" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "q", + "description": "The 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](https://developer.github.com/v3/search/#constructing-a-search-query). See \"[Searching code](https://help.github.com/articles/searching-code/)\" for a detailed list of qualifiers.", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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 search infrastructure. Default: [best match](https://developer.github.com/v3/search/#ranking-search-results)", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "indexed" + ] + } + }, + { + "name": "order", + "description": "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`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "desc", + "asc" + ], + "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": "object", + "properties": { + "total_count": { + "type": "number" + }, + "incomplete_results": { + "type": "boolean" + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "repository": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + } + } + }, + "score": { + "type": "number" + } + } + } + } + } + }, + "example": { + "total_count": 7, + "incomplete_results": false, + "items": [ + { + "name": "classes.js", + "path": "src/attributes/classes.js", + "sha": "d7212f9dee2dcc18f084d7df8f417b80846ded5a", + "url": "https://api.github.com/repositories/167174/contents/src/attributes/classes.js?ref=825ac3773694e0cd23ee74895fd5aeb535b27da4", + "git_url": "https://api.github.com/repositories/167174/git/blobs/d7212f9dee2dcc18f084d7df8f417b80846ded5a", + "html_url": "https://github.com/jquery/jquery/blob/825ac3773694e0cd23ee74895fd5aeb535b27da4/src/attributes/classes.js", + "repository": { + "id": 167174, + "node_id": "MDEwOlJlcG9zaXRvcnkxNjcxNzQ=", + "name": "jquery", + "full_name": "jquery/jquery", + "owner": { + "login": "jquery", + "id": 70142, + "node_id": "MDQ6VXNlcjcwMTQy", + "avatar_url": "https://0.gravatar.com/avatar/6906f317a4733f4379b06c32229ef02f?d=https%3A%2F%2Fidenticons.github.com%2Ff426f04f2f9813718fb806b30e0093de.png", + "gravatar_id": "", + "url": "https://api.github.com/users/jquery", + "html_url": "https://github.com/jquery", + "followers_url": "https://api.github.com/users/jquery/followers", + "following_url": "https://api.github.com/users/jquery/following{/other_user}", + "gists_url": "https://api.github.com/users/jquery/gists{/gist_id}", + "starred_url": "https://api.github.com/users/jquery/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/jquery/subscriptions", + "organizations_url": "https://api.github.com/users/jquery/orgs", + "repos_url": "https://api.github.com/users/jquery/repos", + "events_url": "https://api.github.com/users/jquery/events{/privacy}", + "received_events_url": "https://api.github.com/users/jquery/received_events", + "type": "Organization", + "site_admin": false + }, + "private": false, + "html_url": "https://github.com/jquery/jquery", + "description": "jQuery JavaScript Library", + "fork": false, + "url": "https://api.github.com/repos/jquery/jquery", + "forks_url": "https://api.github.com/repos/jquery/jquery/forks", + "keys_url": "https://api.github.com/repos/jquery/jquery/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/jquery/jquery/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/jquery/jquery/teams", + "hooks_url": "https://api.github.com/repos/jquery/jquery/hooks", + "issue_events_url": "https://api.github.com/repos/jquery/jquery/issues/events{/number}", + "events_url": "https://api.github.com/repos/jquery/jquery/events", + "assignees_url": "https://api.github.com/repos/jquery/jquery/assignees{/user}", + "branches_url": "https://api.github.com/repos/jquery/jquery/branches{/branch}", + "tags_url": "https://api.github.com/repos/jquery/jquery/tags", + "blobs_url": "https://api.github.com/repos/jquery/jquery/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/jquery/jquery/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/jquery/jquery/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/jquery/jquery/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/jquery/jquery/statuses/{sha}", + "languages_url": "https://api.github.com/repos/jquery/jquery/languages", + "stargazers_url": "https://api.github.com/repos/jquery/jquery/stargazers", + "contributors_url": "https://api.github.com/repos/jquery/jquery/contributors", + "subscribers_url": "https://api.github.com/repos/jquery/jquery/subscribers", + "subscription_url": "https://api.github.com/repos/jquery/jquery/subscription", + "commits_url": "https://api.github.com/repos/jquery/jquery/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/jquery/jquery/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/jquery/jquery/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/jquery/jquery/issues/comments/{number}", + "contents_url": "https://api.github.com/repos/jquery/jquery/contents/{+path}", + "compare_url": "https://api.github.com/repos/jquery/jquery/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/jquery/jquery/merges", + "archive_url": "https://api.github.com/repos/jquery/jquery/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/jquery/jquery/downloads", + "issues_url": "https://api.github.com/repos/jquery/jquery/issues{/number}", + "pulls_url": "https://api.github.com/repos/jquery/jquery/pulls{/number}", + "milestones_url": "https://api.github.com/repos/jquery/jquery/milestones{/number}", + "notifications_url": "https://api.github.com/repos/jquery/jquery/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/jquery/jquery/labels{/name}" + }, + "score": 0.5269679 + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/search/code" + }, + { + "lang": "JS", + "source": "octokit.search.code({\n q: 'q'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.code(\n 'q'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/search/commits": { + "get": { + "summary": "Search commits", + "description": "Find commits via various criteria. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination).\n\nWhen 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 metadata](https://developer.github.com/v3/search/#text-match-metadata).\n\n**Considerations for commit search**\n\nOnly the _default branch_ is considered. In most cases, this will be the `master` branch.\n\nSuppose you want to find commits related to CSS in the [octocat/Spoon-Knife](https://github.com/octocat/Spoon-Knife) repository. Your query would look something like this:", + "operationId": "search/commits", + "tags": [ + "search" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/search/#search-commits" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.cloak-preview+json" + }, + "required": true + }, + { + "name": "q", + "description": "The 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](https://developer.github.com/v3/search/#constructing-a-search-query). See \"[Searching commits](https://help.github.com/articles/searching-commits/)\" for a detailed list of qualifiers.", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "sort", + "description": "Sorts the results of your query by `author-date` or `committer-date`. Default: [best match](https://developer.github.com/v3/search/#ranking-search-results)", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "author-date", + "committer-date" + ] + } + }, + { + "name": "order", + "description": "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`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "desc", + "asc" + ], + "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": "object", + "properties": { + "total_count": { + "type": "number" + }, + "incomplete_results": { + "type": "boolean" + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commit": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "author": { + "type": "object", + "properties": { + "date": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + } + } + }, + "committer": { + "type": "object", + "properties": { + "date": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + } + } + }, + "message": { + "type": "string" + }, + "tree": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "sha": { + "type": "string" + } + } + }, + "comment_count": { + "type": "number" + } + } + }, + "author": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "committer": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "parents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "sha": { + "type": "string" + } + } + } + }, + "repository": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + } + } + }, + "score": { + "type": "number" + } + } + } + } + } + }, + "example": { + "total_count": 1, + "incomplete_results": false, + "items": [ + { + "url": "https://api.github.com/repos/octocat/Spoon-Knife/commits/bb4cc8d3b2e14b3af5df699876dd4ff3acd00b7f", + "sha": "bb4cc8d3b2e14b3af5df699876dd4ff3acd00b7f", + "html_url": "https://github.com/octocat/Spoon-Knife/commit/bb4cc8d3b2e14b3af5df699876dd4ff3acd00b7f", + "comments_url": "https://api.github.com/repos/octocat/Spoon-Knife/commits/bb4cc8d3b2e14b3af5df699876dd4ff3acd00b7f/comments", + "commit": { + "url": "https://api.github.com/repos/octocat/Spoon-Knife/git/commits/bb4cc8d3b2e14b3af5df699876dd4ff3acd00b7f", + "author": { + "date": "2014-02-04T14:38:36-08:00", + "name": "The Octocat", + "email": "octocat@nowhere.com" + }, + "committer": { + "date": "2014-02-12T15:18:55-08:00", + "name": "The Octocat", + "email": "octocat@nowhere.com" + }, + "message": "Create styles.css and updated README", + "tree": { + "url": "https://api.github.com/repos/octocat/Spoon-Knife/git/trees/a639e96f9038797fba6e0469f94a4b0cc459fa68", + "sha": "a639e96f9038797fba6e0469f94a4b0cc459fa68" + }, + "comment_count": 8 + }, + "author": { + "login": "octocat", + "id": 583231, + "node_id": "MDQ6VXNlcjU4MzIzMQ==", + "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "committer": { + "login": "octocat", + "id": 583231, + "node_id": "MDQ6VXNlcjU4MzIzMQ==", + "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "parents": [ + { + "url": "https://api.github.com/repos/octocat/Spoon-Knife/commits/a30c19e3f13765a3b48829788bc1cb8b4e95cee4", + "html_url": "https://github.com/octocat/Spoon-Knife/commit/a30c19e3f13765a3b48829788bc1cb8b4e95cee4", + "sha": "a30c19e3f13765a3b48829788bc1cb8b4e95cee4" + } + ], + "repository": { + "id": 1300192, + "node_id": "MDEwOlJlcG9zaXRvcnkxMzAwMTky", + "name": "Spoon-Knife", + "full_name": "octocat/Spoon-Knife", + "owner": { + "login": "octocat", + "id": 583231, + "node_id": "MDQ6VXNlcjU4MzIzMQ==", + "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "private": false, + "html_url": "https://github.com/octocat/Spoon-Knife", + "description": "This repo is for demonstration purposes only.", + "fork": false, + "url": "https://api.github.com/repos/octocat/Spoon-Knife", + "forks_url": "https://api.github.com/repos/octocat/Spoon-Knife/forks", + "keys_url": "https://api.github.com/repos/octocat/Spoon-Knife/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/octocat/Spoon-Knife/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/octocat/Spoon-Knife/teams", + "hooks_url": "https://api.github.com/repos/octocat/Spoon-Knife/hooks", + "issue_events_url": "https://api.github.com/repos/octocat/Spoon-Knife/issues/events{/number}", + "events_url": "https://api.github.com/repos/octocat/Spoon-Knife/events", + "assignees_url": "https://api.github.com/repos/octocat/Spoon-Knife/assignees{/user}", + "branches_url": "https://api.github.com/repos/octocat/Spoon-Knife/branches{/branch}", + "tags_url": "https://api.github.com/repos/octocat/Spoon-Knife/tags", + "blobs_url": "https://api.github.com/repos/octocat/Spoon-Knife/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/octocat/Spoon-Knife/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/octocat/Spoon-Knife/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/octocat/Spoon-Knife/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/octocat/Spoon-Knife/statuses/{sha}", + "languages_url": "https://api.github.com/repos/octocat/Spoon-Knife/languages", + "stargazers_url": "https://api.github.com/repos/octocat/Spoon-Knife/stargazers", + "contributors_url": "https://api.github.com/repos/octocat/Spoon-Knife/contributors", + "subscribers_url": "https://api.github.com/repos/octocat/Spoon-Knife/subscribers", + "subscription_url": "https://api.github.com/repos/octocat/Spoon-Knife/subscription", + "commits_url": "https://api.github.com/repos/octocat/Spoon-Knife/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/octocat/Spoon-Knife/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/octocat/Spoon-Knife/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/octocat/Spoon-Knife/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/octocat/Spoon-Knife/contents/{+path}", + "compare_url": "https://api.github.com/repos/octocat/Spoon-Knife/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/octocat/Spoon-Knife/merges", + "archive_url": "https://api.github.com/repos/octocat/Spoon-Knife/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/octocat/Spoon-Knife/downloads", + "issues_url": "https://api.github.com/repos/octocat/Spoon-Knife/issues{/number}", + "pulls_url": "https://api.github.com/repos/octocat/Spoon-Knife/pulls{/number}", + "milestones_url": "https://api.github.com/repos/octocat/Spoon-Knife/milestones{/number}", + "notifications_url": "https://api.github.com/repos/octocat/Spoon-Knife/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/octocat/Spoon-Knife/labels{/name}", + "releases_url": "https://api.github.com/repos/octocat/Spoon-Knife/releases{/id}", + "deployments_url": "https://api.github.com/repos/octocat/Spoon-Knife/deployments" + }, + "score": 4.9971514 + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.cloak-preview+json\" \\\n https://api.github.com/search/commits" + }, + { + "lang": "JS", + "source": "octokit.search.commits({\n q: 'q'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.commits(\n 'q'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "cloak", + "note": "The 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](https://developer.github.com/changes/2017-01-05-commit-search-api/) for full details.\n\nTo access the API you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.cloak-preview\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/search/issues": { + "get": { + "summary": "Search issues and pull requests", + "description": "Find issues by state and keyword. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination).\n\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 search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata).\n\nLet's say you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this.\n\nIn this query, we're searching for the keyword `windows`, within any open issue that's labeled as `bug`. The search runs across repositories whose primary language is Python. We’re sorting by creation date in ascending order, so that the oldest issues appear first in the search results.", + "operationId": "search/issues-and-pull-requests", + "tags": [ + "search" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/search/#search-issues-and-pull-requests" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "q", + "description": "The 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](https://developer.github.com/v3/search/#constructing-a-search-query). See \"[Searching issues and pull requests](https://help.github.com/articles/searching-issues-and-pull-requests/)\" for a detailed list of qualifiers.", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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://developer.github.com/v3/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" + ] + } + }, + { + "name": "order", + "description": "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`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "desc", + "asc" + ], + "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": "object", + "properties": { + "total_count": { + "type": "number" + }, + "incomplete_results": { + "type": "boolean" + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "repository_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "number": { + "type": "number" + }, + "title": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "color": { + "type": "string" + } + } + } + }, + "state": { + "type": "string" + }, + "assignee": { + "type": "string" + }, + "milestone": { + "type": "string" + }, + "comments": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "closed_at": { + "type": "string" + }, + "pull_request": { + "type": "object", + "properties": { + "html_url": { + "type": "string" + }, + "diff_url": { + "type": "string" + }, + "patch_url": { + "type": "string" + } + } + }, + "body": { + "type": "string" + }, + "score": { + "type": "number" + } + } + } + } + } + }, + "example": { + "total_count": 280, + "incomplete_results": false, + "items": [ + { + "url": "https://api.github.com/repos/batterseapower/pinyin-toolkit/issues/132", + "repository_url": "https://api.github.com/repos/batterseapower/pinyin-toolkit", + "labels_url": "https://api.github.com/repos/batterseapower/pinyin-toolkit/issues/132/labels{/name}", + "comments_url": "https://api.github.com/repos/batterseapower/pinyin-toolkit/issues/132/comments", + "events_url": "https://api.github.com/repos/batterseapower/pinyin-toolkit/issues/132/events", + "html_url": "https://github.com/batterseapower/pinyin-toolkit/issues/132", + "id": 35802, + "node_id": "MDU6SXNzdWUzNTgwMg==", + "number": 132, + "title": "Line Number Indexes Beyond 20 Not Displayed", + "user": { + "login": "Nick3C", + "id": 90254, + "node_id": "MDQ6VXNlcjkwMjU0", + "avatar_url": "https://secure.gravatar.com/avatar/934442aadfe3b2f4630510de416c5718?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png", + "gravatar_id": "", + "url": "https://api.github.com/users/Nick3C", + "html_url": "https://github.com/Nick3C", + "followers_url": "https://api.github.com/users/Nick3C/followers", + "following_url": "https://api.github.com/users/Nick3C/following{/other_user}", + "gists_url": "https://api.github.com/users/Nick3C/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Nick3C/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Nick3C/subscriptions", + "organizations_url": "https://api.github.com/users/Nick3C/orgs", + "repos_url": "https://api.github.com/users/Nick3C/repos", + "events_url": "https://api.github.com/users/Nick3C/events{/privacy}", + "received_events_url": "https://api.github.com/users/Nick3C/received_events", + "type": "User" + }, + "labels": [ + { + "id": 4, + "node_id": "MDU6TGFiZWw0", + "url": "https://api.github.com/repos/batterseapower/pinyin-toolkit/labels/bug", + "name": "bug", + "color": "ff0000" + } + ], + "state": "open", + "assignee": null, + "milestone": null, + "comments": 15, + "created_at": "2009-07-12T20:10:41Z", + "updated_at": "2009-07-19T09:23:43Z", + "closed_at": null, + "pull_request": { + "html_url": null, + "diff_url": null, + "patch_url": null + }, + "body": "...", + "score": 1.3859273 + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/search/issues" + }, + { + "lang": "JS", + "source": "octokit.search.issuesAndPullRequests({\n q: 'q'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.issues_and_pull_requests(\n 'q'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "operation", + "date": "2018-12-27", + "note": "\"Search issues\" has been renamed to \"Search issues and pull requests\"", + "before": { + "operationId": "search/issues" + }, + "after": { + "operationId": "search/issues-and-pull-requests" + } + } + ] + } + }, + "/search/labels": { + "get": { + "summary": "Search labels", + "description": "Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://developer.github.com/v3/#pagination).\n\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](https://developer.github.com/v3/search/#text-match-metadata).\n\nSuppose you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this:\n\nThe labels that best match for the query appear first in the search results.", + "operationId": "search/labels", + "tags": [ + "search" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/search/#search-labels" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "repository_id", + "description": "The id of the repository.", + "in": "query", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "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://developer.github.com/v3/search/#constructing-a-search-query).", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "sort", + "description": "Sorts the results of your query by when the label was `created` or `updated`. Default: [best match](https://developer.github.com/v3/search/#ranking-search-results)", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "created", + "updated" + ] + } + }, + { + "name": "order", + "description": "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`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "desc", + "asc" + ], + "default": "desc" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "total_count": { + "type": "number" + }, + "incomplete_results": { + "type": "boolean" + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "color": { + "type": "string" + }, + "default": { + "type": "boolean" + }, + "description": { + "type": "string" + }, + "score": { + "type": "number" + } + }, + "required": [ + "id", + "node_id", + "url", + "name", + "color", + "default", + "description", + "score" + ] + } + } + } + }, + "example": { + "total_count": 2, + "incomplete_results": false, + "items": [ + { + "id": 418327088, + "node_id": "MDU6TGFiZWw0MTgzMjcwODg=", + "url": "https://api.github.com/repos/octocat/linguist/labels/enhancement", + "name": "enhancement", + "color": "84b6eb", + "default": true, + "description": "New feature or request.", + "score": 0.1193385 + }, + { + "id": 418327086, + "node_id": "MDU6TGFiZWw0MTgzMjcwODY=", + "url": "https://api.github.com/repos/octocat/linguist/labels/bug", + "name": "bug", + "color": "ee0701", + "default": true, + "description": "Something isn't working.", + "score": 0.11928606 + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/search/labels" + }, + { + "lang": "JS", + "source": "octokit.search.labels({\n repository_id: 42,\n q: 'q'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.labels(\n 42,\n 'q'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/search/repositories": { + "get": { + "summary": "Search repositories", + "description": "Find repositories via various criteria. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination).\n\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](https://developer.github.com/v3/search/#text-match-metadata).\n\nSuppose you want to search for popular Tetris repositories written in Assembly. Your query might look like this.\n\nYou can search for multiple topics by adding more `topic:` instances, and including the `mercy-preview` header. For example:\n\nIn this request, we're searching for repositories with the word `tetris` in the name, the description, or the README. We're limiting the results to only find repositories where the primary language is Assembly. We're sorting by stars in descending order, so that the most popular repositories appear first in the search results.", + "operationId": "search/repos", + "tags": [ + "search" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/search/#search-repositories" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "q", + "description": "The 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](https://developer.github.com/v3/search/#constructing-a-search-query). See \"[Searching for repositories](https://help.github.com/articles/searching-for-repositories/)\" for a detailed list of qualifiers.", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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://developer.github.com/v3/search/#ranking-search-results)", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "stars", + "forks", + "help-wanted-issues", + "updated" + ] + } + }, + { + "name": "order", + "description": "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`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "desc", + "asc" + ], + "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": "object", + "properties": { + "total_count": { + "type": "number" + }, + "incomplete_results": { + "type": "boolean" + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "size": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "open_issues_count": { + "type": "number" + }, + "master_branch": { + "type": "string" + }, + "default_branch": { + "type": "string" + }, + "score": { + "type": "number" + } + } + } + } + } + }, + "example": { + "total_count": 40, + "incomplete_results": false, + "items": [ + { + "id": 3081286, + "node_id": "MDEwOlJlcG9zaXRvcnkzMDgxMjg2", + "name": "Tetris", + "full_name": "dtrupenn/Tetris", + "owner": { + "login": "dtrupenn", + "id": 872147, + "node_id": "MDQ6VXNlcjg3MjE0Nw==", + "avatar_url": "https://secure.gravatar.com/avatar/e7956084e75f239de85d3a31bc172ace?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png", + "gravatar_id": "", + "url": "https://api.github.com/users/dtrupenn", + "received_events_url": "https://api.github.com/users/dtrupenn/received_events", + "type": "User" + }, + "private": false, + "html_url": "https://github.com/dtrupenn/Tetris", + "description": "A C implementation of Tetris using Pennsim through LC4", + "fork": false, + "url": "https://api.github.com/repos/dtrupenn/Tetris", + "created_at": "2012-01-01T00:31:50Z", + "updated_at": "2013-01-05T17:58:47Z", + "pushed_at": "2012-01-01T00:37:02Z", + "homepage": "", + "size": 524, + "stargazers_count": 1, + "watchers_count": 1, + "language": "Assembly", + "forks_count": 0, + "open_issues_count": 0, + "master_branch": "master", + "default_branch": "master", + "score": 10.309712 + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/search/repositories" + }, + { + "lang": "JS", + "source": "octokit.search.repos({\n q: 'q'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.repos(\n 'q'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "mercy", + "note": "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](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.mercy-preview+json\n\n```", + "required": false + } + ] + }, + "x-changes": [] + } + }, + "/search/topics": { + "get": { + "summary": "Search topics", + "description": "Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination).\n\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](https://developer.github.com/v3/search/#text-match-metadata).\n\nSee \"[Searching topics](https://help.github.com/articles/searching-topics/)\" for a detailed list of qualifiers.\n\nSuppose you want to search for topics related to Ruby that are featured on [https://github.com/topics](https://github.com/topics). Your query might look like this:\n\nIn this request, we're searching for topics with the keyword `ruby`, and we're limiting 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\n**Note:** A search for featured Ruby topics only has 6 total results, so a [Link header](https://developer.github.com/v3/#link-header) indicating pagination is not included in the response.", + "operationId": "search/topics", + "tags": [ + "search" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/search/#search-topics" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "q", + "description": "The 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](https://developer.github.com/v3/search/#constructing-a-search-query).", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "total_count": { + "type": "number" + }, + "incomplete_results": { + "type": "boolean" + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "display_name": { + "type": "string" + }, + "short_description": { + "type": "string" + }, + "description": { + "type": "string" + }, + "created_by": { + "type": "string" + }, + "released": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "featured": { + "type": "boolean" + }, + "curated": { + "type": "boolean" + }, + "score": { + "type": "number" + } + }, + "required": [ + "name", + "display_name", + "short_description", + "description", + "created_by", + "released", + "created_at", + "updated_at", + "featured", + "curated", + "score" + ] + } + } + } + }, + "example": { + "total_count": 6, + "incomplete_results": false, + "items": [ + { + "name": "ruby", + "display_name": "Ruby", + "short_description": "Ruby is a scripting language designed for simplified object-oriented programming.", + "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.", + "created_by": "Yukihiro Matsumoto", + "released": "December 21, 1995", + "created_at": "2016-11-28T22:03:59Z", + "updated_at": "2017-10-30T18:16:32Z", + "featured": true, + "curated": true, + "score": 1750.5872 + }, + { + "name": "rails", + "display_name": "Rails", + "short_description": "Ruby on Rails (Rails) is a web application framework written in Ruby.", + "description": "Ruby on Rails (Rails) is a web application framework written in Ruby. It is meant to help simplify the building of complex websites.", + "created_by": "David Heinemeier Hansson", + "released": "December 13 2005", + "created_at": "2016-12-09T17:03:50Z", + "updated_at": "2017-10-30T16:20:19Z", + "featured": true, + "curated": true, + "score": 192.49863 + }, + { + "name": "python", + "display_name": "Python", + "short_description": "Python is a dynamically typed programming language.", + "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.", + "created_by": "Guido van Rossum", + "released": "February 20, 1991", + "created_at": "2016-12-07T00:07:02Z", + "updated_at": "2017-10-27T22:45:43Z", + "featured": true, + "curated": true, + "score": 111.92691 + }, + { + "name": "jekyll", + "display_name": "Jekyll", + "short_description": "Jekyll is a simple, blog-aware static site generator.", + "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.", + "created_by": "Tom Preston-Werner", + "released": "2008", + "created_at": "2016-12-16T21:53:08Z", + "updated_at": "2017-10-27T19:00:24Z", + "featured": true, + "curated": true, + "score": 45.06729 + }, + { + "name": "sass", + "display_name": "Sass", + "short_description": "Sass is a stable extension to classic CSS.", + "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.", + "created_by": "Hampton Catlin, Natalie Weizenbaum, Chris Eppstein", + "released": "November 28, 2006", + "created_at": "2016-12-16T21:53:45Z", + "updated_at": "2018-01-16T16:30:40Z", + "featured": true, + "curated": true, + "score": 42.455986 + }, + { + "name": "homebrew", + "display_name": "Homebrew", + "short_description": "Homebrew is a package manager for macOS.", + "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.", + "created_by": "Max Howell", + "released": "2009", + "created_at": "2016-12-17T20:30:44Z", + "updated_at": "2018-02-06T16:14:56Z", + "featured": true, + "curated": true, + "score": 19.194168 + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/search/topics" + }, + { + "lang": "JS", + "source": "octokit.search.topics({\n q: 'q'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.topics(\n 'q'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "mercy", + "note": "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](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.mercy-preview+json\n\n```", + "required": false + } + ] + }, + "x-changes": [] + } + }, + "/search/users": { + "get": { + "summary": "Search users", + "description": "Find users via various criteria. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination).\n\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](https://developer.github.com/v3/search/#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata).\n\nImagine you're looking for a list of popular users. You might try out this query:\n\nHere, we're looking at users with the name Tom. We're only interested in those with more than 42 repositories, and only if they have over 1,000 followers.", + "operationId": "search/users", + "tags": [ + "search" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/search/#search-users" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "q", + "description": "The 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](https://developer.github.com/v3/search/#constructing-a-search-query). See \"[Searching users](https://help.github.com/articles/searching-users/)\" for a detailed list of qualifiers.", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "sort", + "description": "Sorts the results of your query by number of `followers` or `repositories`, or when the person `joined` GitHub. Default: [best match](https://developer.github.com/v3/search/#ranking-search-results)", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "followers", + "repositories", + "joined" + ] + } + }, + { + "name": "order", + "description": "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`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "desc", + "asc" + ], + "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": "object", + "properties": { + "total_count": { + "type": "number" + }, + "incomplete_results": { + "type": "boolean" + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "score": { + "type": "number" + } + } + } + } + } + }, + "example": { + "total_count": 12, + "incomplete_results": false, + "items": [ + { + "login": "mojombo", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://secure.gravatar.com/avatar/25c7c18223fb42a4c6ae1c8db6f50f9b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png", + "gravatar_id": "", + "url": "https://api.github.com/users/mojombo", + "html_url": "https://github.com/mojombo", + "followers_url": "https://api.github.com/users/mojombo/followers", + "subscriptions_url": "https://api.github.com/users/mojombo/subscriptions", + "organizations_url": "https://api.github.com/users/mojombo/orgs", + "repos_url": "https://api.github.com/users/mojombo/repos", + "received_events_url": "https://api.github.com/users/mojombo/received_events", + "type": "User", + "score": 105.47857 + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/search/users" + }, + { + "lang": "JS", + "source": "octokit.search.users({\n q: 'q'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.users(\n 'q'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/teams/{team_id}": { + "get": { + "summary": "Get team (Legacy)", + "description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [`Get team by name`](https://developer.github.com/v3/teams/#get-team-by-name) endpoint.", + "operationId": "teams/get-legacy", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/#get-team-legacy" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "team_id", + "description": "team_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "privacy": { + "type": "string" + }, + "permission": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + }, + "parent": { + "type": "string" + }, + "members_count": { + "type": "number" + }, + "repos_count": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "organization": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "public_members_url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "company": { + "type": "string" + }, + "blog": { + "type": "string" + }, + "location": { + "type": "string" + }, + "email": { + "type": "string" + }, + "is_verified": { + "type": "boolean" + }, + "has_organization_projects": { + "type": "boolean" + }, + "has_repository_projects": { + "type": "boolean" + }, + "public_repos": { + "type": "number" + }, + "public_gists": { + "type": "number" + }, + "followers": { + "type": "number" + }, + "following": { + "type": "number" + }, + "html_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "type": { + "type": "string" + } + } + } + } + }, + "example": { + "id": 1, + "node_id": "MDQ6VGVhbTE=", + "url": "https://api.github.com/teams/1", + "html_url": "https://api.github.com/teams/justice-league", + "name": "Justice League", + "slug": "justice-league", + "description": "A great team.", + "privacy": "closed", + "permission": "admin", + "members_url": "https://api.github.com/teams/1/members{/member}", + "repositories_url": "https://api.github.com/teams/1/repos", + "parent": null, + "members_count": 3, + "repos_count": 10, + "created_at": "2017-07-14T16:53:42Z", + "updated_at": "2017-08-17T12:37:15Z", + "organization": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization", + "name": "github", + "company": "GitHub", + "blog": "https://github.com/blog", + "location": "San Francisco", + "email": "octocat@github.com", + "is_verified": true, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 2, + "public_gists": 1, + "followers": 20, + "following": 0, + "html_url": "https://github.com/octocat", + "created_at": "2008-01-14T04:33:35Z", + "type": "Organization" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42" + }, + { + "lang": "JS", + "source": "octokit.teams.getLegacy({\n team_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.legacy(\n 42\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "operation", + "date": "2020-01-16", + "note": "The path for \"Get team\" changed from \"/teams/{team_id}*\" to \"/orgs/{org}/teams/{team_slug}*\"). The operation ID for the old path now has a \"-legacy\" suffix. The route with the new path has a \"-for-org\" suffix in the operation ID to avoid breaking changes", + "before": { + "operationId": "teams/get" + }, + "after": { + "operationId": "teams/get-legacy" + } + } + ], + "deprecated": true + }, + "patch": { + "summary": "Edit team (Legacy)", + "description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Edit team`](https://developer.github.com/v3/teams/#edit-team) endpoint.\n\nTo edit a team, the authenticated user must either be an organization owner or a team maintainer.\n\n**Note:** With nested teams, the `privacy` for parent teams cannot be `secret`.", + "operationId": "teams/update-legacy", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/#edit-team-legacy" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "team_id", + "description": "team_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "privacy": { + "type": "string" + }, + "permission": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + }, + "parent": { + "type": "string" + }, + "members_count": { + "type": "number" + }, + "repos_count": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "organization": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "public_members_url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "company": { + "type": "string" + }, + "blog": { + "type": "string" + }, + "location": { + "type": "string" + }, + "email": { + "type": "string" + }, + "is_verified": { + "type": "boolean" + }, + "has_organization_projects": { + "type": "boolean" + }, + "has_repository_projects": { + "type": "boolean" + }, + "public_repos": { + "type": "number" + }, + "public_gists": { + "type": "number" + }, + "followers": { + "type": "number" + }, + "following": { + "type": "number" + }, + "html_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "type": { + "type": "string" + } + } + } + } + }, + "example": { + "id": 1, + "node_id": "MDQ6VGVhbTE=", + "url": "https://api.github.com/teams/1", + "html_url": "https://api.github.com/teams/justice-league", + "name": "Justice League", + "slug": "justice-league", + "description": "A great team.", + "privacy": "closed", + "permission": "admin", + "members_url": "https://api.github.com/teams/1/members{/member}", + "repositories_url": "https://api.github.com/teams/1/repos", + "parent": null, + "members_count": 3, + "repos_count": 10, + "created_at": "2017-07-14T16:53:42Z", + "updated_at": "2017-08-17T12:37:15Z", + "organization": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization", + "name": "github", + "company": "GitHub", + "blog": "https://github.com/blog", + "location": "San Francisco", + "email": "octocat@github.com", + "is_verified": true, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 2, + "public_gists": 1, + "followers": 20, + "following": 0, + "html_url": "https://github.com/octocat", + "created_at": "2008-01-14T04:33:35Z", + "type": "Organization" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42 \\\n -d '{\"name\":\"name\"}'" + }, + { + "lang": "JS", + "source": "octokit.teams.updateLegacy({\n team_id: 42,\n name: 'name'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.update_legacy(\n 42,\n 'name'\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "operation", + "date": "2020-01-16", + "note": "The path for \"Edit team\" changed from \"/teams/{team_id}*\" to \"/orgs/{org}/teams/{team_slug}*\"). The operation ID for the old path now has a \"-legacy\" suffix. The route with the new path has a \"-for-org\" suffix in the operation ID to avoid breaking changes", + "before": { + "operationId": "teams/update" + }, + "after": { + "operationId": "teams/update-legacy" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the team." + }, + "description": { + "type": "string", + "description": "The description of the team." + }, + "privacy": { + "type": "string", + "description": "The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. The options are: \n**For 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. \n**For a parent or child team:** \n\\* `closed` - visible to all members of this organization.", + "enum": [ + "secret", + "closed" + ] + }, + "permission": { + "type": "string", + "description": "**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.", + "enum": [ + "pull", + "push", + "admin" + ], + "default": "pull" + }, + "parent_team_id": { + "type": "integer", + "description": "The ID of a team to set as the parent team." + } + }, + "required": [ + "name" + ] + }, + "example": { + "name": "new team name", + "description": "new team description", + "privacy": "closed" + } + } + } + }, + "deprecated": true + }, + "delete": { + "summary": "Delete team (Legacy)", + "description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete team`](https://developer.github.com/v3/teams/#delete-team) endpoint.\n\nTo delete a team, the authenticated user must be an organization owner or team maintainer.\n\nIf you are an organization owner, deleting a parent team will delete all of its child teams as well.", + "operationId": "teams/delete-legacy", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/#delete-team-legacy" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "team_id", + "description": "team_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42" + }, + { + "lang": "JS", + "source": "octokit.teams.deleteLegacy({\n team_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_legacy(\n 42\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "operation", + "date": "2020-01-16", + "note": "The path for \"Delete team\" changed from \"/teams/{team_id}*\" to \"/orgs/{org}/teams/{team_slug}*\"). The operation ID for the old path now has a \"-legacy\" suffix. The route with the new path has a \"-for-org\" suffix in the operation ID to avoid breaking changes", + "before": { + "operationId": "teams/delete" + }, + "after": { + "operationId": "teams/delete-legacy" + } + } + ], + "deprecated": true + } + }, + "/teams/{team_id}/discussions": { + "get": { + "summary": "List discussions (Legacy)", + "description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://developer.github.com/v3/teams/discussions/#list-discussions) endpoint.\n\nList all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).", + "operationId": "teams/list-discussions-legacy", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/discussions/#list-discussions-legacy" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "team_id", + "description": "team_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "direction", + "description": "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`.", + "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": { + "type": "object", + "properties": { + "author": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "body": { + "type": "string" + }, + "body_html": { + "type": "string" + }, + "body_version": { + "type": "string" + }, + "comments_count": { + "type": "number" + }, + "comments_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "last_edited_at": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "number": { + "type": "number" + }, + "pinned": { + "type": "boolean" + }, + "private": { + "type": "boolean" + }, + "team_url": { + "type": "string" + }, + "title": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "url": { + "type": "string" + }, + "reactions": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "total_count": { + "type": "number" + }, + "+1": { + "type": "number" + }, + "-1": { + "type": "number" + }, + "laugh": { + "type": "number" + }, + "confused": { + "type": "number" + }, + "heart": { + "type": "number" + }, + "hooray": { + "type": "number" + } + } + } + } + } + }, + "example": [ + { + "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 + } + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions" + }, + { + "lang": "JS", + "source": "octokit.teams.listDiscussionsLegacy({\n team_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.discussions_legacy(\n 42\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "The [reactions API](https://developer.github.com/v3/reactions/) is available for developers to preview. The `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions. See the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To receive the `reactions` object in the response for this endpoint you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.squirrel-girl-preview\n\n```", + "required": false + } + ] + }, + "x-changes": [ + { + "type": "operation", + "date": "2020-01-16", + "note": "The path for \"List discussions\" changed from \"/teams/{team_id}*\" to \"/orgs/{org}/teams/{team_slug}*\"). The operation ID for the old path now has a \"-legacy\" suffix. The route with the new path has a \"-for-org\" suffix in the operation ID to avoid breaking changes", + "before": { + "operationId": "teams/list-discussions" + }, + "after": { + "operationId": "teams/list-discussions-legacy" + } + } + ], + "deprecated": true + }, + "post": { + "summary": "Create a discussion (Legacy)", + "description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://developer.github.com/v3/teams/discussions/#create-a-discussion) endpoint.\n\nCreates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).\n\nThis endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See \"[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)\" and \"[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)\" for details.", + "operationId": "teams/create-discussion-legacy", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/discussions/#create-a-discussion-legacy" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "team_id", + "description": "team_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "author": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "body": { + "type": "string" + }, + "body_html": { + "type": "string" + }, + "body_version": { + "type": "string" + }, + "comments_count": { + "type": "number" + }, + "comments_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "last_edited_at": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "number": { + "type": "number" + }, + "pinned": { + "type": "boolean" + }, + "private": { + "type": "boolean" + }, + "team_url": { + "type": "string" + }, + "title": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "url": { + "type": "string" + }, + "reactions": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "total_count": { + "type": "number" + }, + "+1": { + "type": "number" + }, + "-1": { + "type": "number" + }, + "laugh": { + "type": "number" + }, + "confused": { + "type": "number" + }, + "heart": { + "type": "number" + }, + "hooray": { + "type": "number" + } + } + } + } + }, + "example": { + "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 + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'" + }, + { + "lang": "JS", + "source": "octokit.teams.createDiscussionLegacy({\n team_id: 42,\n title: 'title',\n body: 'body'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_discussion_legacy(\n 42,\n 'title',\n 'body'\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "The [reactions API](https://developer.github.com/v3/reactions/) is available for developers to preview. The `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions. See the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To receive the `reactions` object in the response for this endpoint you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.squirrel-girl-preview\n\n```", + "required": false + } + ], + "triggersNotification": true + }, + "x-changes": [ + { + "type": "operation", + "date": "2020-01-16", + "note": "The path for \"Create a discussion\" changed from \"/teams/{team_id}*\" to \"/orgs/{org}/teams/{team_slug}*\"). The operation ID for the old path now has a \"-legacy\" suffix. The route with the new path has a \"-for-org\" suffix in the operation ID to avoid breaking changes", + "before": { + "operationId": "teams/create-discussion" + }, + "after": { + "operationId": "teams/create-discussion-legacy" + } + } + ], + "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." + } + } + } + }, + "deprecated": true + } + }, + "/teams/{team_id}/discussions/{discussion_number}": { + "get": { + "summary": "Get a single discussion (Legacy)", + "description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Get a single discussion`](https://developer.github.com/v3/teams/discussions/#get-a-single-discussion) endpoint.\n\nGet a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).", + "operationId": "teams/get-discussion-legacy", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/discussions/#get-a-single-discussion-legacy" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "team_id", + "description": "team_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "discussion_number", + "description": "discussion_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "author": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "body": { + "type": "string" + }, + "body_html": { + "type": "string" + }, + "body_version": { + "type": "string" + }, + "comments_count": { + "type": "number" + }, + "comments_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "last_edited_at": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "number": { + "type": "number" + }, + "pinned": { + "type": "boolean" + }, + "private": { + "type": "boolean" + }, + "team_url": { + "type": "string" + }, + "title": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "url": { + "type": "string" + }, + "reactions": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "total_count": { + "type": "number" + }, + "+1": { + "type": "number" + }, + "-1": { + "type": "number" + }, + "laugh": { + "type": "number" + }, + "confused": { + "type": "number" + }, + "heart": { + "type": "number" + }, + "hooray": { + "type": "number" + } + } + } + } + }, + "example": { + "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 + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions/42" + }, + { + "lang": "JS", + "source": "octokit.teams.getDiscussionLegacy({\n team_id: 42,\n discussion_number: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.discussion_legacy(\n 42,\n 42\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "The [reactions API](https://developer.github.com/v3/reactions/) is available for developers to preview. The `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions. See the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To receive the `reactions` object in the response for this endpoint you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.squirrel-girl-preview\n\n```", + "required": false + } + ] + }, + "x-changes": [ + { + "type": "operation", + "date": "2020-01-16", + "note": "The path for \"Get a single discussion\" changed from \"/teams/{team_id}*\" to \"/orgs/{org}/teams/{team_slug}*\"). The operation ID for the old path now has a \"-legacy\" suffix. The route with the new path has a \"-for-org\" suffix in the operation ID to avoid breaking changes", + "before": { + "operationId": "teams/get-discussion" + }, + "after": { + "operationId": "teams/get-discussion-legacy" + } + } + ], + "deprecated": true + }, + "patch": { + "summary": "Edit a discussion (Legacy)", + "description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Edit a discussion`](https://developer.github.com/v3/teams/discussions/#edit-a-discussion) endpoint.\n\nEdits 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://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).", + "operationId": "teams/update-discussion-legacy", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/discussions/#edit-a-discussion-legacy" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "team_id", + "description": "team_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "discussion_number", + "description": "discussion_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "author": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "body": { + "type": "string" + }, + "body_html": { + "type": "string" + }, + "body_version": { + "type": "string" + }, + "comments_count": { + "type": "number" + }, + "comments_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "last_edited_at": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "number": { + "type": "number" + }, + "pinned": { + "type": "boolean" + }, + "private": { + "type": "boolean" + }, + "team_url": { + "type": "string" + }, + "title": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "url": { + "type": "string" + }, + "reactions": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "total_count": { + "type": "number" + }, + "+1": { + "type": "number" + }, + "-1": { + "type": "number" + }, + "laugh": { + "type": "number" + }, + "confused": { + "type": "number" + }, + "heart": { + "type": "number" + }, + "hooray": { + "type": "number" + } + } + } + } + }, + "example": { + "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 + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions/42 \\\n -d '{\"title\":\"title\"}'" + }, + { + "lang": "JS", + "source": "octokit.teams.updateDiscussionLegacy({\n team_id: 42,\n discussion_number: 42,\n title: 'title'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.update_discussion_legacy(\n 42,\n 42,\n 'title'\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "The [reactions API](https://developer.github.com/v3/reactions/) is available for developers to preview. The `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions. See the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To receive the `reactions` object in the response for this endpoint you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.squirrel-girl-preview\n\n```", + "required": false + } + ] + }, + "x-changes": [ + { + "type": "operation", + "date": "2020-01-16", + "note": "The path for \"Edit a discussion\" changed from \"/teams/{team_id}*\" to \"/orgs/{org}/teams/{team_slug}*\"). The operation ID for the old path now has a \"-legacy\" suffix. The route with the new path has a \"-for-org\" suffix in the operation ID to avoid breaking changes", + "before": { + "operationId": "teams/update-discussion" + }, + "after": { + "operationId": "teams/update-discussion-legacy" + } + } + ], + "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" + } + } + } + }, + "deprecated": true + }, + "delete": { + "summary": "Delete a discussion (Legacy)", + "description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://developer.github.com/v3/teams/discussions/#delete-a-discussion) endpoint.\n\nDelete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).", + "operationId": "teams/delete-discussion-legacy", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/discussions/#delete-a-discussion-legacy" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "team_id", + "description": "team_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "discussion_number", + "description": "discussion_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions/42" + }, + { + "lang": "JS", + "source": "octokit.teams.deleteDiscussionLegacy({\n team_id: 42,\n discussion_number: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_discussion_legacy(\n 42,\n 42\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "operation", + "date": "2020-01-16", + "note": "The path for \"Delete a discussion\" changed from \"/teams/{team_id}*\" to \"/orgs/{org}/teams/{team_slug}*\"). The operation ID for the old path now has a \"-legacy\" suffix. The route with the new path has a \"-for-org\" suffix in the operation ID to avoid breaking changes", + "before": { + "operationId": "teams/delete-discussion" + }, + "after": { + "operationId": "teams/delete-discussion-legacy" + } + } + ], + "deprecated": true + } + }, + "/teams/{team_id}/discussions/{discussion_number}/comments": { + "get": { + "summary": "List comments (Legacy)", + "description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List comments`](https://developer.github.com/v3/teams/discussion_comments/#list-comments) endpoint.\n\nList all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).", + "operationId": "teams/list-discussion-comments-legacy", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/discussion_comments/#list-comments-legacy" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "team_id", + "description": "team_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "discussion_number", + "description": "discussion_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "direction", + "description": "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`.", + "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": { + "type": "object", + "properties": { + "author": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "body": { + "type": "string" + }, + "body_html": { + "type": "string" + }, + "body_version": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "last_edited_at": { + "type": "string" + }, + "discussion_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "number": { + "type": "number" + }, + "updated_at": { + "type": "string" + }, + "url": { + "type": "string" + }, + "reactions": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "total_count": { + "type": "number" + }, + "+1": { + "type": "number" + }, + "-1": { + "type": "number" + }, + "laugh": { + "type": "number" + }, + "confused": { + "type": "number" + }, + "heart": { + "type": "number" + }, + "hooray": { + "type": "number" + } + } + } + } + } + }, + "example": [ + { + "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 + } + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions/42/comments" + }, + { + "lang": "JS", + "source": "octokit.teams.listDiscussionCommentsLegacy({\n team_id: 42,\n discussion_number: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.discussion_comments_legacy(\n 42,\n 42\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "The [reactions API](https://developer.github.com/v3/reactions/) is available for developers to preview. The `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions. See the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To receive the `reactions` object in the response for this endpoint you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.squirrel-girl-preview\n\n```", + "required": false + } + ] + }, + "x-changes": [ + { + "type": "operation", + "date": "2020-01-16", + "note": "The path for \"List comments\" changed from \"/teams/{team_id}*\" to \"/orgs/{org}/teams/{team_slug}*\"). The operation ID for the old path now has a \"-legacy\" suffix. The route with the new path has a \"-for-org\" suffix in the operation ID to avoid breaking changes", + "before": { + "operationId": "teams/list-discussion-comments" + }, + "after": { + "operationId": "teams/list-discussion-comments-legacy" + } + } + ], + "deprecated": true + }, + "post": { + "summary": "Create a comment (Legacy)", + "description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a comment`](https://developer.github.com/v3/teams/discussion_comments/#create-a-comment) endpoint.\n\nCreates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).\n\nThis endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See \"[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)\" and \"[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)\" for details.", + "operationId": "teams/create-discussion-comment-legacy", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/discussion_comments/#create-a-comment-legacy" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "team_id", + "description": "team_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "discussion_number", + "description": "discussion_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "author": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "body": { + "type": "string" + }, + "body_html": { + "type": "string" + }, + "body_version": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "last_edited_at": { + "type": "string" + }, + "discussion_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "number": { + "type": "number" + }, + "updated_at": { + "type": "string" + }, + "url": { + "type": "string" + }, + "reactions": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "total_count": { + "type": "number" + }, + "+1": { + "type": "number" + }, + "-1": { + "type": "number" + }, + "laugh": { + "type": "number" + }, + "confused": { + "type": "number" + }, + "heart": { + "type": "number" + }, + "hooray": { + "type": "number" + } + } + } + } + }, + "example": { + "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 + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions/42/comments \\\n -d '{\"body\":\"body\"}'" + }, + { + "lang": "JS", + "source": "octokit.teams.createDiscussionCommentLegacy({\n team_id: 42,\n discussion_number: 42,\n body: 'body'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_discussion_comment_legacy(\n 42,\n 42,\n 'body'\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "The [reactions API](https://developer.github.com/v3/reactions/) is available for developers to preview. The `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions. See the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To receive the `reactions` object in the response for this endpoint you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.squirrel-girl-preview\n\n```", + "required": false + } + ], + "triggersNotification": true + }, + "x-changes": [ + { + "type": "operation", + "date": "2020-01-16", + "note": "The path for \"Create a comment\" changed from \"/teams/{team_id}*\" to \"/orgs/{org}/teams/{team_slug}*\"). The operation ID for the old path now has a \"-legacy\" suffix. The route with the new path has a \"-for-org\" suffix in the operation ID to avoid breaking changes", + "before": { + "operationId": "teams/create-discussion-comment" + }, + "after": { + "operationId": "teams/create-discussion-comment-legacy" + } + } + ], + "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?" + } + } + } + }, + "deprecated": true + } + }, + "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": { + "get": { + "summary": "Get a single comment (Legacy)", + "description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Get a single comment`](https://developer.github.com/v3/teams/discussion_comments/#get-a-single-comment) endpoint.\n\nGet a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).", + "operationId": "teams/get-discussion-comment-legacy", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/discussion_comments/#get-a-single-comment-legacy" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "team_id", + "description": "team_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "discussion_number", + "description": "discussion_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "comment_number", + "description": "comment_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "author": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "body": { + "type": "string" + }, + "body_html": { + "type": "string" + }, + "body_version": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "last_edited_at": { + "type": "string" + }, + "discussion_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "number": { + "type": "number" + }, + "updated_at": { + "type": "string" + }, + "url": { + "type": "string" + }, + "reactions": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "total_count": { + "type": "number" + }, + "+1": { + "type": "number" + }, + "-1": { + "type": "number" + }, + "laugh": { + "type": "number" + }, + "confused": { + "type": "number" + }, + "heart": { + "type": "number" + }, + "hooray": { + "type": "number" + } + } + } + } + }, + "example": { + "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 + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions/42/comments/42" + }, + { + "lang": "JS", + "source": "octokit.teams.getDiscussionCommentLegacy({\n team_id: 42,\n discussion_number: 42,\n comment_number: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.discussion_comment_legacy(\n 42,\n 42,\n 42\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "The [reactions API](https://developer.github.com/v3/reactions/) is available for developers to preview. The `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions. See the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To receive the `reactions` object in the response for this endpoint you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.squirrel-girl-preview\n\n```", + "required": false + } + ] + }, + "x-changes": [ + { + "type": "operation", + "date": "2020-01-16", + "note": "The path for \"Get a single comment\" changed from \"/teams/{team_id}*\" to \"/orgs/{org}/teams/{team_slug}*\"). The operation ID for the old path now has a \"-legacy\" suffix. The route with the new path has a \"-for-org\" suffix in the operation ID to avoid breaking changes", + "before": { + "operationId": "teams/get-discussion-comment" + }, + "after": { + "operationId": "teams/get-discussion-comment-legacy" + } + } + ], + "deprecated": true + }, + "patch": { + "summary": "Edit a comment (Legacy)", + "description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Edit a comment`](https://developer.github.com/v3/teams/discussion_comments/#edit-a-comment) endpoint.\n\nEdits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).", + "operationId": "teams/update-discussion-comment-legacy", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/discussion_comments/#edit-a-comment-legacy" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "team_id", + "description": "team_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "discussion_number", + "description": "discussion_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "comment_number", + "description": "comment_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "author": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "body": { + "type": "string" + }, + "body_html": { + "type": "string" + }, + "body_version": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "last_edited_at": { + "type": "string" + }, + "discussion_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "number": { + "type": "number" + }, + "updated_at": { + "type": "string" + }, + "url": { + "type": "string" + }, + "reactions": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "total_count": { + "type": "number" + }, + "+1": { + "type": "number" + }, + "-1": { + "type": "number" + }, + "laugh": { + "type": "number" + }, + "confused": { + "type": "number" + }, + "heart": { + "type": "number" + }, + "hooray": { + "type": "number" + } + } + } + } + }, + "example": { + "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 + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions/42/comments/42 \\\n -d '{\"body\":\"body\"}'" + }, + { + "lang": "JS", + "source": "octokit.teams.updateDiscussionCommentLegacy({\n team_id: 42,\n discussion_number: 42,\n comment_number: 42,\n body: 'body'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.update_discussion_comment_legacy(\n 42,\n 42,\n 42,\n 'body'\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "The [reactions API](https://developer.github.com/v3/reactions/) is available for developers to preview. The `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions. See the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To receive the `reactions` object in the response for this endpoint you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.squirrel-girl-preview\n\n```", + "required": false + } + ] + }, + "x-changes": [ + { + "type": "operation", + "date": "2020-01-16", + "note": "The path for \"Edit a comment\" changed from \"/teams/{team_id}*\" to \"/orgs/{org}/teams/{team_slug}*\"). The operation ID for the old path now has a \"-legacy\" suffix. The route with the new path has a \"-for-org\" suffix in the operation ID to avoid breaking changes", + "before": { + "operationId": "teams/update-discussion-comment" + }, + "after": { + "operationId": "teams/update-discussion-comment-legacy" + } + } + ], + "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?" + } + } + } + }, + "deprecated": true + }, + "delete": { + "summary": "Delete a comment (Legacy)", + "description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a comment`](https://developer.github.com/v3/teams/discussion_comments/#delete-a-comment) endpoint.\n\nDeletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).", + "operationId": "teams/delete-discussion-comment-legacy", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/discussion_comments/#delete-a-comment-legacy" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "team_id", + "description": "team_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "discussion_number", + "description": "discussion_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "comment_number", + "description": "comment_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions/42/comments/42" + }, + { + "lang": "JS", + "source": "octokit.teams.deleteDiscussionCommentLegacy({\n team_id: 42,\n discussion_number: 42,\n comment_number: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_discussion_comment_legacy(\n 42,\n 42,\n 42\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "operation", + "date": "2020-01-16", + "note": "The path for \"Delete a comment\" changed from \"/teams/{team_id}*\" to \"/orgs/{org}/teams/{team_slug}*\"). The operation ID for the old path now has a \"-legacy\" suffix. The route with the new path has a \"-for-org\" suffix in the operation ID to avoid breaking changes", + "before": { + "operationId": "teams/delete-discussion-comment" + }, + "after": { + "operationId": "teams/delete-discussion-comment-legacy" + } + } + ], + "deprecated": true + } + }, + "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": { + "get": { + "summary": "List reactions for a team discussion comment (Legacy)", + "description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://developer.github.com/v3/reactions/#list-reactions-for-a-team-discussion-comment) endpoint.\n\nList the reactions to a [team discussion comment](https://developer.github.com/v3/teams/discussion_comments/). OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).", + "operationId": "reactions/list-for-team-discussion-comment-legacy", + "tags": [ + "reactions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/reactions/#list-reactions-for-a-team-discussion-comment-legacy" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.squirrel-girl-preview+json" + }, + "required": true + }, + { + "name": "team_id", + "description": "team_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "discussion_number", + "description": "discussion_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "comment_number", + "description": "comment_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "content", + "description": "Returns a single [reaction type](https://developer.github.com/v3/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": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "content": { + "type": "string" + }, + "created_at": { + "type": "string" + } + } + } + }, + "example": [ + { + "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" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n https://api.github.com/teams/42/discussions/42/comments/42/reactions" + }, + { + "lang": "JS", + "source": "octokit.reactions.listForTeamDiscussionCommentLegacy({\n team_id: 42,\n discussion_number: 42,\n comment_number: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.for_team_discussion_comment_legacy(\n 42,\n 42,\n 42\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "APIs for managing reactions are currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\n application/vnd.github.squirrel-girl-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [ + { + "type": "operation", + "date": "2020-01-16", + "note": "The path for \"List reactions for a team discussion comment\" changed from \"/teams/{team_id}*\" to \"/orgs/{org}/teams/{team_slug}*\"). The operation ID for the old path now has a \"-legacy\" suffix. The route with the new path has a \"-for-org\" suffix in the operation ID to avoid breaking changes", + "before": { + "operationId": "reactions/list-for-team-discussion-comment" + }, + "after": { + "operationId": "reactions/list-for-team-discussion-comment-legacy" + } + } + ], + "deprecated": true + }, + "post": { + "summary": "Create reaction for a team discussion comment (Legacy)", + "description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion comment`](https://developer.github.com/v3/reactions/#create-reaction-for-a-team-discussion-comment) endpoint.\n\nCreate a reaction to a [team discussion comment](https://developer.github.com/v3/teams/discussion_comments/). OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with a `Status: 200 OK` means that you already added the reaction type to this team discussion comment.", + "operationId": "reactions/create-for-team-discussion-comment-legacy", + "tags": [ + "reactions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/reactions/#create-reaction-for-a-team-discussion-comment-legacy" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.squirrel-girl-preview+json" + }, + "required": true + }, + { + "name": "team_id", + "description": "team_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "discussion_number", + "description": "discussion_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "comment_number", + "description": "comment_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "content": { + "type": "string" + }, + "created_at": { + "type": "string" + } + } + }, + "example": { + "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" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n https://api.github.com/teams/42/discussions/42/comments/42/reactions \\\n -d '{\"content\":\"content\"}'" + }, + { + "lang": "JS", + "source": "octokit.reactions.createForTeamDiscussionCommentLegacy({\n team_id: 42,\n discussion_number: 42,\n comment_number: 42,\n content: 'content'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_for_team_discussion_comment_legacy(\n 42,\n 42,\n 42,\n 'content'\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "APIs for managing reactions are currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\n application/vnd.github.squirrel-girl-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [ + { + "type": "operation", + "date": "2020-01-16", + "note": "The path for \"Create reaction for a team discussion comment\" changed from \"/teams/{team_id}*\" to \"/orgs/{org}/teams/{team_slug}*\"). The operation ID for the old path now has a \"-legacy\" suffix. The route with the new path has a \"-for-org\" suffix in the operation ID to avoid breaking changes", + "before": { + "operationId": "reactions/create-for-team-discussion-comment" + }, + "after": { + "operationId": "reactions/create-for-team-discussion-comment-legacy" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the team discussion comment.", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ] + } + }, + "required": [ + "content" + ] + }, + "example": { + "content": "heart" + } + } + } + }, + "deprecated": true + } + }, + "/teams/{team_id}/discussions/{discussion_number}/reactions": { + "get": { + "summary": "List reactions for a team discussion (Legacy)", + "description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://developer.github.com/v3/reactions/#list-reactions-for-a-team-discussion) endpoint.\n\nList the reactions to a [team discussion](https://developer.github.com/v3/teams/discussions/). OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).", + "operationId": "reactions/list-for-team-discussion-legacy", + "tags": [ + "reactions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/reactions/#list-reactions-for-a-team-discussion-legacy" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.squirrel-girl-preview+json" + }, + "required": true + }, + { + "name": "team_id", + "description": "team_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "discussion_number", + "description": "discussion_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "content", + "description": "Returns a single [reaction type](https://developer.github.com/v3/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" + ] + } + }, + { + "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": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "content": { + "type": "string" + }, + "created_at": { + "type": "string" + } + } + } + }, + "example": [ + { + "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" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n https://api.github.com/teams/42/discussions/42/reactions" + }, + { + "lang": "JS", + "source": "octokit.reactions.listForTeamDiscussionLegacy({\n team_id: 42,\n discussion_number: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.for_team_discussion_legacy(\n 42,\n 42\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "APIs for managing reactions are currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\n application/vnd.github.squirrel-girl-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [ + { + "type": "operation", + "date": "2020-01-16", + "note": "The path for \"List reactions for a team discussion\" changed from \"/teams/{team_id}*\" to \"/orgs/{org}/teams/{team_slug}*\"). The operation ID for the old path now has a \"-legacy\" suffix. The route with the new path has a \"-for-org\" suffix in the operation ID to avoid breaking changes", + "before": { + "operationId": "reactions/list-for-team-discussion" + }, + "after": { + "operationId": "reactions/list-for-team-discussion-legacy" + } + } + ], + "deprecated": true + }, + "post": { + "summary": "Create reaction for a team discussion (Legacy)", + "description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://developer.github.com/v3/reactions/#create-reaction-for-a-team-discussion) endpoint.\n\nCreate a reaction to a [team discussion](https://developer.github.com/v3/teams/discussions/). OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with a `Status: 200 OK` means that you already added the reaction type to this team discussion.", + "operationId": "reactions/create-for-team-discussion-legacy", + "tags": [ + "reactions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/reactions/#create-reaction-for-a-team-discussion-legacy" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.squirrel-girl-preview+json" + }, + "required": true + }, + { + "name": "team_id", + "description": "team_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "discussion_number", + "description": "discussion_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "content": { + "type": "string" + }, + "created_at": { + "type": "string" + } + } + }, + "example": { + "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" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n https://api.github.com/teams/42/discussions/42/reactions \\\n -d '{\"content\":\"content\"}'" + }, + { + "lang": "JS", + "source": "octokit.reactions.createForTeamDiscussionLegacy({\n team_id: 42,\n discussion_number: 42,\n content: 'content'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_for_team_discussion_legacy(\n 42,\n 42,\n 'content'\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "APIs for managing reactions are currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\n application/vnd.github.squirrel-girl-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [ + { + "type": "operation", + "date": "2020-01-16", + "note": "The path for \"Create reaction for a team discussion\" changed from \"/teams/{team_id}*\" to \"/orgs/{org}/teams/{team_slug}*\"). The operation ID for the old path now has a \"-legacy\" suffix. The route with the new path has a \"-for-org\" suffix in the operation ID to avoid breaking changes", + "before": { + "operationId": "reactions/create-for-team-discussion" + }, + "after": { + "operationId": "reactions/create-for-team-discussion-legacy" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the team discussion.", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ] + } + }, + "required": [ + "content" + ] + }, + "example": { + "content": "heart" + } + } + } + }, + "deprecated": true + } + }, + "/teams/{team_id}/invitations": { + "get": { + "summary": "List pending team invitations (Legacy)", + "description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://developer.github.com/v3/teams/members/#list-pending-team-invitations) endpoint.\n\nThe return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`.", + "operationId": "teams/list-pending-invitations-legacy", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/members/#list-pending-team-invitations-legacy" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "team_id", + "description": "team_id parameter", + "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": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "login": { + "type": "string" + }, + "email": { + "type": "string" + }, + "role": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "inviter": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "team_count": { + "type": "number" + }, + "invitation_team_url": { + "type": "string" + } + } + } + }, + "example": [ + { + "id": 1, + "login": "monalisa", + "email": "octocat@github.com", + "role": "direct_member", + "created_at": "2016-11-30T06:46:10-08:00", + "inviter": { + "login": "other_user", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/other_user_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/other_user", + "html_url": "https://github.com/other_user", + "followers_url": "https://api.github.com/users/other_user/followers", + "following_url": "https://api.github.com/users/other_user/following{/other_user}", + "gists_url": "https://api.github.com/users/other_user/gists{/gist_id}", + "starred_url": "https://api.github.com/users/other_user/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/other_user/subscriptions", + "organizations_url": "https://api.github.com/users/other_user/orgs", + "repos_url": "https://api.github.com/users/other_user/repos", + "events_url": "https://api.github.com/users/other_user/events{/privacy}", + "received_events_url": "https://api.github.com/users/other_user/received_events", + "type": "User", + "site_admin": false + }, + "team_count": 2, + "invitation_team_url": "https://api.github.com/organizations/2/invitations/1/teams" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/invitations" + }, + { + "lang": "JS", + "source": "octokit.teams.listPendingInvitationsLegacy({\n team_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.pending_invitations_legacy(\n 42\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "operation", + "date": "2020-01-16", + "note": "The path for \"List pending team invitations\" changed from \"/teams/{team_id}*\" to \"/orgs/{org}/teams/{team_slug}*\"). The operation ID for the old path now has a \"-legacy\" suffix. The route with the new path has a \"-for-org\" suffix in the operation ID to avoid breaking changes", + "before": { + "operationId": "teams/list-pending-invitations" + }, + "after": { + "operationId": "teams/list-pending-invitations-legacy" + } + } + ], + "deprecated": true + } + }, + "/teams/{team_id}/members": { + "get": { + "summary": "List team members (Legacy)", + "description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://developer.github.com/v3/teams/members/#list-team-members) endpoint.\n\nTeam members will include the members of child teams.", + "operationId": "teams/list-members-legacy", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/members/#list-team-members-legacy" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "team_id", + "description": "team_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "role", + "description": "Filters 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.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "member", + "maintainer", + "all" + ], + "default": "all" + } + }, + { + "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": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "example": [ + { + "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 + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/members" + }, + { + "lang": "JS", + "source": "octokit.teams.listMembersLegacy({\n team_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.members_legacy(\n 42\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "operation", + "date": "2020-01-16", + "note": "The path for \"List team members\" changed from \"/teams/{team_id}*\" to \"/orgs/{org}/teams/{team_slug}*\"). The operation ID for the old path now has a \"-legacy\" suffix. The route with the new path has a \"-for-org\" suffix in the operation ID to avoid breaking changes", + "before": { + "operationId": "teams/list-members" + }, + "after": { + "operationId": "teams/list-members-legacy" + } + } + ], + "deprecated": true + } + }, + "/teams/{team_id}/members/{username}": { + "get": { + "summary": "Get team member (Legacy)", + "description": "The \"Get team member\" endpoint (described below) is deprecated.\n\nWe recommend using the [Get team membership](https://developer.github.com/v3/teams/members/#get-team-membership) endpoint instead. It allows you to get both active and pending memberships.\n\nTo list members in a team, the team must be visible to the authenticated user.", + "operationId": "teams/get-member-legacy", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/members/#get-team-member-legacy" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "team_id", + "description": "team_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Response if user is a member" + }, + "404": { + "description": "Response if user is not a member" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/members/USERNAME" + }, + { + "lang": "JS", + "source": "octokit.teams.getMemberLegacy({\n team_id: 42,\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.member_legacy(\n 42,\n 'username'\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "operation", + "date": "2020-01-16", + "note": "\"Get team member\" is now \"Get team member (Legacy)\"", + "before": { + "operationId": "teams/get-member" + }, + "after": { + "operationId": "teams/get-member-legacy" + } + } + ], + "deprecated": true + }, + "put": { + "summary": "Add team member (Legacy)", + "description": "The \"Add team member\" endpoint (described below) is deprecated.\n\nWe recommend using the [Add team membership](https://developer.github.com/v3/teams/members/#add-or-update-team-membership) endpoint instead. It allows you to invite new organization members to your teams.\n\nTeam synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\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.\n\n**Note:** 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 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](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/).\"\n\nNote that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP verbs](https://developer.github.com/v3/#http-verbs).\"", + "operationId": "teams/add-member-legacy", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/members/#add-team-member-legacy" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "team_id", + "description": "team_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + }, + "404": { + "description": "Response if team synchronization is set up" + }, + "422": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "field": { + "type": "string" + }, + "resource": { + "type": "string" + } + } + } + } + } + }, + "examples": { + "response-if-you-attempt-to-add-an-organization-to-a-team": { + "summary": "Response if you attempt to add an organization to a team", + "value": { + "message": "Cannot add an organization as a member.", + "errors": [ + { + "code": "org", + "field": "user", + "resource": "TeamMember" + } + ] + } + }, + "response-if-you-attempt-to-add-a-user-to-a-team-when-they-are-not-a-member-of-at-least-one-other-team-in-the-same-organization": { + "summary": "Response if you attempt to add a user to a team when they are not a member of at least one other team in the same organization", + "value": { + "message": "User isn't a member of this organization. Please invite them first.", + "errors": [ + { + "code": "unaffiliated", + "field": "user", + "resource": "TeamMember" + } + ] + } + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/members/USERNAME" + }, + { + "lang": "JS", + "source": "octokit.teams.addMemberLegacy({\n team_id: 42,\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.add_member_legacy(\n 42,\n 'username'\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "operation", + "date": "2020-01-16", + "note": "\"Add team member\" is now \"Add team member (Legacy)\"", + "before": { + "operationId": "teams/add-member" + }, + "after": { + "operationId": "teams/add-member-legacy" + } + } + ], + "deprecated": true + }, + "delete": { + "summary": "Remove team member (Legacy)", + "description": "The \"Remove team member\" endpoint (described below) is deprecated.\n\nWe recommend using the [Remove team membership](https://developer.github.com/v3/teams/members/#remove-team-membership) endpoint instead. It allows you to remove both active and pending memberships.\n\nTeam synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\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.\n\n**Note:** 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 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](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/).\"", + "operationId": "teams/remove-member-legacy", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/members/#remove-team-member-legacy" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "team_id", + "description": "team_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + }, + "404": { + "description": "Response if team synchronization is setup" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/members/USERNAME" + }, + { + "lang": "JS", + "source": "octokit.teams.removeMemberLegacy({\n team_id: 42,\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.remove_member_legacy(\n 42,\n 'username'\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "operation", + "date": "2020-01-16", + "note": "\"Remove team member\" is now \"Remove team member (Legacy)\"", + "before": { + "operationId": "teams/remove-member" + }, + "after": { + "operationId": "teams/remove-member-legacy" + } + } + ], + "deprecated": true + } + }, + "/teams/{team_id}/memberships/{username}": { + "get": { + "summary": "Get team membership (Legacy)", + "description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Get team membership`](https://developer.github.com/v3/teams/members/#get-team-membership) endpoint.\n\nTeam members will include the members of child teams.\n\nTo get a user's membership with a team, the team must be visible to the authenticated user.\n\n**Note:** The `role` for organization owners returns as `maintainer`. For more information about `maintainer` roles, see [Create team](https://developer.github.com/v3/teams#create-team).", + "operationId": "teams/get-membership-legacy", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/members/#get-team-membership-legacy" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "team_id", + "description": "team_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "role": { + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "examples": { + "response-if-user-has-an-active-membership-with-team": { + "summary": "Response if user has an active membership with team", + "value": { + "url": "https://api.github.com/teams/1/memberships/octocat", + "role": "member", + "state": "active" + } + }, + "response-if-user-is-a-team-maintainer": { + "summary": "Response if user is a team maintainer", + "value": { + "url": "https://api.github.com/teams/1/memberships/octocat", + "role": "maintainer", + "state": "active" + } + }, + "response-if-user-has-a-pending-membership-with-team": { + "summary": "Response if user has a pending membership with team", + "value": { + "url": "https://api.github.com/teams/1/memberships/octocat", + "role": "member", + "state": "pending" + } + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/memberships/USERNAME" + }, + { + "lang": "JS", + "source": "octokit.teams.getMembershipLegacy({\n team_id: 42,\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.membership_legacy(\n 42,\n 'username'\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "operation", + "date": "2020-01-16", + "note": "The path for \"Get team membership\" changed from \"/teams/{team_id}*\" to \"/orgs/{org}/teams/{team_slug}*\"). The operation ID for the old path now has a \"-legacy\" suffix. The route with the new path has a \"-for-org\" suffix in the operation ID to avoid breaking changes", + "before": { + "operationId": "teams/get-membership" + }, + "after": { + "operationId": "teams/get-membership-legacy" + } + } + ], + "deprecated": true + }, + "put": { + "summary": "Add or update team membership (Legacy)", + "description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Add or update team membership`](https://developer.github.com/v3/teams/members/#add-or-update-team-membership) endpoint.\n\nTeam synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nIf 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.\n\n**Note:** 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 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](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/).\"\n\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.\n\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.", + "operationId": "teams/add-or-update-membership-legacy", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/members/#add-or-update-team-membership-legacy" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "team_id", + "description": "team_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "role": { + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "examples": { + "response-if-users-membership-with-team-is-now-active": { + "summary": "Response if user's membership with team is now active", + "value": { + "url": "https://api.github.com/teams/1/memberships/octocat", + "role": "member", + "state": "active" + } + }, + "response-if-users-membership-with-team-is-now-pending": { + "summary": "Response if user's membership with team is now pending", + "value": { + "url": "https://api.github.com/teams/1/memberships/octocat", + "role": "member", + "state": "pending" + } + } + } + } + } + }, + "403": { + "description": "Response if team synchronization is set up" + }, + "422": { + "description": "Response if you attempt to add an organization to a team", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "field": { + "type": "string" + }, + "resource": { + "type": "string" + } + } + } + } + } + }, + "examples": { + "response-if-you-attempt-to-add-an-organization-to-a-team": { + "value": { + "message": "Cannot add an organization as a member.", + "errors": [ + { + "code": "org", + "field": "user", + "resource": "TeamMember" + } + ] + } + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/memberships/USERNAME \\\n -d '{\"role\":\"role\"}'" + }, + { + "lang": "JS", + "source": "octokit.teams.addOrUpdateMembershipLegacy({\n team_id: 42,\n username: 'username',\n role: 'role'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.add_or_update_membership_legacy(\n 42,\n 'username',\n 'role'\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "operation", + "date": "2020-01-16", + "note": "The path for \"Add or update team membership\" changed from \"/teams/{team_id}*\" to \"/orgs/{org}/teams/{team_slug}*\"). The operation ID for the old path now has a \"-legacy\" suffix. The route with the new path has a \"-for-org\" suffix in the operation ID to avoid breaking changes", + "before": { + "operationId": "teams/add-or-update-membership" + }, + "after": { + "operationId": "teams/add-or-update-membership-legacy" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "role": { + "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.", + "enum": [ + "member", + "maintainer" + ], + "default": "member" + } + } + } + } + } + }, + "deprecated": true + }, + "delete": { + "summary": "Remove team membership (Legacy)", + "description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Remove team membership`](https://developer.github.com/v3/teams/members/#remove-team-membership) endpoint.\n\nTeam synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\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.\n\n**Note:** 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 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](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/).\"", + "operationId": "teams/remove-membership-legacy", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/members/#remove-team-membership-legacy" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "team_id", + "description": "team_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + }, + "403": { + "description": "Response if team synchronization is set up" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/memberships/USERNAME" + }, + { + "lang": "JS", + "source": "octokit.teams.removeMembershipLegacy({\n team_id: 42,\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.remove_membership_legacy(\n 42,\n 'username'\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "operation", + "date": "2020-01-16", + "note": "The path for \"Remove team membership\" changed from \"/teams/{team_id}*\" to \"/orgs/{org}/teams/{team_slug}*\"). The operation ID for the old path now has a \"-legacy\" suffix. The route with the new path has a \"-for-org\" suffix in the operation ID to avoid breaking changes", + "before": { + "operationId": "teams/remove-membership" + }, + "after": { + "operationId": "teams/remove-membership-legacy" + } + } + ], + "deprecated": true + } + }, + "/teams/{team_id}/projects": { + "get": { + "summary": "List team projects (Legacy)", + "description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://developer.github.com/v3/teams/#list-team-projects) endpoint.\n\nLists the organization projects for a team.", + "operationId": "teams/list-projects-legacy", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/#list-team-projects-legacy" + }, + "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 + }, + { + "name": "team_id", + "description": "team_id parameter", + "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": { + "type": "object", + "properties": { + "owner_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "columns_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "organization_permission": { + "type": "string" + }, + "private": { + "type": "boolean" + }, + "permissions": { + "type": "object", + "properties": { + "read": { + "type": "boolean" + }, + "write": { + "type": "boolean" + }, + "admin": { + "type": "boolean" + } + } + } + } + } + }, + "example": [ + { + "owner_url": "https://api.github.com/orgs/octocat", + "url": "https://api.github.com/projects/1002605", + "html_url": "https://github.com/orgs/api-playground/projects/1", + "columns_url": "https://api.github.com/projects/1002605/columns", + "id": 1002605, + "node_id": "MDc6UHJvamVjdDEwMDI2MDU=", + "name": "Organization Roadmap", + "body": "High-level roadmap for the upcoming year.", + "number": 1, + "state": "open", + "creator": { + "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 + }, + "created_at": "2011-04-11T20:09:31Z", + "updated_at": "2014-03-04T18:58:10Z", + "organization_permission": "write", + "private": false, + "permissions": { + "read": true, + "write": true, + "admin": false + } + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/teams/42/projects" + }, + { + "lang": "JS", + "source": "octokit.teams.listProjectsLegacy({\n team_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.projects_legacy(\n 42\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.inertia-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [ + { + "type": "operation", + "date": "2020-01-16", + "note": "The path for \"List team projects\" changed from \"/teams/{team_id}*\" to \"/orgs/{org}/teams/{team_slug}*\"). The operation ID for the old path now has a \"-legacy\" suffix. The route with the new path has a \"-for-org\" suffix in the operation ID to avoid breaking changes", + "before": { + "operationId": "teams/list-projects" + }, + "after": { + "operationId": "teams/list-projects-legacy" + } + } + ], + "deprecated": true + } + }, + "/teams/{team_id}/projects/{project_id}": { + "get": { + "summary": "Review a team project (Legacy)", + "description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Review a team project`](https://developer.github.com/v3/teams/#review-a-team-project) endpoint.\n\nChecks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team.", + "operationId": "teams/review-project-legacy", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/#review-a-team-project-legacy" + }, + "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 + }, + { + "name": "team_id", + "description": "team_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "project_id", + "description": "project_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "owner_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "columns_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "organization_permission": { + "type": "string" + }, + "private": { + "type": "boolean" + }, + "permissions": { + "type": "object", + "properties": { + "read": { + "type": "boolean" + }, + "write": { + "type": "boolean" + }, + "admin": { + "type": "boolean" + } + } + } + } + }, + "example": { + "owner_url": "https://api.github.com/orgs/octocat", + "url": "https://api.github.com/projects/1002605", + "html_url": "https://github.com/orgs/api-playground/projects/1", + "columns_url": "https://api.github.com/projects/1002605/columns", + "id": 1002605, + "node_id": "MDc6UHJvamVjdDEwMDI2MDU=", + "name": "Organization Roadmap", + "body": "High-level roadmap for the upcoming year.", + "number": 1, + "state": "open", + "creator": { + "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 + }, + "created_at": "2011-04-11T20:09:31Z", + "updated_at": "2014-03-04T18:58:10Z", + "organization_permission": "write", + "private": false, + "permissions": { + "read": true, + "write": true, + "admin": false + } + } + } + } + }, + "404": { + "description": "Response if project is not managed by this team" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/teams/42/projects/42" + }, + { + "lang": "JS", + "source": "octokit.teams.reviewProjectLegacy({\n team_id: 42,\n project_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.review_project_legacy(\n 42,\n 42\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.inertia-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [ + { + "type": "operation", + "date": "2020-01-16", + "note": "The path for \"Review a team project\" changed from \"/teams/{team_id}*\" to \"/orgs/{org}/teams/{team_slug}*\"). The operation ID for the old path now has a \"-legacy\" suffix. The route with the new path has a \"-for-org\" suffix in the operation ID to avoid breaking changes", + "before": { + "operationId": "teams/review-project" + }, + "after": { + "operationId": "teams/review-project-legacy" + } + } + ], + "deprecated": true + }, + "put": { + "summary": "Add or update team project (Legacy)", + "description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Add or update team project`](https://developer.github.com/v3/teams/#add-or-update-team-project) endpoint.\n\nAdds 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.", + "operationId": "teams/add-or-update-project-legacy", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/#add-or-update-team-project-legacy" + }, + "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 + }, + { + "name": "team_id", + "description": "team_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "project_id", + "description": "project_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + }, + "403": { + "description": "Response if the project is not owned by the organization", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + } + } + }, + "examples": { + "response-if-the-project-is-not-owned-by-the-organization": { + "value": { + "message": "Must have admin rights to Repository.", + "documentation_url": "https://developer.github.com/v3/teams/#add-or-update-team-project" + } + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\n -H\"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/teams/42/projects/42 \\\n -d '{\"permission\":\"permission\"}'" + }, + { + "lang": "JS", + "source": "octokit.teams.addOrUpdateProjectLegacy({\n team_id: 42,\n project_id: 42,\n permission: 'permission'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.add_or_update_project_legacy(\n 42,\n 42,\n 'permission'\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.inertia-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [ + { + "type": "operation", + "date": "2020-01-16", + "note": "The path for \"Add or update team project\" changed from \"/teams/{team_id}*\" to \"/orgs/{org}/teams/{team_slug}*\"). The operation ID for the old path now has a \"-legacy\" suffix. The route with the new path has a \"-for-org\" suffix in the operation ID to avoid breaking changes", + "before": { + "operationId": "teams/add-or-update-project" + }, + "after": { + "operationId": "teams/add-or-update-project-legacy" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "permission": { + "type": "string", + "description": "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](https://developer.github.com/v3/#http-verbs).\"", + "enum": [ + "read", + "write", + "admin" + ] + } + } + } + } + } + }, + "deprecated": true + }, + "delete": { + "summary": "Remove team project (Legacy)", + "description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Remove team project`](https://developer.github.com/v3/teams/#remove-team-project) endpoint.\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.", + "operationId": "teams/remove-project-legacy", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/#remove-team-project-legacy" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "team_id", + "description": "team_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "project_id", + "description": "project_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/projects/42" + }, + { + "lang": "JS", + "source": "octokit.teams.removeProjectLegacy({\n team_id: 42,\n project_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.remove_project_legacy(\n 42,\n 42\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "operation", + "date": "2020-01-16", + "note": "The path for \"Remove team project\" changed from \"/teams/{team_id}*\" to \"/orgs/{org}/teams/{team_slug}*\"). The operation ID for the old path now has a \"-legacy\" suffix. The route with the new path has a \"-for-org\" suffix in the operation ID to avoid breaking changes", + "before": { + "operationId": "teams/remove-project" + }, + "after": { + "operationId": "teams/remove-project-legacy" + } + } + ], + "deprecated": true + } + }, + "/teams/{team_id}/repos": { + "get": { + "summary": "List team repos (Legacy)", + "description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team repos`](https://developer.github.com/v3/teams/#list-team-repos) endpoint.", + "operationId": "teams/list-repos-legacy", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/#list-team-repos-legacy" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "team_id", + "description": "team_id parameter", + "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": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + }, + "license": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "spdx_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "node_id": { + "type": "string" + } + } + } + } + } + }, + "example": [ + { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "subscribers_count": 42, + "network_count": 0, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZW1pdA==" + } + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/repos" + }, + { + "lang": "JS", + "source": "octokit.teams.listReposLegacy({\n team_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.repos_legacy(\n 42\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "operation", + "date": "2020-01-16", + "note": "The path for \"List team repos\" changed from \"/teams/{team_id}*\" to \"/orgs/{org}/teams/{team_slug}*\"). The operation ID for the old path now has a \"-legacy\" suffix. The route with the new path has a \"-for-org\" suffix in the operation ID to avoid breaking changes", + "before": { + "operationId": "teams/list-repos" + }, + "after": { + "operationId": "teams/list-repos-legacy" + } + } + ], + "deprecated": true + } + }, + "/teams/{team_id}/repos/{owner}/{repo}": { + "get": { + "summary": "Check if a team manages a repository (Legacy)", + "description": "**Note**: Repositories inherited through a parent team will also be checked.\n\n**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Check if a team manages a repository`](https://developer.github.com/v3/teams/#check-if-a-team-manages-a-repository) endpoint.\n\nYou can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://developer.github.com/v3/media/) via the `Accept` header:", + "operationId": "teams/check-manages-repo-legacy", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/#check-if-a-team-manages-a-repository-legacy" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "team_id", + "description": "team_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Alternative response with extra repository information", + "content": { + "application/vnd.github.v3.repository+json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + }, + "examples": { + "alternative-response-with-extra-repository-information": { + "summary": "Alternative response with extra repository information", + "value": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + } + } + } + } + }, + "204": { + "description": "Response if repository is managed by this team" + }, + "404": { + "description": "Response if repository is not managed by this team" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/repos/octocat/hello-world" + }, + { + "lang": "JS", + "source": "octokit.teams.checkManagesRepoLegacy({\n team_id: 42,\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.check_manages_repo_legacy(\n 42,\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "operation", + "date": "2020-01-16", + "note": "The path for \"Check if a team manages a repository\" changed from \"/teams/{team_id}*\" to \"/orgs/{org}/teams/{team_slug}*\"). The operation ID for the old path now has a \"-legacy\" suffix. The route with the new path has a \"-for-org\" suffix in the operation ID to avoid breaking changes", + "before": { + "operationId": "teams/check-manages-repo" + }, + "after": { + "operationId": "teams/check-manages-repo-legacy" + } + } + ], + "deprecated": true + }, + "put": { + "summary": "Add or update team repository (Legacy)", + "description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Add or update team repository`](https://developer.github.com/v3/teams/#add-or-update-team-repository) endpoint.\n\nTo 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.\n\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](https://developer.github.com/v3/#http-verbs).\"", + "operationId": "teams/add-or-update-repo-legacy", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/#add-or-update-team-repository-legacy" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "team_id", + "description": "team_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/repos/octocat/hello-world \\\n -d '{\"permission\":\"permission\"}'" + }, + { + "lang": "JS", + "source": "octokit.teams.addOrUpdateRepoLegacy({\n team_id: 42,\n owner: 'octocat',\n repo: 'hello-world',\n permission: 'permission'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.add_or_update_repo_legacy(\n 42,\n 'hello-world',\n 'permission'\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "operation", + "date": "2020-01-16", + "note": "The path for \"Add or update team repository\" changed from \"/teams/{team_id}*\" to \"/orgs/{org}/teams/{team_slug}*\"). The operation ID for the old path now has a \"-legacy\" suffix. The route with the new path has a \"-for-org\" suffix in the operation ID to avoid breaking changes", + "before": { + "operationId": "teams/add-or-update-repo" + }, + "after": { + "operationId": "teams/add-or-update-repo-legacy" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "permission": { + "type": "string", + "description": "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. \n \nIf no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository.", + "enum": [ + "pull", + "push", + "admin" + ] + } + } + } + } + } + }, + "deprecated": true + }, + "delete": { + "summary": "Remove team repository (Legacy)", + "description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Remove team repository`](https://developer.github.com/v3/teams/#remove-team-repository) endpoint.\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.", + "operationId": "teams/remove-repo-legacy", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/#remove-team-repository-legacy" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "team_id", + "description": "team_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/repos/octocat/hello-world" + }, + { + "lang": "JS", + "source": "octokit.teams.removeRepoLegacy({\n team_id: 42,\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.remove_repo_legacy(\n 42,\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "operation", + "date": "2020-01-16", + "note": "The path for \"Remove team repository\" changed from \"/teams/{team_id}*\" to \"/orgs/{org}/teams/{team_slug}*\"). The operation ID for the old path now has a \"-legacy\" suffix. The route with the new path has a \"-for-org\" suffix in the operation ID to avoid breaking changes", + "before": { + "operationId": "teams/remove-repo" + }, + "after": { + "operationId": "teams/remove-repo-legacy" + } + } + ], + "deprecated": true + } + }, + "/teams/{team_id}/team-sync/group-mappings": { + "get": { + "summary": "List IdP groups for a team (Legacy)", + "description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List IdP groups for a team`](https://developer.github.com/v3/teams/team_sync/#list-idp-groups-for-a-team) endpoint.\n\nTeam synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nList IdP groups connected to a team on GitHub.", + "operationId": "teams/list-id-p-groups-for-legacy", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/team_sync/#list-idp-groups-for-a-team-legacy" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "team_id", + "description": "team_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "groups": { + "type": "array", + "items": { + "type": "object", + "properties": { + "group_id": { + "type": "string" + }, + "group_name": { + "type": "string" + }, + "group_description": { + "type": "string" + } + }, + "required": [ + "group_id", + "group_name", + "group_description" + ] + } + } + } + }, + "example": { + "groups": [ + { + "group_id": "123", + "group_name": "Octocat admins", + "group_description": "The people who configure your octoworld." + }, + { + "group_id": "456", + "group_name": "Octocat docs members", + "group_description": "The people who make your octoworld come to life." + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/team-sync/group-mappings" + }, + { + "lang": "JS", + "source": "octokit.teams.listIdPGroupsForLegacy({\n team_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.id_p_groups_for_legacy(\n 42\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": false, + "githubCloudOnly": true, + "previews": [] + }, + "x-changes": [ + { + "type": "operation", + "date": "2020-01-16", + "note": "The path for \"List IdP groups for a team\" changed from \"/teams/{team_id}*\" to \"/orgs/{org}/teams/{team_slug}*\"). The operation ID for the old path now has a \"-legacy\" suffix. The route with the new path has a \"-for-org\" suffix in the operation ID to avoid breaking changes", + "before": { + "operationId": "teams/list-id-p-groups-for" + }, + "after": { + "operationId": "teams/list-id-p-groups-for-legacy" + } + } + ], + "deprecated": true + }, + "patch": { + "summary": "Create or update IdP group connections (Legacy)", + "description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create or update IdP group connections`](https://developer.github.com/v3/teams/team_sync/#create-or-update-idp-group-connections) endpoint.\n\nTeam synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nCreates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team.", + "operationId": "teams/create-or-update-id-p-group-connections-legacy", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/team_sync/#create-or-update-idp-group-connections-legacy" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "team_id", + "description": "team_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "groups": { + "type": "array", + "items": { + "type": "object", + "properties": { + "group_id": { + "type": "string" + }, + "group_name": { + "type": "string" + }, + "group_description": { + "type": "string" + } + } + } + } + } + }, + "example": { + "groups": [ + { + "group_id": "123", + "group_name": "Octocat admins", + "group_description": "The people who configure your octoworld." + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/team-sync/group-mappings \\\n -d '{\"groups\":[{\"group_id\":\"group_id\",\"group_name\":\"group_name\",\"group_description\":\"group_description\"}]}'" + }, + { + "lang": "JS", + "source": "octokit.teams.createOrUpdateIdPGroupConnectionsLegacy({\n team_id: 42,\n groups: [\n {\n group_id: 'group_id',\n group_name: 'group_name',\n group_description: 'group_description'\n }\n ]\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_or_update_id_p_group_connections_legacy(\n 42,\n [\n {\n group_id: 'group_id',\n group_name: 'group_name',\n group_description: 'group_description'\n }\n ]\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": false, + "githubCloudOnly": true, + "previews": [] + }, + "x-changes": [ + { + "type": "operation", + "date": "2020-01-16", + "note": "The path for \"Create or update IdP group connections\" changed from \"/teams/{team_id}*\" to \"/orgs/{org}/teams/{team_slug}*\"). The operation ID for the old path now has a \"-legacy\" suffix. The route with the new path has a \"-for-org\" suffix in the operation ID to avoid breaking changes", + "before": { + "operationId": "teams/create-or-update-id-p-group-connections" + }, + "after": { + "operationId": "teams/create-or-update-id-p-group-connections-legacy" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "groups": { + "type": "array", + "description": "The IdP groups you want to connect to a GitHub team. When updating, the new `groups` object will replace the original one. You must include any existing groups that you don't want to remove.", + "items": { + "type": "object", + "properties": { + "group_id": { + "type": "string", + "description": "ID of the IdP group." + }, + "group_name": { + "type": "string", + "description": "Name of the IdP group." + }, + "group_description": { + "type": "string", + "description": "Description of the IdP group." + } + }, + "required": [ + "group_id", + "group_name", + "group_description" + ] + } + } + }, + "required": [ + "groups" + ] + }, + "example": { + "groups": [ + { + "group_id": "123", + "group_name": "Octocat admins", + "description": "The people who configure your octoworld." + } + ] + } + } + } + }, + "deprecated": true + } + }, + "/teams/{team_id}/teams": { + "get": { + "summary": "List child teams (Legacy)", + "description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://developer.github.com/v3/teams/#list-child-teams) endpoint.\n\n", + "operationId": "teams/list-child-legacy", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/#list-child-teams-legacy" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "team_id", + "description": "team_id parameter", + "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 if child teams exist", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "privacy": { + "type": "string" + }, + "permission": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + }, + "parent": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "privacy": { + "type": "string" + }, + "permission": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + } + } + } + } + } + }, + "examples": { + "response-if-child-teams-exist": { + "value": [ + { + "id": 2, + "node_id": "MDQ6VGVhbTI=", + "url": "https://api.github.com/teams/2", + "name": "Original Roster", + "slug": "original-roster", + "description": "Started it all.", + "privacy": "closed", + "permission": "admin", + "members_url": "https://api.github.com/teams/2/members{/member}", + "repositories_url": "https://api.github.com/teams/2/repos", + "parent": { + "id": 1, + "node_id": "MDQ6VGVhbTE=", + "url": "https://api.github.com/teams/1", + "html_url": "https://api.github.com/teams/justice-league", + "name": "Justice League", + "slug": "justice-league", + "description": "A great team.", + "privacy": "closed", + "permission": "admin", + "members_url": "https://api.github.com/teams/1/members{/member}", + "repositories_url": "https://api.github.com/teams/1/repos" + } + } + ] + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/teams" + }, + { + "lang": "JS", + "source": "octokit.teams.listChildLegacy({\n team_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.child_legacy(\n 42\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [ + { + "type": "operation", + "date": "2020-01-16", + "note": "The path for \"List child teams\" changed from \"/teams/{team_id}*\" to \"/orgs/{org}/teams/{team_slug}*\"). The operation ID for the old path now has a \"-legacy\" suffix. The route with the new path has a \"-for-org\" suffix in the operation ID to avoid breaking changes", + "before": { + "operationId": "teams/list-child" + }, + "after": { + "operationId": "teams/list-child-legacy" + } + } + ], + "deprecated": true + } + }, + "/user": { + "get": { + "summary": "Get the authenticated user", + "description": "Lists public and private profile information when authenticated through basic auth or OAuth with the `user` scope.\n\nLists public profile information when authenticated through OAuth without the `user` scope.", + "operationId": "users/get-authenticated", + "tags": [ + "users" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/users/#get-the-authenticated-user" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "company": { + "type": "string" + }, + "blog": { + "type": "string" + }, + "location": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hireable": { + "type": "boolean" + }, + "bio": { + "type": "string" + }, + "public_repos": { + "type": "number" + }, + "public_gists": { + "type": "number" + }, + "followers": { + "type": "number" + }, + "following": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "private_gists": { + "type": "number" + }, + "total_private_repos": { + "type": "number" + }, + "owned_private_repos": { + "type": "number" + }, + "disk_usage": { + "type": "number" + }, + "collaborators": { + "type": "number" + }, + "two_factor_authentication": { + "type": "boolean" + }, + "plan": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "space": { + "type": "number" + }, + "private_repos": { + "type": "number" + }, + "collaborators": { + "type": "number" + } + } + } + } + }, + "examples": { + "response-with-public-and-private-profile-information": { + "summary": "Response with public and private profile information", + "value": { + "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, + "name": "monalisa octocat", + "company": "GitHub", + "blog": "https://github.com/blog", + "location": "San Francisco", + "email": "octocat@github.com", + "hireable": false, + "bio": "There once was...", + "public_repos": 2, + "public_gists": 1, + "followers": 20, + "following": 0, + "created_at": "2008-01-14T04:33:35Z", + "updated_at": "2008-01-14T04:33:35Z", + "private_gists": 81, + "total_private_repos": 100, + "owned_private_repos": 100, + "disk_usage": 10000, + "collaborators": 8, + "two_factor_authentication": true, + "plan": { + "name": "Medium", + "space": 400, + "private_repos": 20, + "collaborators": 0 + } + } + }, + "response-with-public-profile-information": { + "summary": "Response with public profile information", + "value": { + "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, + "name": "monalisa octocat", + "company": "GitHub", + "blog": "https://github.com/blog", + "location": "San Francisco", + "email": "octocat@github.com", + "hireable": false, + "bio": "There once was...", + "public_repos": 2, + "public_gists": 1, + "followers": 20, + "following": 0, + "created_at": "2008-01-14T04:33:35Z", + "updated_at": "2008-01-14T04:33:35Z" + } + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user" + }, + { + "lang": "JS", + "source": "octokit.users.getAuthenticated()" + }, + { + "lang": "Ruby", + "source": "octokit.authenticated()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "patch": { + "summary": "Update the authenticated user", + "description": "**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.", + "operationId": "users/update-authenticated", + "tags": [ + "users" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/users/#update-the-authenticated-user" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "company": { + "type": "string" + }, + "blog": { + "type": "string" + }, + "location": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hireable": { + "type": "boolean" + }, + "bio": { + "type": "string" + }, + "public_repos": { + "type": "number" + }, + "public_gists": { + "type": "number" + }, + "followers": { + "type": "number" + }, + "following": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "private_gists": { + "type": "number" + }, + "total_private_repos": { + "type": "number" + }, + "owned_private_repos": { + "type": "number" + }, + "disk_usage": { + "type": "number" + }, + "collaborators": { + "type": "number" + }, + "two_factor_authentication": { + "type": "boolean" + }, + "plan": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "space": { + "type": "number" + }, + "private_repos": { + "type": "number" + }, + "collaborators": { + "type": "number" + } + } + } + } + }, + "example": { + "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, + "name": "monalisa octocat", + "company": "GitHub", + "blog": "https://github.com/blog", + "location": "San Francisco", + "email": "octocat@github.com", + "hireable": false, + "bio": "There once was...", + "public_repos": 2, + "public_gists": 1, + "followers": 20, + "following": 0, + "created_at": "2008-01-14T04:33:35Z", + "updated_at": "2008-01-14T04:33:35Z", + "private_gists": 81, + "total_private_repos": 100, + "owned_private_repos": 100, + "disk_usage": 10000, + "collaborators": 8, + "two_factor_authentication": true, + "plan": { + "name": "Medium", + "space": 400, + "private_repos": 20, + "collaborators": 0 + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user \\\n -d '{\"name\":\"name\"}'" + }, + { + "lang": "JS", + "source": "octokit.users.updateAuthenticated({\n name: 'name'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.update_authenticated(\n 'name'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The new name of the user." + }, + "email": { + "type": "string", + "description": "The publicly visible email address of the user." + }, + "blog": { + "type": "string", + "description": "The new blog URL of the user." + }, + "company": { + "type": "string", + "description": "The new company of the user." + }, + "location": { + "type": "string", + "description": "The new location of the user." + }, + "hireable": { + "type": "boolean", + "description": "The new hiring availability of the user." + }, + "bio": { + "type": "string", + "description": "The new short biography of the user." + } + } + }, + "example": { + "name": "monalisa octocat", + "email": "octocat@github.com", + "blog": "https://github.com/blog", + "company": "GitHub", + "location": "San Francisco", + "hireable": true, + "bio": "There once..." + } + } + } + } + } + }, + "/user/blocks": { + "get": { + "summary": "List blocked users", + "description": "List the users you've blocked on your personal account.", + "operationId": "users/list-blocked", + "tags": [ + "users" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/users/blocking/#list-blocked-users" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "example": [ + { + "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 + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/blocks" + }, + { + "lang": "JS", + "source": "octokit.users.listBlocked()" + }, + { + "lang": "Ruby", + "source": "octokit.blocked()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/user/blocks/{username}": { + "get": { + "summary": "Check whether you've blocked a user", + "description": "If the user is blocked:\n\nIf the user is not blocked:", + "operationId": "users/check-blocked", + "tags": [ + "users" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/users/blocking/#check-whether-youve-blocked-a-user" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "If the user is blocked:" + }, + "404": { + "description": "If the user is not blocked:" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/blocks/USERNAME" + }, + { + "lang": "JS", + "source": "octokit.users.checkBlocked({\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.check_blocked(\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "put": { + "summary": "Block a user", + "description": "", + "operationId": "users/block", + "tags": [ + "users" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/users/blocking/#block-a-user" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/blocks/USERNAME" + }, + { + "lang": "JS", + "source": "octokit.users.block({\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.block(\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "delete": { + "summary": "Unblock a user", + "description": "", + "operationId": "users/unblock", + "tags": [ + "users" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/users/blocking/#unblock-a-user" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/blocks/USERNAME" + }, + { + "lang": "JS", + "source": "octokit.users.unblock({\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.unblock(\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/user/email/visibility": { + "patch": { + "summary": "Toggle primary email visibility", + "description": "Sets the visibility for your primary email addresses.", + "operationId": "users/toggle-primary-email-visibility", + "tags": [ + "users" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/users/emails/#toggle-primary-email-visibility" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "primary": { + "type": "boolean" + }, + "verified": { + "type": "boolean" + }, + "visibility": { + "type": "string" + } + } + } + }, + "example": [ + { + "email": "octocat@github.com", + "primary": true, + "verified": true, + "visibility": "private" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/email/visibility \\\n -d '{\"email\":\"octocat@github.com\",\"visibility\":\"visibility\"}'" + }, + { + "lang": "JS", + "source": "octokit.users.togglePrimaryEmailVisibility({\n email: 'octocat@github.com',\n visibility: 'visibility'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.toggle_primary_email_visibility(\n 'octocat@github.com',\n 'visibility'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "Specify the _primary_ email address that needs a visibility change." + }, + "visibility": { + "type": "string", + "description": "Use `public` to enable an authenticated user to view the specified email address, or use `private` so this primary email address cannot be seen publicly." + } + }, + "required": [ + "email", + "visibility" + ] + }, + "example": { + "email": "octocat@github.com", + "visibility": "public" + } + } + } + } + } + }, + "/user/emails": { + "get": { + "summary": "List email addresses for a user", + "description": "Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope.", + "operationId": "users/list-emails", + "tags": [ + "users" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/users/emails/#list-email-addresses-for-a-user" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "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": { + "email": { + "type": "string" + }, + "verified": { + "type": "boolean" + }, + "primary": { + "type": "boolean" + }, + "visibility": { + "type": "string" + } + } + } + }, + "example": [ + { + "email": "octocat@github.com", + "verified": true, + "primary": true, + "visibility": "public" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/emails" + }, + { + "lang": "JS", + "source": "octokit.users.listEmails()" + }, + { + "lang": "Ruby", + "source": "octokit.emails()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "post": { + "summary": "Add email address(es)", + "description": "This endpoint is accessible with the `user` scope.", + "operationId": "users/add-emails", + "tags": [ + "users" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/users/emails/#add-email-addresses" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "primary": { + "type": "boolean" + }, + "verified": { + "type": "boolean" + }, + "visibility": { + "type": "string" + } + } + } + }, + "example": [ + { + "email": "octocat@octocat.org", + "primary": false, + "verified": false, + "visibility": "public" + }, + { + "email": "octocat@github.com", + "primary": false, + "verified": false, + "visibility": null + }, + { + "email": "support@github.com", + "primary": false, + "verified": false, + "visibility": null + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/emails \\\n -d '{\"emails\":[\"octocat@github.com\"]}'" + }, + { + "lang": "JS", + "source": "octokit.users.addEmails({\n emails: [\n 'octocat@github.com'\n ]\n})" + }, + { + "lang": "Ruby", + "source": "octokit.add_emails(\n [\n 'octocat@github.com'\n ]\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "emails": { + "type": "array", + "description": "Adds one or more email addresses to your GitHub account. Must contain at least one email address. **Note:** Alternatively, you can pass a single email address or an `array` of emails addresses directly, but we recommend that you pass an object using the `emails` key.", + "items": { + "type": "string" + } + } + }, + "required": [ + "emails" + ] + }, + "example": { + "emails": [ + "octocat@github.com", + "support@github.com" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete email address(es)", + "description": "This endpoint is accessible with the `user` scope.", + "operationId": "users/delete-emails", + "tags": [ + "users" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/users/emails/#delete-email-addresses" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/emails \\\n -d '{\"emails\":[\"octocat@github.com\"]}'" + }, + { + "lang": "JS", + "source": "octokit.users.deleteEmails({\n emails: [\n 'octocat@github.com'\n ]\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_emails(\n [\n 'octocat@github.com'\n ]\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "emails": { + "type": "array", + "description": "Deletes one or more email addresses from your GitHub account. Must contain at least one email address. **Note:** Alternatively, you can pass a single email address or an `array` of emails addresses directly, but we recommend that you pass an object using the `emails` key.", + "items": { + "type": "string" + } + } + }, + "required": [ + "emails" + ] + }, + "example": { + "emails": [ + "octocat@github.com", + "support@github.com" + ] + } + } + } + } + } + }, + "/user/followers": { + "get": { + "summary": "List the authenticated user's followers", + "description": "", + "operationId": "users/list-followers-for-authenticated-user", + "tags": [ + "users" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/users/followers/#list-followers-of-a-user" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "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": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "example": [ + { + "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 + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/followers" + }, + { + "lang": "JS", + "source": "octokit.users.listFollowersForAuthenticatedUser()" + }, + { + "lang": "Ruby", + "source": "octokit.followers_for_authenticated_user()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/user/following": { + "get": { + "summary": "List who the authenticated user is following", + "description": "", + "operationId": "users/list-following-for-authenticated-user", + "tags": [ + "users" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/users/followers/#list-users-followed-by-another-user" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "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": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "example": [ + { + "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 + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/following" + }, + { + "lang": "JS", + "source": "octokit.users.listFollowingForAuthenticatedUser()" + }, + { + "lang": "Ruby", + "source": "octokit.following_for_authenticated_user()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/user/following/{username}": { + "get": { + "summary": "Check if you are following a user", + "description": "", + "operationId": "users/check-following", + "tags": [ + "users" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/users/followers/#check-if-you-are-following-a-user" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Response if you are following this user" + }, + "404": { + "description": "Response if you are not following this user" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/following/USERNAME" + }, + { + "lang": "JS", + "source": "octokit.users.checkFollowing({\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.check_following(\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "put": { + "summary": "Follow a user", + "description": "Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP verbs](https://developer.github.com/v3/#http-verbs).\"\n\nFollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope.", + "operationId": "users/follow", + "tags": [ + "users" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/users/followers/#follow-a-user" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/following/USERNAME" + }, + { + "lang": "JS", + "source": "octokit.users.follow({\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.follow(\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "delete": { + "summary": "Unfollow a user", + "description": "Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope.", + "operationId": "users/unfollow", + "tags": [ + "users" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/users/followers/#unfollow-a-user" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/following/USERNAME" + }, + { + "lang": "JS", + "source": "octokit.users.unfollow({\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.unfollow(\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/user/gpg_keys": { + "get": { + "summary": "List your GPG keys", + "description": "Lists the current user's GPG keys. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).", + "operationId": "users/list-gpg-keys", + "tags": [ + "users" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/users/gpg_keys/#list-your-gpg-keys" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "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": { + "id": { + "type": "number" + }, + "primary_key_id": { + "type": "string" + }, + "key_id": { + "type": "string" + }, + "public_key": { + "type": "string" + }, + "emails": { + "type": "array", + "items": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "verified": { + "type": "boolean" + } + } + } + }, + "subkeys": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "primary_key_id": { + "type": "number" + }, + "key_id": { + "type": "string" + }, + "public_key": { + "type": "string" + }, + "emails": { + "type": "array", + "items": {} + }, + "subkeys": { + "type": "array", + "items": {} + }, + "can_sign": { + "type": "boolean" + }, + "can_encrypt_comms": { + "type": "boolean" + }, + "can_encrypt_storage": { + "type": "boolean" + }, + "can_certify": { + "type": "boolean" + }, + "created_at": { + "type": "string" + }, + "expires_at": { + "type": "string" + } + } + } + }, + "can_sign": { + "type": "boolean" + }, + "can_encrypt_comms": { + "type": "boolean" + }, + "can_encrypt_storage": { + "type": "boolean" + }, + "can_certify": { + "type": "boolean" + }, + "created_at": { + "type": "string" + }, + "expires_at": { + "type": "string" + } + } + } + }, + "example": [ + { + "id": 3, + "primary_key_id": null, + "key_id": "3262EFF25BA0D270", + "public_key": "xsBNBFayYZ...", + "emails": [ + { + "email": "mastahyeti@users.noreply.github.com", + "verified": true + } + ], + "subkeys": [ + { + "id": 4, + "primary_key_id": 3, + "key_id": "4A595D4C72EE49C7", + "public_key": "zsBNBFayYZ...", + "emails": [], + "subkeys": [], + "can_sign": false, + "can_encrypt_comms": true, + "can_encrypt_storage": true, + "can_certify": false, + "created_at": "2016-03-24T11:31:04-06:00", + "expires_at": null + } + ], + "can_sign": true, + "can_encrypt_comms": false, + "can_encrypt_storage": false, + "can_certify": true, + "created_at": "2016-03-24T11:31:04-06:00", + "expires_at": null + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/gpg_keys" + }, + { + "lang": "JS", + "source": "octokit.users.listGpgKeys()" + }, + { + "lang": "Ruby", + "source": "octokit.gpg_keys()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "post": { + "summary": "Create a GPG key", + "description": "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](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).", + "operationId": "users/create-gpg-key", + "tags": [ + "users" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/users/gpg_keys/#create-a-gpg-key" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "primary_key_id": { + "type": "string" + }, + "key_id": { + "type": "string" + }, + "public_key": { + "type": "string" + }, + "emails": { + "type": "array", + "items": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "verified": { + "type": "boolean" + } + } + } + }, + "subkeys": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "primary_key_id": { + "type": "number" + }, + "key_id": { + "type": "string" + }, + "public_key": { + "type": "string" + }, + "emails": { + "type": "array", + "items": {} + }, + "subkeys": { + "type": "array", + "items": {} + }, + "can_sign": { + "type": "boolean" + }, + "can_encrypt_comms": { + "type": "boolean" + }, + "can_encrypt_storage": { + "type": "boolean" + }, + "can_certify": { + "type": "boolean" + }, + "created_at": { + "type": "string" + }, + "expires_at": { + "type": "string" + } + } + } + }, + "can_sign": { + "type": "boolean" + }, + "can_encrypt_comms": { + "type": "boolean" + }, + "can_encrypt_storage": { + "type": "boolean" + }, + "can_certify": { + "type": "boolean" + }, + "created_at": { + "type": "string" + }, + "expires_at": { + "type": "string" + } + } + }, + "example": { + "id": 3, + "primary_key_id": null, + "key_id": "3262EFF25BA0D270", + "public_key": "xsBNBFayYZ...", + "emails": [ + { + "email": "mastahyeti@users.noreply.github.com", + "verified": true + } + ], + "subkeys": [ + { + "id": 4, + "primary_key_id": 3, + "key_id": "4A595D4C72EE49C7", + "public_key": "zsBNBFayYZ...", + "emails": [], + "subkeys": [], + "can_sign": false, + "can_encrypt_comms": true, + "can_encrypt_storage": true, + "can_certify": false, + "created_at": "2016-03-24T11:31:04-06:00", + "expires_at": null + } + ], + "can_sign": true, + "can_encrypt_comms": false, + "can_encrypt_storage": false, + "can_certify": true, + "created_at": "2016-03-24T11:31:04-06:00", + "expires_at": null + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/gpg_keys \\\n -d '{\"armored_public_key\":\"armored_public_key\"}'" + }, + { + "lang": "JS", + "source": "octokit.users.createGpgKey({\n armored_public_key: 'armored_public_key'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_gpg_key(\n 'armored_public_key'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "armored_public_key": { + "type": "string", + "description": "Your GPG key, generated in ASCII-armored format. See \"[Generating a new GPG key](https://help.github.com/articles/generating-a-new-gpg-key/)\" for help creating a GPG key." + } + } + }, + "example": { + "armored_public_key": "-----BEGIN PGP PUBLIC KEY BLOCK-----\n...\n-----END PGP PUBLIC KEY BLOCK-----" + } + } + } + } + } + }, + "/user/gpg_keys/{gpg_key_id}": { + "get": { + "summary": "Get a single GPG key", + "description": "View 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](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).", + "operationId": "users/get-gpg-key", + "tags": [ + "users" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/users/gpg_keys/#get-a-single-gpg-key" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "gpg_key_id", + "description": "gpg_key_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "primary_key_id": { + "type": "string" + }, + "key_id": { + "type": "string" + }, + "public_key": { + "type": "string" + }, + "emails": { + "type": "array", + "items": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "verified": { + "type": "boolean" + } + } + } + }, + "subkeys": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "primary_key_id": { + "type": "number" + }, + "key_id": { + "type": "string" + }, + "public_key": { + "type": "string" + }, + "emails": { + "type": "array", + "items": {} + }, + "subkeys": { + "type": "array", + "items": {} + }, + "can_sign": { + "type": "boolean" + }, + "can_encrypt_comms": { + "type": "boolean" + }, + "can_encrypt_storage": { + "type": "boolean" + }, + "can_certify": { + "type": "boolean" + }, + "created_at": { + "type": "string" + }, + "expires_at": { + "type": "string" + } + } + } + }, + "can_sign": { + "type": "boolean" + }, + "can_encrypt_comms": { + "type": "boolean" + }, + "can_encrypt_storage": { + "type": "boolean" + }, + "can_certify": { + "type": "boolean" + }, + "created_at": { + "type": "string" + }, + "expires_at": { + "type": "string" + } + } + }, + "example": { + "id": 3, + "primary_key_id": null, + "key_id": "3262EFF25BA0D270", + "public_key": "xsBNBFayYZ...", + "emails": [ + { + "email": "mastahyeti@users.noreply.github.com", + "verified": true + } + ], + "subkeys": [ + { + "id": 4, + "primary_key_id": 3, + "key_id": "4A595D4C72EE49C7", + "public_key": "zsBNBFayYZ...", + "emails": [], + "subkeys": [], + "can_sign": false, + "can_encrypt_comms": true, + "can_encrypt_storage": true, + "can_certify": false, + "created_at": "2016-03-24T11:31:04-06:00", + "expires_at": null + } + ], + "can_sign": true, + "can_encrypt_comms": false, + "can_encrypt_storage": false, + "can_certify": true, + "created_at": "2016-03-24T11:31:04-06:00", + "expires_at": null + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/gpg_keys/42" + }, + { + "lang": "JS", + "source": "octokit.users.getGpgKey({\n gpg_key_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.gpg_key(\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "delete": { + "summary": "Delete a GPG key", + "description": "Removes 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](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).", + "operationId": "users/delete-gpg-key", + "tags": [ + "users" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/users/gpg_keys/#delete-a-gpg-key" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "gpg_key_id", + "description": "gpg_key_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/gpg_keys/42" + }, + { + "lang": "JS", + "source": "octokit.users.deleteGpgKey({\n gpg_key_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_gpg_key(\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/user/installations": { + "get": { + "summary": "List installations for a user", + "description": "Lists installations of your GitHub App that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access.\n\nYou must use a [user-to-server OAuth access token](https://developer.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint.\n\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.\n\nYou can find the permissions for the installation under the `permissions` key.", + "operationId": "apps/list-installations-for-authenticated-user", + "tags": [ + "apps" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/apps/installations/#list-installations-for-a-user" + }, + "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 + }, + { + "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": "You can find the permissions for the installation under the `permissions` key.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "total_count": { + "type": "number" + }, + "installations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "account": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "public_members_url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "access_tokens_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "app_id": { + "type": "number" + }, + "target_id": { + "type": "number" + }, + "target_type": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "metadata": { + "type": "string" + }, + "contents": { + "type": "string" + }, + "issues": { + "type": "string" + }, + "single_file": { + "type": "string" + } + } + }, + "events": { + "type": "array", + "items": { + "type": "string" + } + }, + "single_file_name": { + "type": "string" + } + }, + "required": [ + "id", + "account", + "access_tokens_url", + "repositories_url", + "html_url", + "app_id", + "target_id", + "target_type", + "permissions", + "events", + "single_file_name" + ] + } + } + } + }, + "example": { + "total_count": 2, + "installations": [ + { + "id": 1, + "account": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization" + }, + "access_tokens_url": "https://api.github.com/installations/1/access_tokens", + "repositories_url": "https://api.github.com/installation/repositories", + "html_url": "https://github.com/organizations/github/settings/installations/1", + "app_id": 1, + "target_id": 1, + "target_type": "Organization", + "permissions": { + "metadata": "read", + "contents": "read", + "issues": "write", + "single_file": "write" + }, + "events": [ + "push", + "pull_request" + ], + "single_file_name": "config.yml" + }, + { + "id": 3, + "account": { + "login": "octocat", + "id": 2, + "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 + }, + "access_tokens_url": "https://api.github.com/installations/1/access_tokens", + "repositories_url": "https://api.github.com/installation/repositories", + "html_url": "https://github.com/organizations/github/settings/installations/1", + "app_id": 1, + "target_id": 1, + "target_type": "Organization", + "permissions": { + "metadata": "read", + "contents": "read", + "issues": "write", + "single_file": "write" + }, + "events": [ + "push", + "pull_request" + ], + "single_file_name": "config.yml" + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.machine-man-preview+json\" \\\n https://api.github.com/user/installations" + }, + { + "lang": "JS", + "source": "octokit.apps.listInstallationsForAuthenticatedUser()" + }, + { + "lang": "Ruby", + "source": "octokit.installations_for_authenticated_user()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [ + { + "name": "machine-man", + "note": "To access the API with your GitHub App, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` Header for your requests.\n\n`application/vnd.github.machine-man-preview+json`", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/user/installations/{installation_id}/repositories": { + "get": { + "summary": "List repositories accessible to the user for an installation", + "description": "List repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access for an installation.\n\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.\n\nYou must use a [user-to-server OAuth access token](https://developer.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint.\n\nThe access the user has to each repository is included in the hash under the `permissions` key.", + "operationId": "apps/list-installation-repos-for-authenticated-user", + "tags": [ + "apps" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/apps/installations/#list-repositories-accessible-to-the-user-for-an-installation" + }, + "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 + }, + { + "name": "installation_id", + "description": "installation_id parameter", + "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": "The access the user has to each repository is included in the hash under the `permissions` key.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "total_count": { + "type": "number" + }, + "repositories": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + } + } + } + }, + "example": { + "total_count": 1, + "repositories": [ + { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.machine-man-preview+json\" \\\n https://api.github.com/user/installations/42/repositories" + }, + { + "lang": "JS", + "source": "octokit.apps.listInstallationReposForAuthenticatedUser({\n installation_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.installation_repos_for_authenticated_user(\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [ + { + "name": "machine-man", + "note": "To access the API with your GitHub App, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` Header for your requests.\n\n`application/vnd.github.machine-man-preview+json`", + "required": true + }, + { + "name": "mercy", + "note": "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](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.mercy-preview+json\n\n```", + "required": false + } + ] + }, + "x-changes": [] + } + }, + "/user/installations/{installation_id}/repositories/{repository_id}": { + "put": { + "summary": "Add repository to installation", + "description": "Add a single repository to an installation. The authenticated user must have admin access to the repository.\n\nYou must use a personal access token (which you can create via the [command line](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/#create-a-new-authorization)) or [Basic Authentication](https://developer.github.com/v3/auth/#basic-authentication) to access this endpoint.", + "operationId": "apps/add-repo-to-installation", + "tags": [ + "apps" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/apps/installations/#add-repository-to-installation" + }, + "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 + }, + { + "name": "installation_id", + "description": "installation_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "repository_id", + "description": "repository_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\n -H\"Accept: application/vnd.github.machine-man-preview+json\" \\\n https://api.github.com/user/installations/42/repositories/42" + }, + { + "lang": "JS", + "source": "octokit.apps.addRepoToInstallation({\n installation_id: 42,\n repository_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.add_repo_to_installation(\n 42,\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [ + { + "name": "machine-man", + "note": "To access the API with your GitHub App, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` Header for your requests.\n\n`application/vnd.github.machine-man-preview+json`", + "required": true + } + ] + }, + "x-changes": [] + }, + "delete": { + "summary": "Remove repository from installation", + "description": "Remove a single repository from an installation. The authenticated user must have admin access to the repository.\n\nYou must use a personal access token (which you can create via the [command line](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/#create-a-new-authorization)) or [Basic Authentication](https://developer.github.com/v3/auth/#basic-authentication) to access this endpoint.", + "operationId": "apps/remove-repo-from-installation", + "tags": [ + "apps" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/apps/installations/#remove-repository-from-installation" + }, + "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 + }, + { + "name": "installation_id", + "description": "installation_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "repository_id", + "description": "repository_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.machine-man-preview+json\" \\\n https://api.github.com/user/installations/42/repositories/42" + }, + { + "lang": "JS", + "source": "octokit.apps.removeRepoFromInstallation({\n installation_id: 42,\n repository_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.remove_repo_from_installation(\n 42,\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [ + { + "name": "machine-man", + "note": "To access the API with your GitHub App, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` Header for your requests.\n\n`application/vnd.github.machine-man-preview+json`", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/user/issues": { + "get": { + "summary": "List all issues across owned and member repositories assigned to the authenticated user", + "description": "**Note**: 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.\n\nBe 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](https://developer.github.com/v3/pulls/#list-pull-requests)\" endpoint.\n\n", + "operationId": "issues/list-for-authenticated-user", + "tags": [ + "issues" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/issues/#list-issues" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "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" + } + }, + { + "name": "state", + "description": "Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "open", + "closed", + "all" + ], + "default": "open" + } + }, + { + "name": "labels", + "description": "A list of comma separated label names. Example: `bug,ui,@high`", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sort", + "description": "What to sort results by. Can be either `created`, `updated`, `comments`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "created", + "updated", + "comments" + ], + "default": "created" + } + }, + { + "name": "direction", + "description": "The direction of the sort. Can be either `asc` or `desc`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "default": "desc" + } + }, + { + "name": "since", + "description": "Only issues updated at or after this time are returned. 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" + } + }, + { + "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": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repository_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "color": { + "type": "string" + }, + "default": { + "type": "boolean" + } + } + } + }, + "assignee": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "assignees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "milestone": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "open_issues": { + "type": "number" + }, + "closed_issues": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "closed_at": { + "type": "string" + }, + "due_on": { + "type": "string" + } + } + }, + "locked": { + "type": "boolean" + }, + "active_lock_reason": { + "type": "string" + }, + "comments": { + "type": "number" + }, + "pull_request": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "diff_url": { + "type": "string" + }, + "patch_url": { + "type": "string" + } + } + }, + "closed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "repository": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + } + } + } + }, + "example": [ + { + "id": 1, + "node_id": "MDU6SXNzdWUx", + "url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", + "repository_url": "https://api.github.com/repos/octocat/Hello-World", + "labels_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}", + "comments_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/comments", + "events_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/events", + "html_url": "https://github.com/octocat/Hello-World/issues/1347", + "number": 1347, + "state": "open", + "title": "Found a bug", + "body": "I'm having a problem with this.", + "user": { + "login": "octocat", + "id": 1, + "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 + }, + "labels": [ + { + "id": 208045946, + "node_id": "MDU6TGFiZWwyMDgwNDU5NDY=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", + "name": "bug", + "description": "Something isn't working", + "color": "f29513", + "default": true + } + ], + "assignee": { + "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 + }, + "assignees": [ + { + "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 + } + ], + "milestone": { + "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1", + "html_url": "https://github.com/octocat/Hello-World/milestones/v1.0", + "labels_url": "https://api.github.com/repos/octocat/Hello-World/milestones/1/labels", + "id": 1002604, + "node_id": "MDk6TWlsZXN0b25lMTAwMjYwNA==", + "number": 1, + "state": "open", + "title": "v1.0", + "description": "Tracking milestone for version 1.0", + "creator": { + "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 + }, + "open_issues": 4, + "closed_issues": 8, + "created_at": "2011-04-10T20:09:31Z", + "updated_at": "2014-03-03T18:58:10Z", + "closed_at": "2013-02-12T13:22:01Z", + "due_on": "2012-10-09T23:39:01Z" + }, + "locked": true, + "active_lock_reason": "too heated", + "comments": 0, + "pull_request": { + "url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347", + "html_url": "https://github.com/octocat/Hello-World/pull/1347", + "diff_url": "https://github.com/octocat/Hello-World/pull/1347.diff", + "patch_url": "https://github.com/octocat/Hello-World/pull/1347.patch" + }, + "closed_at": null, + "created_at": "2011-04-22T13:33:48Z", + "updated_at": "2011-04-22T13:33:48Z", + "repository": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/issues" + }, + { + "lang": "JS", + "source": "octokit.issues.listForAuthenticatedUser()" + }, + { + "lang": "Ruby", + "source": "octokit.for_authenticated_user()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [ + { + "name": "machine-man", + "note": "If an issue is opened via a GitHub App, the response will include the `performed_via_github_app` object with information about the GitHub App. For more information, see the [related blog post](https://developer.github.com/changes/2016-09-14-Integrations-Early-Access).\n\nTo receive the `performed_via_github_app` object is the response, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.machine-man-preview\n\n```", + "required": false + }, + { + "name": "squirrel-girl", + "note": "An additional `reactions` object in the issue 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://developer.github.com/v3/media) in the `Accept` header:\n\n```\n application/vnd.github.squirrel-girl-preview\n\n```\n\nThe `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions.", + "required": false + } + ] + }, + "x-changes": [] + } + }, + "/user/keys": { + "get": { + "summary": "List your public keys", + "description": "Lists 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](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).", + "operationId": "users/list-public-keys", + "tags": [ + "users" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/users/keys/#list-your-public-keys" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "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": { + "key_id": { + "type": "string" + }, + "key": { + "type": "string" + } + } + } + }, + "example": [ + { + "key_id": "1234", + "key": "2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/keys" + }, + { + "lang": "JS", + "source": "octokit.users.listPublicKeys()" + }, + { + "lang": "Ruby", + "source": "octokit.public_keys()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "post": { + "summary": "Create a public key", + "description": "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](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).", + "operationId": "users/create-public-key", + "tags": [ + "users" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/users/keys/#create-a-public-key" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "key_id": { + "type": "string" + }, + "key": { + "type": "string" + } + } + }, + "example": { + "key_id": "1234", + "key": "2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/keys \\\n -d '{\"title\":\"title\"}'" + }, + { + "lang": "JS", + "source": "octokit.users.createPublicKey({\n title: 'title'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_public_key(\n 'title'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "A descriptive name for the new key. Use a name that will help you recognize this key in your GitHub account. For example, if you're using a personal Mac, you might call this key \"Personal MacBook Air\"." + }, + "key": { + "type": "string", + "description": "The public SSH key to add to your GitHub account. See \"[Generating a new SSH key](https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/)\" for guidance on how to create a public SSH key." + } + } + }, + "example": { + "title": "octocat@octomac", + "key": "ssh-rsa AAA..." + } + } + } + } + } + }, + "/user/keys/{key_id}": { + "get": { + "summary": "Get a single public key", + "description": "View 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](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).", + "operationId": "users/get-public-key", + "tags": [ + "users" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/users/keys/#get-a-single-public-key" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "key_id", + "description": "key_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "key_id": { + "type": "string" + }, + "key": { + "type": "string" + } + } + }, + "example": { + "key_id": "1234", + "key": "2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/keys/42" + }, + { + "lang": "JS", + "source": "octokit.users.getPublicKey({\n key_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.public_key(\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "delete": { + "summary": "Delete a public key", + "description": "Removes 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](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).", + "operationId": "users/delete-public-key", + "tags": [ + "users" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/users/keys/#delete-a-public-key" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "key_id", + "description": "key_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/keys/42" + }, + { + "lang": "JS", + "source": "octokit.users.deletePublicKey({\n key_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_public_key(\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/user/marketplace_purchases": { + "get": { + "summary": "Get a user's Marketplace purchases", + "description": "Returns only active subscriptions. You must use a [user-to-server OAuth access token](https://developer.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/).", + "operationId": "apps/list-marketplace-purchases-for-authenticated-user", + "tags": [ + "apps" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/apps/marketplace/#get-a-users-marketplace-purchases" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "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": { + "billing_cycle": { + "type": "string" + }, + "next_billing_date": { + "type": "string" + }, + "unit_count": { + "type": "string" + }, + "on_free_trial": { + "type": "boolean" + }, + "free_trial_ends_on": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "account": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "url": { + "type": "string" + }, + "email": { + "type": "string" + }, + "organization_billing_email": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "plan": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "accounts_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "number": { + "type": "number" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "monthly_price_in_cents": { + "type": "number" + }, + "yearly_price_in_cents": { + "type": "number" + }, + "price_model": { + "type": "string" + }, + "has_free_trial": { + "type": "boolean" + }, + "unit_name": { + "type": "string" + }, + "state": { + "type": "string" + }, + "bullets": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "example": [ + { + "billing_cycle": "monthly", + "next_billing_date": "2017-11-11T00:00:00Z", + "unit_count": null, + "on_free_trial": true, + "free_trial_ends_on": "2017-11-11T00:00:00Z", + "updated_at": "2017-11-02T01:12:12Z", + "account": { + "login": "github", + "id": 4, + "url": "https://api.github.com/orgs/github", + "email": null, + "organization_billing_email": "billing@github.com", + "type": "Organization" + }, + "plan": { + "url": "https://api.github.com/marketplace_listing/plans/1313", + "accounts_url": "https://api.github.com/marketplace_listing/plans/1313/accounts", + "id": 1313, + "number": 3, + "name": "Pro", + "description": "A professional-grade CI solution", + "monthly_price_in_cents": 1099, + "yearly_price_in_cents": 11870, + "price_model": "flat-rate", + "has_free_trial": true, + "unit_name": null, + "state": "published", + "bullets": [ + "Up to 25 private repositories", + "11 concurrent builds" + ] + } + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/marketplace_purchases" + }, + { + "lang": "JS", + "source": "octokit.apps.listMarketplacePurchasesForAuthenticatedUser()" + }, + { + "lang": "Ruby", + "source": "octokit.marketplace_purchases_for_authenticated_user()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/user/marketplace_purchases/stubbed": { + "get": { + "summary": "Get a user's Marketplace purchases (stubbed)", + "description": "Returns only active subscriptions. You must use a [user-to-server OAuth access token](https://developer.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/).", + "operationId": "apps/list-marketplace-purchases-for-authenticated-user-stubbed", + "tags": [ + "apps" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/apps/marketplace/#get-a-users-marketplace-purchases" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "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": { + "billing_cycle": { + "type": "string" + }, + "next_billing_date": { + "type": "string" + }, + "unit_count": { + "type": "string" + }, + "on_free_trial": { + "type": "boolean" + }, + "free_trial_ends_on": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "account": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "url": { + "type": "string" + }, + "email": { + "type": "string" + }, + "organization_billing_email": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "plan": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "accounts_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "number": { + "type": "number" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "monthly_price_in_cents": { + "type": "number" + }, + "yearly_price_in_cents": { + "type": "number" + }, + "price_model": { + "type": "string" + }, + "has_free_trial": { + "type": "boolean" + }, + "unit_name": { + "type": "string" + }, + "state": { + "type": "string" + }, + "bullets": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "example": [ + { + "billing_cycle": "monthly", + "next_billing_date": "2017-11-11T00:00:00Z", + "unit_count": null, + "on_free_trial": true, + "free_trial_ends_on": "2017-11-11T00:00:00Z", + "updated_at": "2017-11-02T01:12:12Z", + "account": { + "login": "github", + "id": 4, + "url": "https://api.github.com/orgs/github", + "email": null, + "organization_billing_email": "billing@github.com", + "type": "Organization" + }, + "plan": { + "url": "https://api.github.com/marketplace_listing/plans/1313", + "accounts_url": "https://api.github.com/marketplace_listing/plans/1313/accounts", + "id": 1313, + "number": 3, + "name": "Pro", + "description": "A professional-grade CI solution", + "monthly_price_in_cents": 1099, + "yearly_price_in_cents": 11870, + "price_model": "flat-rate", + "has_free_trial": true, + "unit_name": null, + "state": "published", + "bullets": [ + "Up to 25 private repositories", + "11 concurrent builds" + ] + } + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/marketplace_purchases/stubbed" + }, + { + "lang": "JS", + "source": "octokit.apps.listMarketplacePurchasesForAuthenticatedUserStubbed()" + }, + { + "lang": "Ruby", + "source": "octokit.marketplace_purchases_for_authenticated_user_stubbed()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/user/memberships/orgs": { + "get": { + "summary": "List your organization memberships", + "description": "", + "operationId": "orgs/list-memberships", + "tags": [ + "orgs" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/orgs/members/#list-your-organization-memberships" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "state", + "description": "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.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "active", + "pending" + ] + } + }, + { + "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": { + "url": { + "type": "string" + }, + "state": { + "type": "string" + }, + "role": { + "type": "string" + }, + "organization_url": { + "type": "string" + }, + "organization": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "public_members_url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + } + } + }, + "example": [ + { + "url": "https://api.github.com/orgs/octocat/memberships/defunkt", + "state": "active", + "role": "admin", + "organization_url": "https://api.github.com/orgs/octocat", + "organization": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization" + }, + "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 + } + }, + { + "url": "https://api.github.com/orgs/invitocat/memberships/defunkt", + "state": "pending", + "role": "admin", + "organization_url": "https://api.github.com/orgs/invitocat", + "organization": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization" + }, + "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 + } + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/memberships/orgs" + }, + { + "lang": "JS", + "source": "octokit.orgs.listMemberships()" + }, + { + "lang": "Ruby", + "source": "octokit.memberships()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/user/memberships/orgs/{org}": { + "get": { + "summary": "Get your organization membership", + "description": "", + "operationId": "orgs/get-membership-for-authenticated-user", + "tags": [ + "orgs" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/orgs/members/#get-your-organization-membership" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "state": { + "type": "string" + }, + "role": { + "type": "string" + }, + "organization_url": { + "type": "string" + }, + "organization": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "public_members_url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + } + }, + "example": { + "url": "https://api.github.com/orgs/invitocat/memberships/defunkt", + "state": "pending", + "role": "admin", + "organization_url": "https://api.github.com/orgs/invitocat", + "organization": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization" + }, + "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 + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/memberships/orgs/ORG" + }, + { + "lang": "JS", + "source": "octokit.orgs.getMembershipForAuthenticatedUser({\n org: 'org'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.membership_for_authenticated_user(\n 'org'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "patch": { + "summary": "Edit your organization membership", + "description": "", + "operationId": "orgs/update-membership", + "tags": [ + "orgs" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/orgs/members/#edit-your-organization-membership" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "state": { + "type": "string" + }, + "role": { + "type": "string" + }, + "organization_url": { + "type": "string" + }, + "organization": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "public_members_url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + } + }, + "example": { + "url": "https://api.github.com/orgs/octocat/memberships/defunkt", + "state": "active", + "role": "admin", + "organization_url": "https://api.github.com/orgs/octocat", + "organization": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization" + }, + "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 + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/memberships/orgs/ORG \\\n -d '{\"state\":\"state\"}'" + }, + { + "lang": "JS", + "source": "octokit.orgs.updateMembership({\n org: 'org',\n state: 'state'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.update_membership(\n 'org',\n 'state'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "state": { + "type": "string", + "description": "The state that the membership should be in. Only `\"active\"` will be accepted.", + "enum": [ + "active" + ] + } + }, + "required": [ + "state" + ] + }, + "example": { + "state": "active" + } + } + } + } + } + }, + "/user/migrations": { + "post": { + "summary": "Start a user migration", + "description": "Initiates the generation of a user migration archive.", + "operationId": "migrations/start-for-authenticated-user", + "tags": [ + "migrations" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/migrations/users/#start-a-user-migration" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "guid": { + "type": "string" + }, + "state": { + "type": "string" + }, + "lock_repositories": { + "type": "boolean" + }, + "exclude_attachments": { + "type": "boolean" + }, + "repositories": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + } + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + }, + "example": { + "id": 79, + "owner": { + "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 + }, + "guid": "0b989ba4-242f-11e5-81e1-c7b6966d2516", + "state": "pending", + "lock_repositories": true, + "exclude_attachments": false, + "repositories": [ + { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + ], + "url": "https://api.github.com/orgs/octo-org/migrations/79", + "created_at": "2015-07-06T15:33:38-07:00", + "updated_at": "2015-07-06T15:33:38-07:00" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/migrations \\\n -d '{\"repositories\":[\"repositories\"]}'" + }, + { + "lang": "JS", + "source": "octokit.migrations.startForAuthenticatedUser({\n repositories: [\n 'repositories'\n ]\n})" + }, + { + "lang": "Ruby", + "source": "octokit.start_for_authenticated_user(\n [\n 'repositories'\n ]\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "repositories": { + "type": "array", + "description": "An array of repositories to include in the migration.", + "items": { + "type": "string" + } + }, + "lock_repositories": { + "type": "boolean", + "description": "Locks the `repositories` to prevent changes during the migration when set to `true`.", + "default": false + }, + "exclude_attachments": { + "type": "boolean", + "description": "Does not include attachments uploaded to GitHub.com in the migration data when set to `true`. Excluding attachments will reduce the migration archive file size.", + "default": false + } + }, + "required": [ + "repositories" + ] + }, + "example": { + "repositories": [ + "octocat/Hello-World" + ], + "lock_repositories": true + } + } + } + } + }, + "get": { + "summary": "List user migrations", + "description": "Lists all migrations a user has started.", + "operationId": "migrations/list-for-authenticated-user", + "tags": [ + "migrations" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/migrations/users/#list-user-migrations" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.wyandotte-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": { + "id": { + "type": "number" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "guid": { + "type": "string" + }, + "state": { + "type": "string" + }, + "lock_repositories": { + "type": "boolean" + }, + "exclude_attachments": { + "type": "boolean" + }, + "repositories": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + } + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + } + }, + "example": [ + { + "id": 79, + "owner": { + "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 + }, + "guid": "0b989ba4-242f-11e5-81e1-c7b6966d2516", + "state": "pending", + "lock_repositories": true, + "exclude_attachments": false, + "repositories": [ + { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + ], + "url": "https://api.github.com/orgs/octo-org/migrations/79", + "created_at": "2015-07-06T15:33:38-07:00", + "updated_at": "2015-07-06T15:33:38-07:00" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.wyandotte-preview+json\" \\\n https://api.github.com/user/migrations" + }, + { + "lang": "JS", + "source": "octokit.migrations.listForAuthenticatedUser()" + }, + { + "lang": "Ruby", + "source": "octokit.for_authenticated_user()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [ + { + "name": "wyandotte", + "note": "To access the Migrations API, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.wyandotte-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/user/migrations/{migration_id}": { + "get": { + "summary": "Get the status of a user migration", + "description": "Fetches a single user migration. The response includes the `state` of the migration, which can be one of the following values:\n\n* `pending` - the migration hasn't started yet.\n* `exporting` - the migration is in progress.\n* `exported` - the migration finished successfully.\n* `failed` - the migration failed.\n\nOnce the migration has been `exported` you can [download the migration archive](https://developer.github.com/v3/migrations/users/#download-a-user-migration-archive).", + "operationId": "migrations/get-status-for-authenticated-user", + "tags": [ + "migrations" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/migrations/users/#get-the-status-of-a-user-migration" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.wyandotte-preview+json" + }, + "required": true + }, + { + "name": "migration_id", + "description": "migration_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "guid": { + "type": "string" + }, + "state": { + "type": "string" + }, + "lock_repositories": { + "type": "boolean" + }, + "exclude_attachments": { + "type": "boolean" + }, + "repositories": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + } + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + }, + "example": { + "id": 79, + "owner": { + "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 + }, + "guid": "0b989ba4-242f-11e5-81e1-c7b6966d2516", + "state": "exported", + "lock_repositories": true, + "exclude_attachments": false, + "repositories": [ + { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + ], + "url": "https://api.github.com/orgs/octo-org/migrations/79", + "created_at": "2015-07-06T15:33:38-07:00", + "updated_at": "2015-07-06T15:33:38-07:00" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.wyandotte-preview+json\" \\\n https://api.github.com/user/migrations/42" + }, + { + "lang": "JS", + "source": "octokit.migrations.getStatusForAuthenticatedUser({\n migration_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.status_for_authenticated_user(\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [ + { + "name": "wyandotte", + "note": "To access the Migrations API, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.wyandotte-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/user/migrations/{migration_id}/archive": { + "get": { + "summary": "Download a user migration archive", + "description": "Fetches the URL to download the migration archive as a `tar.gz` file. Depending on the resources your repository uses, the migration archive can contain JSON files with data for these objects:\n\n* attachments\n* bases\n* commit\\_comments\n* issue\\_comments\n* issue\\_events\n* issues\n* milestones\n* organizations\n* projects\n* protected\\_branches\n* pull\\_request\\_reviews\n* pull\\_requests\n* releases\n* repositories\n* review\\_comments\n* schema\n* users\n\nThe archive will also contain an `attachments` directory that includes all attachment files uploaded to GitHub.com and a `repositories` directory that contains the repository's Git data.\n\n", + "operationId": "migrations/get-archive-for-authenticated-user", + "tags": [ + "migrations" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/migrations/users/#download-a-user-migration-archive" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.wyandotte-preview+json" + }, + "required": true + }, + { + "name": "migration_id", + "description": "migration_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "302": { + "description": "response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.wyandotte-preview+json\" \\\n https://api.github.com/user/migrations/42/archive" + }, + { + "lang": "JS", + "source": "octokit.migrations.getArchiveForAuthenticatedUser({\n migration_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.archive_for_authenticated_user(\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [ + { + "name": "wyandotte", + "note": "To access the Migrations API, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.wyandotte-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + }, + "delete": { + "summary": "Delete a user migration archive", + "description": "Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://developer.github.com/v3/migrations/users/#list-user-migrations) and [Get the status of a user migration](https://developer.github.com/v3/migrations/users/#get-the-status-of-a-user-migration) endpoints, will continue to be available even after an archive is deleted.", + "operationId": "migrations/delete-archive-for-authenticated-user", + "tags": [ + "migrations" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/migrations/users/#delete-a-user-migration-archive" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.wyandotte-preview+json" + }, + "required": true + }, + { + "name": "migration_id", + "description": "migration_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.wyandotte-preview+json\" \\\n https://api.github.com/user/migrations/42/archive" + }, + { + "lang": "JS", + "source": "octokit.migrations.deleteArchiveForAuthenticatedUser({\n migration_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.delete_archive_for_authenticated_user(\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [ + { + "name": "wyandotte", + "note": "To access the Migrations API, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.wyandotte-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/user/migrations/{migration_id}/repos/{repo_name}/lock": { + "delete": { + "summary": "Unlock a user repository", + "description": "Unlocks a repository. You can lock repositories when you [start a user migration](https://developer.github.com/v3/migrations/users/#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://developer.github.com/v3/repos/#delete-a-repository) if you no longer need the source data. Returns a status of `404 Not Found` if the repository is not locked.", + "operationId": "migrations/unlock-repo-for-authenticated-user", + "tags": [ + "migrations" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/migrations/users/#unlock-a-user-repository" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.wyandotte-preview+json" + }, + "required": true + }, + { + "name": "migration_id", + "description": "migration_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "repo_name", + "description": "repo_name parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.wyandotte-preview+json\" \\\n https://api.github.com/user/migrations/42/repos/REPO_NAME/lock" + }, + { + "lang": "JS", + "source": "octokit.migrations.unlockRepoForAuthenticatedUser({\n migration_id: 42,\n repo_name: 'repo_name'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.unlock_repo_for_authenticated_user(\n 42,\n 'repo_name'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [ + { + "name": "wyandotte", + "note": "To access the Migrations API, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.wyandotte-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/user/orgs": { + "get": { + "summary": "List your organizations", + "description": "List organizations for the authenticated user.\n\n**OAuth scope requirements**\n\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.", + "operationId": "orgs/list-for-authenticated-user", + "tags": [ + "orgs" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/orgs/#list-your-organizations" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "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": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "public_members_url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "description": { + "type": "string" + } + } + } + }, + "example": [ + { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/orgs" + }, + { + "lang": "JS", + "source": "octokit.orgs.listForAuthenticatedUser()" + }, + { + "lang": "Ruby", + "source": "octokit.for_authenticated_user()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/user/projects": { + "post": { + "summary": "Create a user project", + "description": "", + "operationId": "projects/create-for-authenticated-user", + "tags": [ + "projects" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/projects/#create-a-user-project" + }, + "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 + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "owner_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "columns_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + }, + "example": { + "owner_url": "https://api.github.com/users/octocat", + "url": "https://api.github.com/projects/1002603", + "html_url": "https://github.com/users/octocat/projects/1", + "columns_url": "https://api.github.com/projects/1002603/columns", + "id": 1002603, + "node_id": "MDc6UHJvamVjdDEwMDI2MDM=", + "name": "My Projects", + "body": "A board to manage my personal projects.", + "number": 1, + "state": "open", + "creator": { + "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 + }, + "created_at": "2011-04-10T20:09:31Z", + "updated_at": "2014-03-03T18:58:10Z" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/user/projects \\\n -d '{\"name\":\"name\"}'" + }, + { + "lang": "JS", + "source": "octokit.projects.createForAuthenticatedUser({\n name: 'name'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_for_authenticated_user(\n 'name'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.inertia-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the project." + }, + "body": { + "type": "string", + "description": "The description of the project." + } + }, + "required": [ + "name" + ] + }, + "example": { + "name": "Projects Documentation", + "body": "Developer documentation project for the developer site." + } + } + } + } + } + }, + "/user/public_emails": { + "get": { + "summary": "List public email addresses for a user", + "description": "Lists your publicly visible email address, which you can set with the [Toggle primary email visibility](https://developer.github.com/v3/users/emails/#toggle-primary-email-visibility) endpoint. This endpoint is accessible with the `user:email` scope.", + "operationId": "users/list-public-emails", + "tags": [ + "users" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/users/emails/#list-public-email-addresses-for-a-user" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "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": { + "email": { + "type": "string" + }, + "verified": { + "type": "boolean" + }, + "primary": { + "type": "boolean" + }, + "visibility": { + "type": "string" + } + } + } + }, + "example": [ + { + "email": "octocat@github.com", + "verified": true, + "primary": true, + "visibility": "public" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/public_emails" + }, + { + "lang": "JS", + "source": "octokit.users.listPublicEmails()" + }, + { + "lang": "Ruby", + "source": "octokit.public_emails()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/user/repos": { + "get": { + "summary": "List your repositories", + "description": "Lists repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access.\n\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.", + "operationId": "repos/list", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/#list-your-repositories" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "visibility", + "description": "Can be one of `all`, `public`, or `private`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "all", + "public", + "private" + ], + "default": "all" + } + }, + { + "name": "affiliation", + "description": "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.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "owner,collaborator,organization_member" + } + }, + { + "name": "type", + "description": "Can be one of `all`, `owner`, `public`, `private`, `member`. Default: `all` \n \nWill 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**.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "all", + "owner", + "public", + "private", + "member" + ], + "default": "all" + } + }, + { + "name": "sort", + "description": "Can be one of `created`, `updated`, `pushed`, `full_name`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "created", + "updated", + "pushed", + "full_name" + ], + "default": "full_name" + } + }, + { + "name": "direction", + "description": "Can be one of `asc` or `desc`. Default: `asc` when using `full_name`, otherwise `desc`", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "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": { + "418": { + "description": "Response definition missing" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/repos" + }, + { + "lang": "JS", + "source": "octokit.repos.list()" + }, + { + "lang": "Ruby", + "source": "octokit.list()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "post": { + "summary": "Creates a new repository for the authenticated user", + "description": "Creates a new repository for the authenticated user.\n\n**OAuth scope requirements**\n\nWhen using [OAuth](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include:\n\n* `public_repo` scope or `repo` scope to create a public repository\n* `repo` scope to create a private repository", + "operationId": "repos/create-for-authenticated-user", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/#create" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + } + ], + "responses": { + "201": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + }, + "example": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPOST \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/repos \\\n -d '{\"name\":\"name\"}'" + }, + { + "lang": "JS", + "source": "octokit.repos.createForAuthenticatedUser({\n name: 'name'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.create_for_authenticated_user(\n 'name'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "nebula", + "note": "You can set the visibility of a repository using the new `visibility` parameter in the [Repositories API](https://developer.github.com/v3/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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.nebula-preview+json\n\n```", + "required": false + }, + { + "name": "baptiste", + "note": "The `is_template` and `template_repository` keys are currently available for developer to preview. See [Create repository using a repository template](https://developer.github.com/v3/repos/#create-repository-using-a-repository-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](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.baptiste-preview+json\n\n```", + "required": false + } + ] + }, + "x-changes": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the repository." + }, + "description": { + "type": "string", + "description": "A short description of the repository." + }, + "homepage": { + "type": "string", + "description": "A URL with more information about the repository." + }, + "private": { + "type": "boolean", + "description": "Either `true` to create a private repository or `false` to create a public one. Creating private repositories requires a paid GitHub account.", + "default": false + }, + "visibility": { + "type": "string", + "description": "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](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-repository-visibility#about-internal-repositories)\" in the GitHub Help documentation. \nThe `visibility` parameter overrides the `private` parameter when you use both parameters with the `nebula-preview` preview header.", + "enum": [ + "public", + "private", + "visibility", + "internal" + ] + }, + "has_issues": { + "type": "boolean", + "description": "Either `true` to enable issues for this repository or `false` to disable them.", + "default": true + }, + "has_projects": { + "type": "boolean", + "description": "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.", + "default": true + }, + "has_wiki": { + "type": "boolean", + "description": "Either `true` to enable the wiki for this repository or `false` to disable it.", + "default": true + }, + "is_template": { + "type": "boolean", + "description": "Either `true` to make this repo available as a template repository or `false` to prevent it.", + "default": false + }, + "team_id": { + "type": "integer", + "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." + }, + "auto_init": { + "type": "boolean", + "description": "Pass `true` to create an initial commit with empty README.", + "default": false + }, + "gitignore_template": { + "type": "string", + "description": "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\"." + }, + "license_template": { + "type": "string", + "description": "Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://help.github.com/articles/licensing-a-repository/#searching-github-by-license-type) as the `license_template` string. For example, \"mit\" or \"mpl-2.0\"." + }, + "allow_squash_merge": { + "type": "boolean", + "description": "Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging.", + "default": true + }, + "allow_merge_commit": { + "type": "boolean", + "description": "Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits.", + "default": true + }, + "allow_rebase_merge": { + "type": "boolean", + "description": "Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging.", + "default": true + }, + "delete_branch_on_merge": { + "type": "boolean", + "description": "Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion.", + "default": false + } + }, + "required": [ + "name" + ] + }, + "example": { + "name": "Hello-World", + "description": "This is your first repository", + "homepage": "https://github.com", + "private": false, + "has_issues": true, + "has_projects": true, + "has_wiki": true + } + } + } + } + } + }, + "/user/repository_invitations": { + "get": { + "summary": "List a user's repository invitations", + "description": "When authenticating as a user, this endpoint will list all currently open repository invitations for that user.\n\n", + "operationId": "repos/list-invitations-for-authenticated-user", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/invitations/#list-a-users-repository-invitations" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "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": { + "id": { + "type": "number" + }, + "repository": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + } + } + }, + "invitee": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "inviter": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "permissions": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + } + } + } + }, + "example": [ + { + "id": 1, + "repository": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}" + }, + "invitee": { + "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 + }, + "inviter": { + "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 + }, + "permissions": "write", + "created_at": "2016-06-13T14:52:50-05:00", + "url": "https://api.github.com/user/repository_invitations/1296269", + "html_url": "https://github.com/octocat/Hello-World/invitations" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/repository_invitations" + }, + { + "lang": "JS", + "source": "octokit.repos.listInvitationsForAuthenticatedUser()" + }, + { + "lang": "Ruby", + "source": "octokit.invitations_for_authenticated_user()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/user/repository_invitations/{invitation_id}": { + "patch": { + "summary": "Accept a repository invitation", + "description": "", + "operationId": "repos/accept-invitation", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/invitations/#accept-a-repository-invitation" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "invitation_id", + "description": "invitation_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPATCH \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/repository_invitations/42" + }, + { + "lang": "JS", + "source": "octokit.repos.acceptInvitation({\n invitation_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.accept_invitation(\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "delete": { + "summary": "Decline a repository invitation", + "description": "", + "operationId": "repos/decline-invitation", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/invitations/#decline-a-repository-invitation" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "invitation_id", + "description": "invitation_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/repository_invitations/42" + }, + { + "lang": "JS", + "source": "octokit.repos.declineInvitation({\n invitation_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.decline_invitation(\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/user/starred": { + "get": { + "summary": "List repositories being starred by the authenticated user", + "description": "You can also find out _when_ stars were created by passing the following custom [media type](https://developer.github.com/v3/media/) via the `Accept` header:", + "operationId": "activity/list-repos-starred-by-authenticated-user", + "tags": [ + "activity" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/activity/starring/#list-repositories-being-starred" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "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" + } + }, + { + "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": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + } + }, + "examples": { + "default-response": { + "summary": "Default response", + "value": [ + { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + ] + } + } + }, + "application/vnd.github.v3.star+json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "starred_at": { + "type": "string" + }, + "repo": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + } + } + } + }, + "examples": { + "alternative-response-with-star-creation-timestamps": { + "summary": "Alternative response with star creation timestamps", + "value": [ + { + "starred_at": "2011-01-16T19:06:43Z", + "repo": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + } + ] + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/starred" + }, + { + "lang": "JS", + "source": "octokit.activity.listReposStarredByAuthenticatedUser()" + }, + { + "lang": "Ruby", + "source": "octokit.repos_starred_by_authenticated_user()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/user/starred/{owner}/{repo}": { + "get": { + "summary": "Check if you are starring a repository", + "description": "Requires for the user to be authenticated.", + "operationId": "activity/check-starring-repo", + "tags": [ + "activity" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/activity/starring/#check-if-you-are-starring-a-repository" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Response if this repository is starred by you" + }, + "404": { + "description": "Response if this repository is not starred by you" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/starred/octocat/hello-world" + }, + { + "lang": "JS", + "source": "octokit.activity.checkStarringRepo({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.check_starring_repo(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "put": { + "summary": "Star a repository", + "description": "Requires for the user to be authenticated.\n\nNote that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP verbs](https://developer.github.com/v3/#http-verbs).\"", + "operationId": "activity/star-repo", + "tags": [ + "activity" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/activity/starring/#star-a-repository" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/starred/octocat/hello-world" + }, + { + "lang": "JS", + "source": "octokit.activity.starRepo({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.star_repo(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "delete": { + "summary": "Unstar a repository", + "description": "Requires for the user to be authenticated.", + "operationId": "activity/unstar-repo", + "tags": [ + "activity" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/activity/starring/#unstar-a-repository" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/starred/octocat/hello-world" + }, + { + "lang": "JS", + "source": "octokit.activity.unstarRepo({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.unstar_repo(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/user/subscriptions": { + "get": { + "summary": "List repositories being watched by the authenticated user", + "description": "", + "operationId": "activity/list-watched-repos-for-authenticated-user", + "tags": [ + "activity" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/activity/watching/#list-repositories-being-watched" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "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": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + }, + "license": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "spdx_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "node_id": { + "type": "string" + } + } + } + } + } + }, + "example": [ + { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "subscribers_count": 42, + "network_count": 0, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZW1pdA==" + } + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/subscriptions" + }, + { + "lang": "JS", + "source": "octokit.activity.listWatchedReposForAuthenticatedUser()" + }, + { + "lang": "Ruby", + "source": "octokit.watched_repos_for_authenticated_user()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/user/subscriptions/{owner}/{repo}": { + "get": { + "summary": "Check if you are watching a repository (LEGACY)", + "description": "Requires for the user to be authenticated.", + "operationId": "activity/check-watching-repo-legacy", + "tags": [ + "activity" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/activity/watching/#check-if-you-are-watching-a-repository-legacy" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Response if this repository is watched by you" + }, + "404": { + "description": "Response if this repository is not watched by you" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/subscriptions/octocat/hello-world" + }, + { + "lang": "JS", + "source": "octokit.activity.checkWatchingRepoLegacy({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.check_watching_repo_legacy(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "put": { + "summary": "Watch a repository (LEGACY)", + "description": "Requires the user to be authenticated.\n\nNote that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP verbs](https://developer.github.com/v3/#http-verbs).\"", + "operationId": "activity/watch-repo-legacy", + "tags": [ + "activity" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/activity/watching/#watch-a-repository-legacy" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XPUT \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/subscriptions/octocat/hello-world" + }, + { + "lang": "JS", + "source": "octokit.activity.watchRepoLegacy({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.watch_repo_legacy(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + }, + "delete": { + "summary": "Stop watching a repository (LEGACY)", + "description": "Requires for the user to be authenticated.", + "operationId": "activity/stop-watching-repo-legacy", + "tags": [ + "activity" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/activity/watching/#stop-watching-a-repository-legacy" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "owner", + "description": "owner parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "repo parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -XDELETE \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/subscriptions/octocat/hello-world" + }, + { + "lang": "JS", + "source": "octokit.activity.stopWatchingRepoLegacy({\n owner: 'octocat',\n repo: 'hello-world'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.stop_watching_repo_legacy(\n 'hello-world'\n)" + } + ], + "x-github": { + "legacy": true, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/user/teams": { + "get": { + "summary": "List user teams", + "description": "List all of the teams across all of the organizations to which the authenticated user belongs. This method requires `user`, `repo`, or `read:org` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://developer.github.com/apps/building-oauth-apps/).", + "operationId": "teams/list-for-authenticated-user", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/teams/#list-user-teams" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "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": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": "string" + }, + "privacy": { + "type": "string" + }, + "permission": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + }, + "parent": { + "type": "string" + }, + "members_count": { + "type": "number" + }, + "repos_count": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "organization": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "public_members_url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "company": { + "type": "string" + }, + "blog": { + "type": "string" + }, + "location": { + "type": "string" + }, + "email": { + "type": "string" + }, + "is_verified": { + "type": "boolean" + }, + "has_organization_projects": { + "type": "boolean" + }, + "has_repository_projects": { + "type": "boolean" + }, + "public_repos": { + "type": "number" + }, + "public_gists": { + "type": "number" + }, + "followers": { + "type": "number" + }, + "following": { + "type": "number" + }, + "html_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "type": { + "type": "string" + } + } + } + } + } + }, + "example": [ + { + "id": 1, + "node_id": "MDQ6VGVhbTE=", + "url": "https://api.github.com/teams/1", + "html_url": "https://api.github.com/teams/justice-league", + "name": "Justice League", + "slug": "justice-league", + "description": "A great team.", + "privacy": "closed", + "permission": "admin", + "members_url": "https://api.github.com/teams/1/members{/member}", + "repositories_url": "https://api.github.com/teams/1/repos", + "parent": null, + "members_count": 3, + "repos_count": 10, + "created_at": "2017-07-14T16:53:42Z", + "updated_at": "2017-08-17T12:37:15Z", + "organization": { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization", + "name": "github", + "company": "GitHub", + "blog": "https://github.com/blog", + "location": "San Francisco", + "email": "octocat@github.com", + "is_verified": true, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 2, + "public_gists": 1, + "followers": 20, + "following": 0, + "html_url": "https://github.com/octocat", + "created_at": "2008-01-14T04:33:35Z", + "type": "Organization" + } + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/teams" + }, + { + "lang": "JS", + "source": "octokit.teams.listForAuthenticatedUser()" + }, + { + "lang": "Ruby", + "source": "octokit.for_authenticated_user()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/user/{migration_id}/repositories": { + "get": { + "summary": "List repositories for a user migration", + "description": "Lists all the repositories for this user migration.", + "operationId": "migrations/list-repos-for-user", + "tags": [ + "migrations" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/migrations/users/#list-repositories-for-a-user-migration" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.wyandotte-preview+json" + }, + "required": true + }, + { + "name": "migration_id", + "description": "migration_id parameter", + "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": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + }, + "license": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "spdx_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "node_id": { + "type": "string" + } + } + } + } + } + }, + "example": [ + { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "subscribers_count": 42, + "network_count": 0, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZW1pdA==" + } + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.wyandotte-preview+json\" \\\n https://api.github.com/user/42/repositories" + }, + { + "lang": "JS", + "source": "octokit.migrations.listReposForUser({\n migration_id: 42\n})" + }, + { + "lang": "Ruby", + "source": "octokit.repos_for_user(\n 42\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [ + { + "name": "wyandotte", + "note": "To access the Migrations API, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.wyandotte-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/users": { + "get": { + "summary": "Get all users", + "description": "Lists all users, in the order that they signed up on GitHub. This list includes personal user accounts and organization accounts.\n\nNote: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://developer.github.com/v3/#link-header) to get the URL for the next page of users.", + "operationId": "users/list", + "tags": [ + "users" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/users/#get-all-users" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "since", + "description": "The integer ID of the last User that you've seen.", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "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": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "example": [ + { + "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 + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users" + }, + { + "lang": "JS", + "source": "octokit.users.list()" + }, + { + "lang": "Ruby", + "source": "octokit.list()" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/users/{username}": { + "get": { + "summary": "Get a single user", + "description": "Provides publicly available information about someone with a GitHub account.\n\nGitHub Apps with the `Plan` user permission can use this endpoint to retrieve information about a user's GitHub plan. The GitHub App must be authenticated as a user. See \"[Identifying and authorizing users for GitHub Apps](https://developer.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/)\" for details about authentication. For an example response, see \"[Response with GitHub plan information](https://developer.github.com/v3/users/#response-with-github-plan-information).\"\n\nThe `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). 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. For more information, see [Authentication](https://developer.github.com/v3/#authentication).\n\nThe 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](https://developer.github.com/v3/users/emails/)\".", + "operationId": "users/get-by-username", + "tags": [ + "users" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/users/#get-a-single-user" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "company": { + "type": "string" + }, + "blog": { + "type": "string" + }, + "location": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hireable": { + "type": "boolean" + }, + "bio": { + "type": "string" + }, + "public_repos": { + "type": "number" + }, + "public_gists": { + "type": "number" + }, + "followers": { + "type": "number" + }, + "following": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + }, + "examples": { + "default-response": { + "summary": "Default response", + "value": { + "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, + "name": "monalisa octocat", + "company": "GitHub", + "blog": "https://github.com/blog", + "location": "San Francisco", + "email": "octocat@github.com", + "hireable": false, + "bio": "There once was...", + "public_repos": 2, + "public_gists": 1, + "followers": 20, + "following": 0, + "created_at": "2008-01-14T04:33:35Z", + "updated_at": "2008-01-14T04:33:35Z" + } + }, + "response-with-git-hub-plan-information": { + "summary": "Response with GitHub plan information", + "value": { + "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, + "name": "monalisa octocat", + "company": "GitHub", + "blog": "https://github.com/blog", + "location": "San Francisco", + "email": "octocat@github.com", + "hireable": false, + "bio": "There once was...", + "public_repos": 2, + "public_gists": 1, + "followers": 20, + "following": 0, + "created_at": "2008-01-14T04:33:35Z", + "updated_at": "2008-01-14T04:33:35Z", + "plan": { + "name": "pro", + "space": 976562499, + "collaborators": 0, + "private_repos": 9999 + } + } + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME" + }, + { + "lang": "JS", + "source": "octokit.users.getByUsername({\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.by_username(\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/users/{username}/events": { + "get": { + "summary": "List events performed by a user", + "description": "If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events.", + "operationId": "activity/list-events-for-user", + "tags": [ + "activity" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/activity/events/#list-events-performed-by-a-user" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "418": { + "description": "Response definition missing" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/events" + }, + { + "lang": "JS", + "source": "octokit.activity.listEventsForUser({\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.events_for_user(\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/users/{username}/events/orgs/{org}": { + "get": { + "summary": "List events for an organization", + "description": "This is the user's organization dashboard. You must be authenticated as the user to view this.", + "operationId": "activity/list-events-for-org", + "tags": [ + "activity" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/activity/events/#list-events-for-an-organization" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "org", + "description": "org parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "418": { + "description": "Response definition missing" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/events/orgs/ORG" + }, + { + "lang": "JS", + "source": "octokit.activity.listEventsForOrg({\n username: 'username',\n org: 'org'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.events_for_org(\n 'username',\n 'org'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/users/{username}/events/public": { + "get": { + "summary": "List public events performed by a user", + "description": "", + "operationId": "activity/list-public-events-for-user", + "tags": [ + "activity" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/activity/events/#list-public-events-performed-by-a-user" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "418": { + "description": "Response definition missing" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/events/public" + }, + { + "lang": "JS", + "source": "octokit.activity.listPublicEventsForUser({\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.public_events_for_user(\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/users/{username}/followers": { + "get": { + "summary": "List a user's followers", + "description": "", + "operationId": "users/list-followers-for-user", + "tags": [ + "users" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/users/followers/#list-followers-of-a-user" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "example": [ + { + "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 + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/followers" + }, + { + "lang": "JS", + "source": "octokit.users.listFollowersForUser({\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.followers_for_user(\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/users/{username}/following": { + "get": { + "summary": "List who a user is following", + "description": "", + "operationId": "users/list-following-for-user", + "tags": [ + "users" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/users/followers/#list-users-followed-by-another-user" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + } + }, + "example": [ + { + "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 + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/following" + }, + { + "lang": "JS", + "source": "octokit.users.listFollowingForUser({\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.following_for_user(\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/users/{username}/following/{target_user}": { + "get": { + "summary": "Check if one user follows another", + "description": "", + "operationId": "users/check-following-for-user", + "tags": [ + "users" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/users/followers/#check-if-one-user-follows-another" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "target_user", + "description": "target_user parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Response if user follows target user" + }, + "404": { + "description": "Response if user does not follow target user" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/following/TARGET_USER" + }, + { + "lang": "JS", + "source": "octokit.users.checkFollowingForUser({\n username: 'username',\n target_user: 'target_user'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.check_following_for_user(\n 'username',\n 'target_user'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/users/{username}/gists": { + "get": { + "summary": "List public gists for the specified user", + "description": "", + "operationId": "gists/list-public-for-user", + "tags": [ + "gists" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/gists/#list-a-users-gists" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "since", + "description": "This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only gists updated at or after this time are returned.", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "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": { + "url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "id": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "git_pull_url": { + "type": "string" + }, + "git_push_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "files": { + "type": "object", + "properties": { + "hello_world.rb": { + "type": "object", + "properties": { + "filename": { + "type": "string" + }, + "type": { + "type": "string" + }, + "language": { + "type": "string" + }, + "raw_url": { + "type": "string" + }, + "size": { + "type": "number" + } + } + } + } + }, + "public": { + "type": "boolean" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "description": { + "type": "string" + }, + "comments": { + "type": "number" + }, + "user": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "truncated": { + "type": "boolean" + } + } + } + }, + "example": [ + { + "url": "https://api.github.com/gists/aa5a315d61ae9438b18d", + "forks_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/forks", + "commits_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/commits", + "id": "aa5a315d61ae9438b18d", + "node_id": "MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk", + "git_pull_url": "https://gist.github.com/aa5a315d61ae9438b18d.git", + "git_push_url": "https://gist.github.com/aa5a315d61ae9438b18d.git", + "html_url": "https://gist.github.com/aa5a315d61ae9438b18d", + "files": { + "hello_world.rb": { + "filename": "hello_world.rb", + "type": "application/x-ruby", + "language": "Ruby", + "raw_url": "https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb", + "size": 167 + } + }, + "public": true, + "created_at": "2010-04-14T02:15:15Z", + "updated_at": "2011-06-20T11:34:15Z", + "description": "Hello World Examples", + "comments": 0, + "user": null, + "comments_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/comments/", + "owner": { + "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 + }, + "truncated": false + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/gists" + }, + { + "lang": "JS", + "source": "octokit.gists.listPublicForUser({\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.public_for_user(\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/users/{username}/gpg_keys": { + "get": { + "summary": "List GPG keys for a user", + "description": "Lists the GPG keys for a user. This information is accessible by anyone.", + "operationId": "users/list-gpg-keys-for-user", + "tags": [ + "users" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/users/gpg_keys/#list-gpg-keys-for-a-user" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "id": { + "type": "number" + }, + "primary_key_id": { + "type": "string" + }, + "key_id": { + "type": "string" + }, + "public_key": { + "type": "string" + }, + "emails": { + "type": "array", + "items": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "verified": { + "type": "boolean" + } + } + } + }, + "subkeys": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "primary_key_id": { + "type": "number" + }, + "key_id": { + "type": "string" + }, + "public_key": { + "type": "string" + }, + "emails": { + "type": "array", + "items": {} + }, + "subkeys": { + "type": "array", + "items": {} + }, + "can_sign": { + "type": "boolean" + }, + "can_encrypt_comms": { + "type": "boolean" + }, + "can_encrypt_storage": { + "type": "boolean" + }, + "can_certify": { + "type": "boolean" + }, + "created_at": { + "type": "string" + }, + "expires_at": { + "type": "string" + } + } + } + }, + "can_sign": { + "type": "boolean" + }, + "can_encrypt_comms": { + "type": "boolean" + }, + "can_encrypt_storage": { + "type": "boolean" + }, + "can_certify": { + "type": "boolean" + }, + "created_at": { + "type": "string" + }, + "expires_at": { + "type": "string" + } + } + } + }, + "example": [ + { + "id": 3, + "primary_key_id": null, + "key_id": "3262EFF25BA0D270", + "public_key": "xsBNBFayYZ...", + "emails": [ + { + "email": "mastahyeti@users.noreply.github.com", + "verified": true + } + ], + "subkeys": [ + { + "id": 4, + "primary_key_id": 3, + "key_id": "4A595D4C72EE49C7", + "public_key": "zsBNBFayYZ...", + "emails": [], + "subkeys": [], + "can_sign": false, + "can_encrypt_comms": true, + "can_encrypt_storage": true, + "can_certify": false, + "created_at": "2016-03-24T11:31:04-06:00", + "expires_at": null + } + ], + "can_sign": true, + "can_encrypt_comms": false, + "can_encrypt_storage": false, + "can_certify": true, + "created_at": "2016-03-24T11:31:04-06:00", + "expires_at": null + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/gpg_keys" + }, + { + "lang": "JS", + "source": "octokit.users.listGpgKeysForUser({\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.gpg_keys_for_user(\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/users/{username}/hovercard": { + "get": { + "summary": "Get contextual information about a user", + "description": "Provides 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.\n\nThe `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:", + "operationId": "users/get-context-for-user", + "tags": [ + "users" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/users/#get-contextual-information-about-a-user" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "subject_type", + "description": "Identifies 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`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "organization", + "repository", + "issue", + "pull_request" + ] + } + }, + { + "name": "subject_id", + "description": "Uses the ID for the `subject_type` you specified. **Required** when using `subject_type`.", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "contexts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "octicon": { + "type": "string" + } + } + } + } + } + }, + "example": { + "contexts": [ + { + "message": "Owns this repository", + "octicon": "repo" + } + ] + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/hovercard" + }, + { + "lang": "JS", + "source": "octokit.users.getContextForUser({\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.context_for_user(\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/users/{username}/installation": { + "get": { + "summary": "Get a user installation", + "description": "Enables an authenticated GitHub App to find the user’s installation information.\n\nYou must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.", + "operationId": "apps/get-user-installation", + "tags": [ + "apps" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/apps/#get-a-user-installation" + }, + "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 + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "account": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "repository_selection": { + "type": "string" + }, + "access_tokens_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "app_id": { + "type": "number" + }, + "target_id": { + "type": "number" + }, + "target_type": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "checks": { + "type": "string" + }, + "metadata": { + "type": "string" + }, + "contents": { + "type": "string" + } + } + }, + "events": { + "type": "array", + "items": { + "type": "string" + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "single_file_name": { + "type": "string" + } + } + }, + "example": { + "id": 3, + "account": { + "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 + }, + "repository_selection": "selected", + "access_tokens_url": "https://api.github.com/installations/3/access_tokens", + "repositories_url": "https://api.github.com/installation/repositories", + "html_url": "https://github.com/organizations/github/settings/installations/3", + "app_id": 2, + "target_id": 1, + "target_type": "User", + "permissions": { + "checks": "write", + "metadata": "read", + "contents": "read" + }, + "events": [ + "label" + ], + "created_at": "2018-02-22T20:51:14Z", + "updated_at": "2018-02-22T20:51:14Z", + "single_file_name": null + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.machine-man-preview+json\" \\\n https://api.github.com/users/USERNAME/installation" + }, + { + "lang": "JS", + "source": "octokit.apps.getUserInstallation({\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.user_installation(\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": false, + "githubCloudOnly": false, + "previews": [ + { + "name": "machine-man", + "note": "To access the API with your GitHub App, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` Header for your requests.\n\n`application/vnd.github.machine-man-preview+json`", + "required": true + } + ] + }, + "x-changes": [ + { + "type": "operation", + "date": "2019-04-10", + "note": "\"Find repository installation\" renamed to \"Get a repository installation\"", + "before": { + "operationId": "apps/find-user-installation" + }, + "after": { + "operationId": "apps/get-user-installation" + } + } + ] + } + }, + "/users/{username}/keys": { + "get": { + "summary": "List public keys for a user", + "description": "Lists the _verified_ public SSH keys for a user. This is accessible by anyone.", + "operationId": "users/list-public-keys-for-user", + "tags": [ + "users" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/users/keys/#list-public-keys-for-a-user" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "id": { + "type": "number" + }, + "key": { + "type": "string" + } + } + } + }, + "example": [ + { + "id": 1, + "key": "ssh-rsa AAA..." + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/keys" + }, + { + "lang": "JS", + "source": "octokit.users.listPublicKeysForUser({\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.public_keys_for_user(\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/users/{username}/orgs": { + "get": { + "summary": "List user organizations", + "description": "List [public organization memberships](https://help.github.com/articles/publicizing-or-concealing-organization-membership) for the specified user.\n\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 your organizations](https://developer.github.com/v3/orgs/#list-your-organizations) API instead.", + "operationId": "orgs/list-for-user", + "tags": [ + "orgs" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/orgs/#list-user-organizations" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "public_members_url": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "description": { + "type": "string" + } + } + } + }, + "example": [ + { + "login": "github", + "id": 1, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "url": "https://api.github.com/orgs/github", + "repos_url": "https://api.github.com/orgs/github/repos", + "events_url": "https://api.github.com/orgs/github/events", + "hooks_url": "https://api.github.com/orgs/github/hooks", + "issues_url": "https://api.github.com/orgs/github/issues", + "members_url": "https://api.github.com/orgs/github/members{/member}", + "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "description": "A great organization" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/orgs" + }, + { + "lang": "JS", + "source": "octokit.orgs.listForUser({\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.for_user(\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/users/{username}/projects": { + "get": { + "summary": "List user projects", + "description": "", + "operationId": "projects/list-for-user", + "tags": [ + "projects" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/projects/#list-user-projects" + }, + "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 + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "state", + "description": "Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "open", + "closed", + "all" + ], + "default": "open" + } + }, + { + "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": { + "owner_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "columns_url": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "number": { + "type": "number" + }, + "state": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + } + }, + "example": [ + { + "owner_url": "https://api.github.com/users/octocat", + "url": "https://api.github.com/projects/1002603", + "html_url": "https://github.com/users/octocat/projects/1", + "columns_url": "https://api.github.com/projects/1002603/columns", + "id": 1002603, + "node_id": "MDc6UHJvamVjdDEwMDI2MDM=", + "name": "My Projects", + "body": "A board to manage my personal projects.", + "number": 1, + "state": "open", + "creator": { + "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 + }, + "created_at": "2011-04-10T20:09:31Z", + "updated_at": "2014-03-03T18:58:10Z" + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/users/USERNAME/projects" + }, + { + "lang": "JS", + "source": "octokit.projects.listForUser({\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.for_user(\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.inertia-preview+json\n\n```", + "required": true + } + ] + }, + "x-changes": [] + } + }, + "/users/{username}/received_events": { + "get": { + "summary": "List events that a user has received", + "description": "These are events that you've received by watching repos and following users. If you are authenticated as the given user, you will see private events. Otherwise, you'll only see public events.", + "operationId": "activity/list-received-events-for-user", + "tags": [ + "activity" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/activity/events/#list-events-that-a-user-has-received" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "418": { + "description": "Response definition missing" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/received_events" + }, + { + "lang": "JS", + "source": "octokit.activity.listReceivedEventsForUser({\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.received_events_for_user(\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/users/{username}/received_events/public": { + "get": { + "summary": "List public events that a user has received", + "description": "", + "operationId": "activity/list-received-public-events-for-user", + "tags": [ + "activity" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/activity/events/#list-public-events-that-a-user-has-received" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "418": { + "description": "Response definition missing" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/received_events/public" + }, + { + "lang": "JS", + "source": "octokit.activity.listReceivedPublicEventsForUser({\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.received_public_events_for_user(\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/users/{username}/repos": { + "get": { + "summary": "List user repositories", + "description": "Lists public repositories for the specified user.", + "operationId": "repos/list-for-user", + "tags": [ + "repos" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/repos/#list-user-repositories" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "type", + "description": "Can be one of `all`, `owner`, `member`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "all", + "owner", + "member" + ], + "default": "owner" + } + }, + { + "name": "sort", + "description": "Can be one of `created`, `updated`, `pushed`, `full_name`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "created", + "updated", + "pushed", + "full_name" + ], + "default": "full_name" + } + }, + { + "name": "direction", + "description": "Can be one of `asc` or `desc`. Default: `asc` when using `full_name`, otherwise `desc`", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "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": { + "418": { + "description": "Response definition missing" + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/repos" + }, + { + "lang": "JS", + "source": "octokit.repos.listForUser({\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.for_user(\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [ + { + "name": "nebula", + "note": "You can set the visibility of a repository using the new `visibility` parameter in the [Repositories API](https://developer.github.com/v3/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://developer.github.com/v3/media) in the `Accept` header:\n\n```\napplication/vnd.github.nebula-preview+json\n\n```", + "required": false + } + ] + }, + "x-changes": [] + } + }, + "/users/{username}/starred": { + "get": { + "summary": "List repositories being starred by a user", + "description": "You can also find out _when_ stars were created by passing the following custom [media type](https://developer.github.com/v3/media/) via the `Accept` header:", + "operationId": "activity/list-repos-starred-by-user", + "tags": [ + "activity" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/activity/starring/#list-repositories-being-starred" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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" + } + }, + { + "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": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + } + }, + "examples": { + "default-response": { + "summary": "Default response", + "value": [ + { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + ] + } + } + }, + "application/vnd.github.v3.star+json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "starred_at": { + "type": "string" + }, + "repo": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "allow_rebase_merge": { + "type": "boolean" + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "allow_squash_merge": { + "type": "boolean" + }, + "allow_merge_commit": { + "type": "boolean" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + } + } + } + } + } + }, + "examples": { + "alternative-response-with-star-creation-timestamps": { + "summary": "Alternative response with star creation timestamps", + "value": [ + { + "starred_at": "2011-01-16T19:06:43Z", + "repo": { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "allow_rebase_merge": true, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "allow_squash_merge": true, + "allow_merge_commit": true, + "subscribers_count": 42, + "network_count": 0 + } + } + ] + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/starred" + }, + { + "lang": "JS", + "source": "octokit.activity.listReposStarredByUser({\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.repos_starred_by_user(\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + }, + "/users/{username}/subscriptions": { + "get": { + "summary": "List repositories being watched by a user", + "description": "", + "operationId": "activity/list-repos-watched-by-user", + "tags": [ + "activity" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://developer.github.com/v3/activity/watching/#list-repositories-being-watched" + }, + "parameters": [ + { + "name": "accept", + "description": "Setting to `application/vnd.github.v3+json` is recommended", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.v3+json" + } + }, + { + "name": "username", + "description": "username parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "id": { + "type": "number" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + } + } + }, + "private": { + "type": "boolean" + }, + "html_url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "archive_url": { + "type": "string" + }, + "assignees_url": { + "type": "string" + }, + "blobs_url": { + "type": "string" + }, + "branches_url": { + "type": "string" + }, + "collaborators_url": { + "type": "string" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "compare_url": { + "type": "string" + }, + "contents_url": { + "type": "string" + }, + "contributors_url": { + "type": "string" + }, + "deployments_url": { + "type": "string" + }, + "downloads_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "forks_url": { + "type": "string" + }, + "git_commits_url": { + "type": "string" + }, + "git_refs_url": { + "type": "string" + }, + "git_tags_url": { + "type": "string" + }, + "git_url": { + "type": "string" + }, + "issue_comment_url": { + "type": "string" + }, + "issue_events_url": { + "type": "string" + }, + "issues_url": { + "type": "string" + }, + "keys_url": { + "type": "string" + }, + "labels_url": { + "type": "string" + }, + "languages_url": { + "type": "string" + }, + "merges_url": { + "type": "string" + }, + "milestones_url": { + "type": "string" + }, + "notifications_url": { + "type": "string" + }, + "pulls_url": { + "type": "string" + }, + "releases_url": { + "type": "string" + }, + "ssh_url": { + "type": "string" + }, + "stargazers_url": { + "type": "string" + }, + "statuses_url": { + "type": "string" + }, + "subscribers_url": { + "type": "string" + }, + "subscription_url": { + "type": "string" + }, + "tags_url": { + "type": "string" + }, + "teams_url": { + "type": "string" + }, + "trees_url": { + "type": "string" + }, + "clone_url": { + "type": "string" + }, + "mirror_url": { + "type": "string" + }, + "hooks_url": { + "type": "string" + }, + "svn_url": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "language": { + "type": "string" + }, + "forks_count": { + "type": "number" + }, + "stargazers_count": { + "type": "number" + }, + "watchers_count": { + "type": "number" + }, + "size": { + "type": "number" + }, + "default_branch": { + "type": "string" + }, + "open_issues_count": { + "type": "number" + }, + "is_template": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_issues": { + "type": "boolean" + }, + "has_projects": { + "type": "boolean" + }, + "has_wiki": { + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_downloads": { + "type": "boolean" + }, + "archived": { + "type": "boolean" + }, + "disabled": { + "type": "boolean" + }, + "visibility": { + "type": "string" + }, + "pushed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + } + } + }, + "template_repository": { + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "subscribers_count": { + "type": "number" + }, + "network_count": { + "type": "number" + }, + "license": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "spdx_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "node_id": { + "type": "string" + } + } + } + } + } + }, + "example": [ + { + "id": 1296269, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "name": "Hello-World", + "full_name": "octocat/Hello-World", + "owner": { + "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 + }, + "private": false, + "html_url": "https://github.com/octocat/Hello-World", + "description": "This your first repo!", + "fork": false, + "url": "https://api.github.com/repos/octocat/Hello-World", + "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors", + "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments", + "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "http://api.github.com/repos/octocat/Hello-World/events", + "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks", + "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages", + "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription", + "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams", + "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "homepage": "https://github.com", + "language": null, + "forks_count": 9, + "stargazers_count": 80, + "watchers_count": 80, + "size": 108, + "default_branch": "master", + "open_issues_count": 0, + "is_template": true, + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "has_issues": true, + "has_projects": true, + "has_wiki": true, + "has_pages": false, + "has_downloads": true, + "archived": false, + "disabled": false, + "visibility": "public", + "pushed_at": "2011-01-26T19:06:43Z", + "created_at": "2011-01-26T19:01:12Z", + "updated_at": "2011-01-26T19:14:43Z", + "permissions": { + "admin": false, + "push": false, + "pull": true + }, + "template_repository": null, + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "subscribers_count": 42, + "network_count": 0, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZW1pdA==" + } + } + ] + } + } + } + }, + "x-code-samples": [ + { + "lang": "Shell", + "source": "curl \\\n -H\"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/subscriptions" + }, + { + "lang": "JS", + "source": "octokit.activity.listReposWatchedByUser({\n username: 'username'\n})" + }, + { + "lang": "Ruby", + "source": "octokit.repos_watched_by_user(\n 'username'\n)" + } + ], + "x-github": { + "legacy": false, + "enabledForApps": true, + "githubCloudOnly": false, + "previews": [] + }, + "x-changes": [] + } + } + } +}