From 954b0967be63b9ab5be75dcd8b59f266f856656a Mon Sep 17 00:00:00 2001 From: Octokit Bot <33075676+octokitbot@users.noreply.github.com> Date: Thu, 14 Jan 2021 16:43:52 -0800 Subject: [PATCH] feat: `octokit.apps.scopeToken()` (#316) --- docs/actions/setAllowedActionsOrganization.md | 11 +- docs/actions/setAllowedActionsRepository.md | 11 +- docs/apps/addRepoToInstallation.md | 2 +- docs/apps/checkToken.md | 2 + docs/apps/deleteAuthorization.md | 2 + docs/apps/deleteToken.md | 2 + docs/apps/removeRepoFromInstallation.md | 2 +- docs/apps/resetToken.md | 2 + docs/apps/scopeToken.md | 218 +++++++ .../setAllowedActionsEnterprise.md | 11 +- docs/licenses/getForRepo.md | 2 +- docs/pulls/createReview.md | 2 +- docs/pulls/merge.md | 2 +- docs/pulls/requestReviewers.md | 2 +- docs/repos/deleteDeployment.md | 2 +- .../update-endpoints/generated/endpoints.json | 600 ++++++++++++++++-- src/generated/endpoints.ts | 41 +- src/generated/method-types.ts | 24 +- .../parameters-and-response-types.ts | 8 + 19 files changed, 846 insertions(+), 100 deletions(-) create mode 100644 docs/apps/scopeToken.md diff --git a/docs/actions/setAllowedActionsOrganization.md b/docs/actions/setAllowedActionsOrganization.md index 624969379..7fac2fe02 100644 --- a/docs/actions/setAllowedActionsOrganization.md +++ b/docs/actions/setAllowedActionsOrganization.md @@ -1,6 +1,6 @@ --- name: Set allowed actions for an organization -example: octokit.actions.setAllowedActionsOrganization({ org }) +example: octokit.actions.setAllowedActionsOrganization({ org, github_owned_allowed, verified_allowed, patterns_allowed }) route: PUT /orgs/{org}/actions/permissions/selected-actions scope: actions type: API method @@ -19,6 +19,9 @@ You must authenticate using an access token with the `admin:org` scope to use th ```js octokit.actions.setAllowedActionsOrganization({ org, + github_owned_allowed, + verified_allowed, + patterns_allowed, }); ``` @@ -36,17 +39,17 @@ octokit.actions.setAllowedActionsOrganization({ orgyes -github_owned_allowedno +github_owned_allowedyes Whether GitHub-owned actions are allowed. For example, this includes the actions in the `actions` organization. -verified_allowedno +verified_allowedyes Whether actions in GitHub Marketplace from verified creators are allowed. Set to `true` to allow all GitHub Marketplace actions by verified creators. -patterns_allowedno +patterns_allowedyes Specifies a list of string-matching patterns to allow specific action(s). Wildcards, tags, and SHAs are allowed. For example, `monalisa/octocat@*`, `monalisa/octocat@v2`, `monalisa/*`." diff --git a/docs/actions/setAllowedActionsRepository.md b/docs/actions/setAllowedActionsRepository.md index 53be022ce..305f7aad0 100644 --- a/docs/actions/setAllowedActionsRepository.md +++ b/docs/actions/setAllowedActionsRepository.md @@ -1,6 +1,6 @@ --- name: Set allowed actions for a repository -example: octokit.actions.setAllowedActionsRepository({ owner, repo }) +example: octokit.actions.setAllowedActionsRepository({ owner, repo, github_owned_allowed, verified_allowed, patterns_allowed }) route: PUT /repos/{owner}/{repo}/actions/permissions/selected-actions scope: actions type: API method @@ -20,6 +20,9 @@ You must authenticate using an access token with the `repo` scope to use this en octokit.actions.setAllowedActionsRepository({ owner, repo, + github_owned_allowed, + verified_allowed, + patterns_allowed, }); ``` @@ -40,17 +43,17 @@ octokit.actions.setAllowedActionsRepository({ repoyes -github_owned_allowedno +github_owned_allowedyes Whether GitHub-owned actions are allowed. For example, this includes the actions in the `actions` organization. -verified_allowedno +verified_allowedyes Whether actions in GitHub Marketplace from verified creators are allowed. Set to `true` to allow all GitHub Marketplace actions by verified creators. -patterns_allowedno +patterns_allowedyes Specifies a list of string-matching patterns to allow specific action(s). Wildcards, tags, and SHAs are allowed. For example, `monalisa/octocat@*`, `monalisa/octocat@v2`, `monalisa/*`." diff --git a/docs/apps/addRepoToInstallation.md b/docs/apps/addRepoToInstallation.md index 29f31b734..5d8fd5b2c 100644 --- a/docs/apps/addRepoToInstallation.md +++ b/docs/apps/addRepoToInstallation.md @@ -10,7 +10,7 @@ type: API method Add a single repository to an installation. The authenticated user must have admin access to the repository. -You 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://docs.github.com/rest/reference/oauth-authorizations#create-a-new-authorization) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to access this endpoint. +You must use a personal access token (which you can create via the [command line](https://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. ```js octokit.apps.addRepoToInstallation({ diff --git a/docs/apps/checkToken.md b/docs/apps/checkToken.md index d8b107626..9cc7fa800 100644 --- a/docs/apps/checkToken.md +++ b/docs/apps/checkToken.md @@ -30,6 +30,8 @@ octokit.apps.checkToken({ client_idyes +The client ID of your GitHub app. + access_tokenyes diff --git a/docs/apps/deleteAuthorization.md b/docs/apps/deleteAuthorization.md index 60d89d040..807270061 100644 --- a/docs/apps/deleteAuthorization.md +++ b/docs/apps/deleteAuthorization.md @@ -30,6 +30,8 @@ octokit.apps.deleteAuthorization({ client_idyes +The client ID of your GitHub app. + access_tokenno diff --git a/docs/apps/deleteToken.md b/docs/apps/deleteToken.md index 557f0b469..ee3d70ca4 100644 --- a/docs/apps/deleteToken.md +++ b/docs/apps/deleteToken.md @@ -29,6 +29,8 @@ octokit.apps.deleteToken({ client_idyes +The client ID of your GitHub app. + access_tokenno diff --git a/docs/apps/removeRepoFromInstallation.md b/docs/apps/removeRepoFromInstallation.md index 0d674a8ba..8f19c39aa 100644 --- a/docs/apps/removeRepoFromInstallation.md +++ b/docs/apps/removeRepoFromInstallation.md @@ -10,7 +10,7 @@ type: API method Remove a single repository from an installation. The authenticated user must have admin access to the repository. -You 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://docs.github.com/rest/reference/oauth-authorizations#create-a-new-authorization) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to access this endpoint. +You must use a personal access token (which you can create via the [command line](https://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. ```js octokit.apps.removeRepoFromInstallation({ diff --git a/docs/apps/resetToken.md b/docs/apps/resetToken.md index 3113ef13a..fc9eb0fef 100644 --- a/docs/apps/resetToken.md +++ b/docs/apps/resetToken.md @@ -30,6 +30,8 @@ octokit.apps.resetToken({ client_idyes +The client ID of your GitHub app. + access_tokenyes diff --git a/docs/apps/scopeToken.md b/docs/apps/scopeToken.md new file mode 100644 index 000000000..3e615dbc1 --- /dev/null +++ b/docs/apps/scopeToken.md @@ -0,0 +1,218 @@ +--- +name: Create a scoped access token +example: octokit.apps.scopeToken({ client_id }) +route: POST /applications/{client_id}/token/scoped +scope: apps +type: API method +--- + +# Create a scoped access token + +Exchanges a non-repository scoped user-to-server OAuth access token for a repository scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#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`. + +```js +octokit.apps.scopeToken({ + client_id, +}); +``` + +## Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
namerequireddescription
client_idyes + +The client ID of your GitHub app. + +
access_tokenno + +**Required.** The OAuth access token used to authenticate to the GitHub API. + +
targetno + +The name of the user or organization to scope the user-to-server access token to. **Required** unless `target_id` is specified. + +
target_idno + +The ID of the user or organization to scope the user-to-server access token to. **Required** unless `target` is specified. + +
repositoriesno + +The list of repository IDs to scope the user-to-server access token to. `repositories` may not be specified if `repository_ids` is specified. + +
repository_idsno + +The list of repository names to scope the user-to-server access token to. `repository_ids` may not be specified if `repositories` is specified. + +
permissionsno + +The permissions granted to the user-to-server access token. + +
permissions.actionsno + +The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. Can be one of: `read` or `write`. + +
permissions.administrationno + +The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. Can be one of: `read` or `write`. + +
permissions.checksno + +The level of permission to grant the access token for checks on code. Can be one of: `read` or `write`. + +
permissions.content_referencesno + +The level of permission to grant the access token for notification of content references and creation content attachments. Can be one of: `read` or `write`. + +
permissions.contentsno + +The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. Can be one of: `read` or `write`. + +
permissions.deploymentsno + +The level of permission to grant the access token for deployments and deployment statuses. Can be one of: `read` or `write`. + +
permissions.environmentsno + +The level of permission to grant the access token for managing repository environments. Can be one of: `read` or `write`. + +
permissions.issuesno + +The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. Can be one of: `read` or `write`. + +
permissions.metadatano + +The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. Can be one of: `read` or `write`. + +
permissions.packagesno + +The level of permission to grant the access token for packages published to GitHub Packages. Can be one of: `read` or `write`. + +
permissions.pagesno + +The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. Can be one of: `read` or `write`. + +
permissions.pull_requestsno + +The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. Can be one of: `read` or `write`. + +
permissions.repository_hooksno + +The level of permission to grant the access token to manage the post-receive hooks for a repository. Can be one of: `read` or `write`. + +
permissions.repository_projectsno + +The level of permission to grant the access token to manage repository projects, columns, and cards. Can be one of: `read`, `write`, or `admin`. + +
permissions.secret_scanning_alertsno + +The level of permission to grant the access token to view and manage secret scanning alerts. Can be one of: `read` or `write`. + +
permissions.secretsno + +The level of permission to grant the access token to manage repository secrets. Can be one of: `read` or `write`. + +
permissions.security_eventsno + +The level of permission to grant the access token to view and manage security events like code scanning alerts. Can be one of: `read` or `write`. + +
permissions.single_fileno + +The level of permission to grant the access token to manage just a single file. Can be one of: `read` or `write`. + +
permissions.statusesno + +The level of permission to grant the access token for commit statuses. Can be one of: `read` or `write`. + +
permissions.vulnerability_alertsno + +The level of permission to grant the access token to retrieve Dependabot alerts. Can be one of: `read`. + +
permissions.workflowsno + +The level of permission to grant the access token to update GitHub Actions workflow files. Can be one of: `write`. + +
permissions.membersno + +The level of permission to grant the access token for organization teams and members. Can be one of: `read` or `write`. + +
permissions.organization_administrationno + +The level of permission to grant the access token to manage access to an organization. Can be one of: `read` or `write`. + +
permissions.organization_hooksno + +The level of permission to grant the access token to manage the post-receive hooks for an organization. Can be one of: `read` or `write`. + +
permissions.organization_planno + +The level of permission to grant the access token for viewing an organization's plan. Can be one of: `read`. + +
permissions.organization_projectsno + +The level of permission to grant the access token to manage organization projects, columns, and cards. Can be one of: `read`, `write`, or `admin`. + +
permissions.organization_secretsno + +The level of permission to grant the access token to manage organization secrets. Can be one of: `read` or `write`. + +
permissions.organization_self_hosted_runnersno + +The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. Can be one of: `read` or `write`. + +
permissions.organization_user_blockingno + +The level of permission to grant the access token to view and manage users blocked by the organization. Can be one of: `read` or `write`. + +
permissions.team_discussionsno + +The level of permission to grant the access token to manage team discussions and related comments. Can be one of: `read` or `write`. + +
+ +See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/apps#create-a-scoped-access-token). diff --git a/docs/enterpriseAdmin/setAllowedActionsEnterprise.md b/docs/enterpriseAdmin/setAllowedActionsEnterprise.md index 9db1f0664..572a345f6 100644 --- a/docs/enterpriseAdmin/setAllowedActionsEnterprise.md +++ b/docs/enterpriseAdmin/setAllowedActionsEnterprise.md @@ -1,6 +1,6 @@ --- name: Set allowed actions for an enterprise -example: octokit.enterpriseAdmin.setAllowedActionsEnterprise({ enterprise }) +example: octokit.enterpriseAdmin.setAllowedActionsEnterprise({ enterprise, github_owned_allowed, verified_allowed, patterns_allowed }) route: PUT /enterprises/{enterprise}/actions/permissions/selected-actions scope: enterpriseAdmin type: API method @@ -15,6 +15,9 @@ You must authenticate using an access token with the `admin:enterprise` scope to ```js octokit.enterpriseAdmin.setAllowedActionsEnterprise({ enterprise, + github_owned_allowed, + verified_allowed, + patterns_allowed, }); ``` @@ -34,17 +37,17 @@ octokit.enterpriseAdmin.setAllowedActionsEnterprise({ The slug version of the enterprise name. You can also substitute this value with the enterprise id. -github_owned_allowedno +github_owned_allowedyes Whether GitHub-owned actions are allowed. For example, this includes the actions in the `actions` organization. -verified_allowedno +verified_allowedyes Whether actions in GitHub Marketplace from verified creators are allowed. Set to `true` to allow all GitHub Marketplace actions by verified creators. -patterns_allowedno +patterns_allowedyes Specifies a list of string-matching patterns to allow specific action(s). Wildcards, tags, and SHAs are allowed. For example, `monalisa/octocat@*`, `monalisa/octocat@v2`, `monalisa/*`." diff --git a/docs/licenses/getForRepo.md b/docs/licenses/getForRepo.md index 86bd480ed..8e7823adc 100644 --- a/docs/licenses/getForRepo.md +++ b/docs/licenses/getForRepo.md @@ -10,7 +10,7 @@ type: API method This method returns the contents of the repository's license file, if one is detected. -Similar to [Get repository content](https://docs.github.com/rest/reference/repos/contents#get-repository-content), this method also supports [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. +Similar to [Get repository content](https://docs.github.com/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. ```js octokit.licenses.getForRepo({ diff --git a/docs/pulls/createReview.md b/docs/pulls/createReview.md index 85cf72433..32e91fedb 100644 --- a/docs/pulls/createReview.md +++ b/docs/pulls/createReview.md @@ -12,7 +12,7 @@ This endpoint triggers [notifications](https://help.github.com/articles/about-no Pull request reviews created in the `PENDING` state do not include the `submitted_at` property in the response. -**Note:** To comment on a specific line in a file, you need to first determine the _position_ of that line in the diff. The GitHub REST API v3 offers the `application/vnd.github.v3.diff` [media type](https://docs.github.com/rest/reference/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://docs.github.com/rest/reference/pulls#get-a-pull-request) endpoint. +**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://docs.github.com/rest/overview/media-types#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://docs.github.com/rest/reference/pulls#get-a-pull-request) endpoint. The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. diff --git a/docs/pulls/merge.md b/docs/pulls/merge.md index fe59d2a5e..e5216a8b1 100644 --- a/docs/pulls/merge.md +++ b/docs/pulls/merge.md @@ -8,7 +8,7 @@ type: API method # Merge a pull request -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://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/reference/guides#dealing-with-abuse-rate-limits)" for details. +This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-abuse-rate-limits)" for details. ```js octokit.pulls.merge({ diff --git a/docs/pulls/requestReviewers.md b/docs/pulls/requestReviewers.md index 26ffb7df5..98bec0acc 100644 --- a/docs/pulls/requestReviewers.md +++ b/docs/pulls/requestReviewers.md @@ -8,7 +8,7 @@ type: API method # Request reviewers for a pull request -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://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/reference/guides#dealing-with-abuse-rate-limits)" for details. +This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-abuse-rate-limits)" for details. ```js octokit.pulls.requestReviewers({ diff --git a/docs/repos/deleteDeployment.md b/docs/repos/deleteDeployment.md index 0623480e0..0a678b5c8 100644 --- a/docs/repos/deleteDeployment.md +++ b/docs/repos/deleteDeployment.md @@ -15,7 +15,7 @@ To set a deployment as inactive, you must: - Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment. - Mark the active deployment as inactive by adding any non-successful deployment status. -For more information, see "[Create a deployment](https://docs.github.com/rest/reference/repos/deployments/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/rest/reference/repos#create-a-deployment-status)." +For more information, see "[Create a deployment](https://docs.github.com/rest/reference/repos/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/rest/reference/repos#create-a-deployment-status)." ```js octokit.repos.deleteDeployment({ diff --git a/scripts/update-endpoints/generated/endpoints.json b/scripts/update-endpoints/generated/endpoints.json index bb1056879..b2ae34caa 100644 --- a/scripts/update-endpoints/generated/endpoints.json +++ b/scripts/update-endpoints/generated/endpoints.json @@ -3631,7 +3631,7 @@ "description": "Whether GitHub-owned actions are allowed. For example, this includes the actions in the `actions` organization.", "in": "BODY", "type": "boolean", - "required": false, + "required": true, "enum": null, "allowNull": false, "mapToData": null, @@ -3644,7 +3644,7 @@ "description": "Whether actions in GitHub Marketplace from verified creators are allowed. Set to `true` to allow all GitHub Marketplace actions by verified creators.", "in": "BODY", "type": "boolean", - "required": false, + "required": true, "enum": null, "allowNull": false, "mapToData": null, @@ -3657,7 +3657,7 @@ "description": "Specifies a list of string-matching patterns to allow specific action(s). Wildcards, tags, and SHAs are allowed. For example, `monalisa/octocat@*`, `monalisa/octocat@v2`, `monalisa/*`.\"", "in": "BODY", "type": "string[]", - "required": false, + "required": true, "enum": null, "allowNull": false, "mapToData": null, @@ -3715,7 +3715,7 @@ "description": "Whether GitHub-owned actions are allowed. For example, this includes the actions in the `actions` organization.", "in": "BODY", "type": "boolean", - "required": false, + "required": true, "enum": null, "allowNull": false, "mapToData": null, @@ -3728,7 +3728,7 @@ "description": "Whether actions in GitHub Marketplace from verified creators are allowed. Set to `true` to allow all GitHub Marketplace actions by verified creators.", "in": "BODY", "type": "boolean", - "required": false, + "required": true, "enum": null, "allowNull": false, "mapToData": null, @@ -3741,7 +3741,7 @@ "description": "Specifies a list of string-matching patterns to allow specific action(s). Wildcards, tags, and SHAs are allowed. For example, `monalisa/octocat@*`, `monalisa/octocat@v2`, `monalisa/*`.\"", "in": "BODY", "type": "string[]", - "required": false, + "required": true, "enum": null, "allowNull": false, "mapToData": null, @@ -5982,7 +5982,7 @@ "url": "/user/installations/{installation_id}/repositories/{repository_id}", "isDeprecated": false, "deprecationDate": null, - "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://docs.github.com/rest/reference/oauth-authorizations#create-a-new-authorization) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to access this endpoint.", + "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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint.", "documentationUrl": "https://docs.github.com/rest/reference/apps#add-a-repository-to-an-app-installation", "previews": [], "headers": [], @@ -6037,7 +6037,7 @@ "parameters": [ { "name": "client_id", - "description": "", + "description": "The client ID of your GitHub app.", "in": "PATH", "type": "string", "required": true, @@ -6091,7 +6091,7 @@ "parameters": [ { "name": "client_id", - "description": "", + "description": "The client ID of your GitHub app.", "in": "PATH", "type": "string", "required": true, @@ -6421,7 +6421,7 @@ "parameters": [ { "name": "client_id", - "description": "", + "description": "The client ID of your GitHub app.", "in": "PATH", "type": "string", "required": true, @@ -6500,7 +6500,7 @@ "parameters": [ { "name": "client_id", - "description": "", + "description": "The client ID of your GitHub app.", "in": "PATH", "type": "string", "required": true, @@ -7612,7 +7612,7 @@ "url": "/user/installations/{installation_id}/repositories/{repository_id}", "isDeprecated": false, "deprecationDate": null, - "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://docs.github.com/rest/reference/oauth-authorizations#create-a-new-authorization) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to access this endpoint.", + "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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint.", "documentationUrl": "https://docs.github.com/rest/reference/apps#remove-a-repository-from-an-app-installation", "previews": [], "headers": [], @@ -7667,7 +7667,7 @@ "parameters": [ { "name": "client_id", - "description": "", + "description": "The client ID of your GitHub app.", "in": "PATH", "type": "string", "required": true, @@ -7720,7 +7720,7 @@ "parameters": [ { "name": "client_id", - "description": "", + "description": "The client ID of your GitHub app.", "in": "PATH", "type": "string", "required": true, @@ -7774,7 +7774,7 @@ "parameters": [ { "name": "client_id", - "description": "", + "description": "The client ID of your GitHub app.", "in": "PATH", "type": "string", "required": true, @@ -7819,7 +7819,7 @@ "parameters": [ { "name": "client_id", - "description": "", + "description": "The client ID of your GitHub app.", "in": "PATH", "type": "string", "required": true, @@ -7867,6 +7867,522 @@ ], "renamed": null }, + { + "name": "Create a scoped access token", + "scope": "apps", + "id": "scopeToken", + "method": "POST", + "url": "/applications/{client_id}/token/scoped", + "isDeprecated": false, + "deprecationDate": null, + "description": "Exchanges a non-repository scoped user-to-server OAuth access token for a repository scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#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`.", + "documentationUrl": "https://docs.github.com/rest/reference/apps#create-a-scoped-access-token", + "previews": [], + "headers": [], + "parameters": [ + { + "name": "client_id", + "description": "The client ID of your GitHub app.", + "in": "PATH", + "type": "string", + "required": true, + "enum": null, + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "access_token", + "description": "**Required.** The OAuth access token used to authenticate to the GitHub API.", + "in": "BODY", + "type": "string", + "required": false, + "enum": null, + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "target", + "description": "The name of the user or organization to scope the user-to-server access token to. **Required** unless `target_id` is specified.", + "in": "BODY", + "type": "string", + "required": false, + "enum": null, + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "target_id", + "description": "The ID of the user or organization to scope the user-to-server access token to. **Required** unless `target` is specified.", + "in": "BODY", + "type": "integer", + "required": false, + "enum": null, + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "repositories", + "description": "The list of repository IDs to scope the user-to-server access token to. `repositories` may not be specified if `repository_ids` is specified.", + "in": "BODY", + "type": "string[]", + "required": false, + "enum": null, + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "repository_ids", + "description": "The list of repository names to scope the user-to-server access token to. `repository_ids` may not be specified if `repositories` is specified.", + "in": "BODY", + "type": "integer[]", + "required": false, + "enum": null, + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "permissions", + "description": "The permissions granted to the user-to-server access token.", + "in": "BODY", + "type": "object", + "required": false, + "enum": null, + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "permissions.actions", + "description": "The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. Can be one of: `read` or `write`.", + "in": "BODY", + "type": "string", + "required": false, + "enum": ["read", "write"], + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "permissions.administration", + "description": "The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. Can be one of: `read` or `write`.", + "in": "BODY", + "type": "string", + "required": false, + "enum": ["read", "write"], + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "permissions.checks", + "description": "The level of permission to grant the access token for checks on code. Can be one of: `read` or `write`.", + "in": "BODY", + "type": "string", + "required": false, + "enum": ["read", "write"], + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "permissions.content_references", + "description": "The level of permission to grant the access token for notification of content references and creation content attachments. Can be one of: `read` or `write`.", + "in": "BODY", + "type": "string", + "required": false, + "enum": ["read", "write"], + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "permissions.contents", + "description": "The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. Can be one of: `read` or `write`.", + "in": "BODY", + "type": "string", + "required": false, + "enum": ["read", "write"], + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "permissions.deployments", + "description": "The level of permission to grant the access token for deployments and deployment statuses. Can be one of: `read` or `write`.", + "in": "BODY", + "type": "string", + "required": false, + "enum": ["read", "write"], + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "permissions.environments", + "description": "The level of permission to grant the access token for managing repository environments. Can be one of: `read` or `write`.", + "in": "BODY", + "type": "string", + "required": false, + "enum": ["read", "write"], + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "permissions.issues", + "description": "The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. Can be one of: `read` or `write`.", + "in": "BODY", + "type": "string", + "required": false, + "enum": ["read", "write"], + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "permissions.metadata", + "description": "The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. Can be one of: `read` or `write`.", + "in": "BODY", + "type": "string", + "required": false, + "enum": ["read", "write"], + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "permissions.packages", + "description": "The level of permission to grant the access token for packages published to GitHub Packages. Can be one of: `read` or `write`.", + "in": "BODY", + "type": "string", + "required": false, + "enum": ["read", "write"], + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "permissions.pages", + "description": "The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. Can be one of: `read` or `write`.", + "in": "BODY", + "type": "string", + "required": false, + "enum": ["read", "write"], + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "permissions.pull_requests", + "description": "The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. Can be one of: `read` or `write`.", + "in": "BODY", + "type": "string", + "required": false, + "enum": ["read", "write"], + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "permissions.repository_hooks", + "description": "The level of permission to grant the access token to manage the post-receive hooks for a repository. Can be one of: `read` or `write`.", + "in": "BODY", + "type": "string", + "required": false, + "enum": ["read", "write"], + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "permissions.repository_projects", + "description": "The level of permission to grant the access token to manage repository projects, columns, and cards. Can be one of: `read`, `write`, or `admin`.", + "in": "BODY", + "type": "string", + "required": false, + "enum": ["read", "write", "admin"], + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "permissions.secret_scanning_alerts", + "description": "The level of permission to grant the access token to view and manage secret scanning alerts. Can be one of: `read` or `write`.", + "in": "BODY", + "type": "string", + "required": false, + "enum": ["read", "write"], + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "permissions.secrets", + "description": "The level of permission to grant the access token to manage repository secrets. Can be one of: `read` or `write`.", + "in": "BODY", + "type": "string", + "required": false, + "enum": ["read", "write"], + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "permissions.security_events", + "description": "The level of permission to grant the access token to view and manage security events like code scanning alerts. Can be one of: `read` or `write`.", + "in": "BODY", + "type": "string", + "required": false, + "enum": ["read", "write"], + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "permissions.single_file", + "description": "The level of permission to grant the access token to manage just a single file. Can be one of: `read` or `write`.", + "in": "BODY", + "type": "string", + "required": false, + "enum": ["read", "write"], + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "permissions.statuses", + "description": "The level of permission to grant the access token for commit statuses. Can be one of: `read` or `write`.", + "in": "BODY", + "type": "string", + "required": false, + "enum": ["read", "write"], + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "permissions.vulnerability_alerts", + "description": "The level of permission to grant the access token to retrieve Dependabot alerts. Can be one of: `read`.", + "in": "BODY", + "type": "string", + "required": false, + "enum": ["read"], + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "permissions.workflows", + "description": "The level of permission to grant the access token to update GitHub Actions workflow files. Can be one of: `write`.", + "in": "BODY", + "type": "string", + "required": false, + "enum": ["write"], + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "permissions.members", + "description": "The level of permission to grant the access token for organization teams and members. Can be one of: `read` or `write`.", + "in": "BODY", + "type": "string", + "required": false, + "enum": ["read", "write"], + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "permissions.organization_administration", + "description": "The level of permission to grant the access token to manage access to an organization. Can be one of: `read` or `write`.", + "in": "BODY", + "type": "string", + "required": false, + "enum": ["read", "write"], + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "permissions.organization_hooks", + "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization. Can be one of: `read` or `write`.", + "in": "BODY", + "type": "string", + "required": false, + "enum": ["read", "write"], + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "permissions.organization_plan", + "description": "The level of permission to grant the access token for viewing an organization's plan. Can be one of: `read`.", + "in": "BODY", + "type": "string", + "required": false, + "enum": ["read"], + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "permissions.organization_projects", + "description": "The level of permission to grant the access token to manage organization projects, columns, and cards. Can be one of: `read`, `write`, or `admin`.", + "in": "BODY", + "type": "string", + "required": false, + "enum": ["read", "write", "admin"], + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "permissions.organization_secrets", + "description": "The level of permission to grant the access token to manage organization secrets. Can be one of: `read` or `write`.", + "in": "BODY", + "type": "string", + "required": false, + "enum": ["read", "write"], + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "permissions.organization_self_hosted_runners", + "description": "The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. Can be one of: `read` or `write`.", + "in": "BODY", + "type": "string", + "required": false, + "enum": ["read", "write"], + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "permissions.organization_user_blocking", + "description": "The level of permission to grant the access token to view and manage users blocked by the organization. Can be one of: `read` or `write`.", + "in": "BODY", + "type": "string", + "required": false, + "enum": ["read", "write"], + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "permissions.team_discussions", + "description": "The level of permission to grant the access token to manage team discussions and related comments. Can be one of: `read` or `write`.", + "in": "BODY", + "type": "string", + "required": false, + "enum": ["read", "write"], + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + } + ], + "responses": [ + { + "code": 200, + "description": "response", + "examples": [ + { + "data": "{\"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},\"installation\":{\"permissions\":{\"metadata\":\"read\",\"issues\":\"write\",\"contents\":\"read\"},\"repository_selection\":\"selected\",\"single_file_name\":\".github/workflow.yml\",\"repositories_url\":\"https://api.github.com/user/repos\",\"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},\"has_multiple_single_files\":false,\"single_file_paths\":[]}}" + } + ] + }, + { + "code": 401, + "description": "Requires Authentication", + "examples": null + }, + { "code": 403, "description": "Forbidden", "examples": null }, + { "code": 404, "description": "Resource Not Found", "examples": null }, + { "code": 422, "description": "Validation Failed", "examples": null } + ], + "renamed": null + }, { "name": "Suspend an app installation", "scope": "apps", @@ -10053,7 +10569,7 @@ }, { "code": 403, - "description": "Response if GitHub Advanced Security is not enabled for this repository", + "description": "Response if github advanced security is not enabled for this repository", "examples": null }, { "code": 404, "description": "Resource Not Found", "examples": null }, @@ -10139,7 +10655,7 @@ }, { "code": 403, - "description": "Response if GitHub Advanced Security is not enabled for this repository", + "description": "Response if github advanced security is not enabled for this repository", "examples": null }, { @@ -10229,7 +10745,7 @@ }, { "code": 403, - "description": "Response if GitHub Advanced Security is not enabled for this repository", + "description": "Response if github advanced security is not enabled for this repository", "examples": null } ], @@ -10326,7 +10842,7 @@ }, { "code": 403, - "description": "Response if the repository is archived, or if GitHub Advanced Security is not enabled for this repository", + "description": "Response if the repository is archived, or if github advanced security is not enabled for this repository", "examples": null }, { @@ -10464,7 +10980,7 @@ }, { "code": 403, - "description": "Response if the repository is archived, or if GitHub Advanced Security is not enabled for this repository", + "description": "Response if the repository is archived, or if github advanced security is not enabled for this repository", "examples": null }, { @@ -10890,7 +11406,7 @@ "description": "Whether GitHub-owned actions are allowed. For example, this includes the actions in the `actions` organization.", "in": "BODY", "type": "boolean", - "required": false, + "required": true, "enum": null, "allowNull": false, "mapToData": null, @@ -10903,7 +11419,7 @@ "description": "Whether actions in GitHub Marketplace from verified creators are allowed. Set to `true` to allow all GitHub Marketplace actions by verified creators.", "in": "BODY", "type": "boolean", - "required": false, + "required": true, "enum": null, "allowNull": false, "mapToData": null, @@ -10916,7 +11432,7 @@ "description": "Specifies a list of string-matching patterns to allow specific action(s). Wildcards, tags, and SHAs are allowed. For example, `monalisa/octocat@*`, `monalisa/octocat@v2`, `monalisa/*`.\"", "in": "BODY", "type": "string[]", - "required": false, + "required": true, "enum": null, "allowNull": false, "mapToData": null, @@ -17833,7 +18349,7 @@ "url": "/repos/{owner}/{repo}/license", "isDeprecated": false, "deprecationDate": null, - "description": "This method returns the contents of the repository's license file, if one is detected.\n\nSimilar to [Get repository content](https://docs.github.com/rest/reference/repos/contents#get-repository-content), this method also supports [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw license content or rendered license HTML.", + "description": "This method returns the contents of the repository's license file, if one is detected.\n\nSimilar to [Get repository content](https://docs.github.com/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw license content or rendered license HTML.", "documentationUrl": "https://docs.github.com/v3/licenses/#get-the-license-for-a-repository", "previews": [], "headers": [], @@ -19842,7 +20358,7 @@ "parameters": [ { "name": "client_id", - "description": "", + "description": "The client ID of your GitHub app.", "in": "PATH", "type": "string", "required": true, @@ -19964,7 +20480,7 @@ "parameters": [ { "name": "client_id", - "description": "", + "description": "The client ID of your GitHub app.", "in": "PATH", "type": "string", "required": true, @@ -20315,7 +20831,7 @@ "deprecationDate": null, "description": "", "documentationUrl": "https://docs.github.com/rest/reference/orgs#block-a-user-from-an-organization", - "previews": [{ "name": "giant-sentry-fist" }], + "previews": [], "headers": [], "parameters": [ { @@ -20361,7 +20877,7 @@ "deprecationDate": null, "description": "", "documentationUrl": "https://docs.github.com/rest/reference/orgs#check-if-a-user-is-blocked-by-an-organization", - "previews": [{ "name": "giant-sentry-fist" }], + "previews": [], "headers": [], "parameters": [ { @@ -21277,7 +21793,7 @@ "deprecationDate": null, "description": "List the users blocked by an organization.", "documentationUrl": "https://docs.github.com/rest/reference/orgs#list-users-blocked-by-an-organization", - "previews": [{ "name": "giant-sentry-fist" }], + "previews": [], "headers": [], "parameters": [ { @@ -22330,7 +22846,7 @@ "deprecationDate": null, "description": "", "documentationUrl": "https://docs.github.com/rest/reference/orgs#unblock-a-user-from-an-organization", - "previews": [{ "name": "giant-sentry-fist" }], + "previews": [], "headers": [], "parameters": [ { @@ -24998,7 +25514,7 @@ "url": "/repos/{owner}/{repo}/pulls/{pull_number}/reviews", "isDeprecated": false, "deprecationDate": null, - "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://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)\" and \"[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)\" for details.\n\nPull request reviews created in the `PENDING` state do not include the `submitted_at` property in the response.\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://docs.github.com/rest/reference/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://docs.github.com/rest/reference/pulls#get-a-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.", + "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://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)\" and \"[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)\" for details.\n\nPull request reviews created in the `PENDING` state do not include the `submitted_at` property in the response.\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://docs.github.com/rest/overview/media-types#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://docs.github.com/rest/reference/pulls#get-a-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.", "documentationUrl": "https://docs.github.com/rest/reference/pulls#create-a-review-for-a-pull-request", "previews": [], "headers": [], @@ -26728,7 +27244,7 @@ "url": "/repos/{owner}/{repo}/pulls/{pull_number}/merge", "isDeprecated": false, "deprecationDate": null, - "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://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)\" and \"[Dealing with abuse rate limits](https://docs.github.com/rest/reference/guides#dealing-with-abuse-rate-limits)\" for details.", + "description": "This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See \"[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)\" and \"[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-abuse-rate-limits)\" for details.", "documentationUrl": "https://docs.github.com/v3/pulls/#merge-a-pull-request", "previews": [], "headers": [], @@ -26950,7 +27466,7 @@ "url": "/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "isDeprecated": false, "deprecationDate": null, - "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://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)\" and \"[Dealing with abuse rate limits](https://docs.github.com/rest/reference/guides#dealing-with-abuse-rate-limits)\" for details.", + "description": "This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See \"[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)\" and \"[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-abuse-rate-limits)\" for details.", "documentationUrl": "https://docs.github.com/rest/reference/pulls#request-reviewers-for-a-pull-request", "previews": [], "headers": [], @@ -28079,7 +28595,7 @@ "url": "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "isDeprecated": true, "deprecationDate": "2020-02-26", - "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://docs.github.comt/rest/reference/reactions#create-reaction-for-a-team-discussion-comment) endpoint.\n\nCreate a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.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.", + "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://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)\" endpoint.\n\nCreate a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.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.", "documentationUrl": "https://docs.github.com/v3/reactions/#create-reaction-for-a-team-discussion-comment-legacy", "previews": [{ "name": "squirrel-girl" }], "headers": [], @@ -33052,7 +33568,7 @@ "url": "/repos/{owner}/{repo}/deployments/{deployment_id}", "isDeprecated": false, "deprecationDate": null, - "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://docs.github.com/rest/reference/repos/deployments/#create-a-deployment)\" and \"[Create a deployment status](https://docs.github.com/rest/reference/repos#create-a-deployment-status).\"", + "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://docs.github.com/rest/reference/repos/#create-a-deployment)\" and \"[Create a deployment status](https://docs.github.com/rest/reference/repos#create-a-deployment-status).\"", "documentationUrl": "https://docs.github.com/rest/reference/repos#delete-a-deployment", "previews": [], "headers": [], @@ -41027,7 +41543,7 @@ "description": "response", "examples": [ { - "data": "{\"id\":1,\"node_id\":\"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\"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\":\"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\"assignees_url\":\"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\"blobs_url\":\"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\"branches_url\":\"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\"collaborators_url\":\"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\"comments_url\":\"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\"commits_url\":\"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\"compare_url\":\"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\"contents_url\":\"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\"contributors_url\":\"https://api.github.com/repos/octocat/Hello-World/contributors\",\"deployments_url\":\"https://api.github.com/repos/octocat/Hello-World/deployments\",\"downloads_url\":\"https://api.github.com/repos/octocat/Hello-World/downloads\",\"events_url\":\"https://api.github.com/repos/octocat/Hello-World/events\",\"forks_url\":\"https://api.github.com/repos/octocat/Hello-World/forks\",\"git_commits_url\":\"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\"git_refs_url\":\"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\"git_tags_url\":\"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\"git_url\":\"git:github.com/octocat/Hello-World.git\",\"issue_comment_url\":\"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\"issue_events_url\":\"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\"issues_url\":\"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\"keys_url\":\"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\"labels_url\":\"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\"languages_url\":\"https://api.github.com/repos/octocat/Hello-World/languages\",\"merges_url\":\"https://api.github.com/repos/octocat/Hello-World/merges\",\"milestones_url\":\"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\"notifications_url\":\"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\"pulls_url\":\"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\"releases_url\":\"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\"ssh_url\":\"git@github.com:octocat/Hello-World.git\",\"stargazers_url\":\"https://api.github.com/repos/octocat/Hello-World/stargazers\",\"statuses_url\":\"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\"subscribers_url\":\"https://api.github.com/repos/octocat/Hello-World/subscribers\",\"subscription_url\":\"https://api.github.com/repos/octocat/Hello-World/subscription\",\"tags_url\":\"https://api.github.com/repos/octocat/Hello-World/tags\",\"teams_url\":\"https://api.github.com/repos/octocat/Hello-World/teams\",\"trees_url\":\"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\"hooks_url\":\"http://api.github.com/repos/octocat/Hello-World/hooks\"},\"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\"}" + "data": "{\"id\":1,\"node_id\":\"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\"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\":\"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\"assignees_url\":\"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\"blobs_url\":\"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\"branches_url\":\"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\"collaborators_url\":\"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\"comments_url\":\"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\"commits_url\":\"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\"compare_url\":\"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\"contents_url\":\"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\"contributors_url\":\"https://api.github.com/repos/octocat/Hello-World/contributors\",\"deployments_url\":\"https://api.github.com/repos/octocat/Hello-World/deployments\",\"downloads_url\":\"https://api.github.com/repos/octocat/Hello-World/downloads\",\"events_url\":\"https://api.github.com/repos/octocat/Hello-World/events\",\"forks_url\":\"https://api.github.com/repos/octocat/Hello-World/forks\",\"git_commits_url\":\"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\"git_refs_url\":\"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\"git_tags_url\":\"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\"git_url\":\"git:github.com/octocat/Hello-World.git\",\"issue_comment_url\":\"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\"issue_events_url\":\"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\"issues_url\":\"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\"keys_url\":\"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\"labels_url\":\"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\"languages_url\":\"https://api.github.com/repos/octocat/Hello-World/languages\",\"merges_url\":\"https://api.github.com/repos/octocat/Hello-World/merges\",\"milestones_url\":\"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\"notifications_url\":\"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\"pulls_url\":\"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\"releases_url\":\"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\"ssh_url\":\"git@github.com:octocat/Hello-World.git\",\"stargazers_url\":\"https://api.github.com/repos/octocat/Hello-World/stargazers\",\"statuses_url\":\"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\"subscribers_url\":\"https://api.github.com/repos/octocat/Hello-World/subscribers\",\"subscription_url\":\"https://api.github.com/repos/octocat/Hello-World/subscription\",\"tags_url\":\"https://api.github.com/repos/octocat/Hello-World/tags\",\"teams_url\":\"https://api.github.com/repos/octocat/Hello-World/teams\",\"trees_url\":\"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\"hooks_url\":\"http://api.github.com/repos/octocat/Hello-World/hooks\"},\"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\",\"expired\":false,\"url\":\"https://api.github.com/user/repository_invitations/1296269\",\"html_url\":\"https://github.com/octocat/Hello-World/invitations\"}" } ] } @@ -43443,7 +43959,7 @@ "url": "/teams/{team_id}/repos/{owner}/{repo}", "isDeprecated": true, "deprecationDate": "2020-01-21", - "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 permissions](https://docs.github.comt/rest/reference/teams#add-or-update-team-project-permissions) 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs).\"", + "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 permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions)\" 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs).\"", "documentationUrl": "https://docs.github.com/v3/teams/#add-or-update-team-repository-permissions-legacy", "previews": [], "headers": [], @@ -47391,7 +47907,7 @@ "deprecationDate": null, "description": "", "documentationUrl": "https://docs.github.com/rest/reference/users#block-a-user", - "previews": [{ "name": "giant-sentry-fist" }], + "previews": [], "headers": [], "parameters": [ { @@ -47432,7 +47948,7 @@ "deprecationDate": null, "description": "", "documentationUrl": "https://docs.github.com/rest/reference/users#check-if-a-user-is-blocked-by-the-authenticated-user", - "previews": [{ "name": "giant-sentry-fist" }], + "previews": [], "headers": [], "parameters": [ { @@ -48153,7 +48669,7 @@ "deprecationDate": null, "description": "List the users you've blocked on your personal account.", "documentationUrl": "https://docs.github.com/rest/reference/users#list-users-blocked-by-the-authenticated-user", - "previews": [{ "name": "giant-sentry-fist" }], + "previews": [], "headers": [], "parameters": [], "responses": [ @@ -48874,7 +49390,7 @@ "deprecationDate": null, "description": "", "documentationUrl": "https://docs.github.com/rest/reference/users#unblock-a-user", - "previews": [{ "name": "giant-sentry-fist" }], + "previews": [], "headers": [], "parameters": [ { diff --git a/src/generated/endpoints.ts b/src/generated/endpoints.ts index 441edd57e..8f89f714c 100644 --- a/src/generated/endpoints.ts +++ b/src/generated/endpoints.ts @@ -241,6 +241,7 @@ const Endpoints: EndpointsDefaultsAndDecorations = { ], resetToken: ["PATCH /applications/{client_id}/token"], revokeInstallationAccessToken: ["DELETE /installation/token"], + scopeToken: ["POST /applications/{client_id}/token/scoped"], suspendInstallation: ["PUT /app/installations/{installation_id}/suspended"], unsuspendInstallation: [ "DELETE /app/installations/{installation_id}/suspended", @@ -535,14 +536,8 @@ const Endpoints: EndpointsDefaultsAndDecorations = { updateImport: ["PATCH /repos/{owner}/{repo}/import"], }, orgs: { - blockUser: [ - "PUT /orgs/{org}/blocks/{username}", - { mediaType: { previews: ["giant-sentry-fist"] } }, - ], - checkBlockedUser: [ - "GET /orgs/{org}/blocks/{username}", - { mediaType: { previews: ["giant-sentry-fist"] } }, - ], + blockUser: ["PUT /orgs/{org}/blocks/{username}"], + checkBlockedUser: ["GET /orgs/{org}/blocks/{username}"], checkMembershipForUser: ["GET /orgs/{org}/members/{username}"], checkPublicMembershipForUser: ["GET /orgs/{org}/public_members/{username}"], convertMemberToOutsideCollaborator: [ @@ -558,10 +553,7 @@ const Endpoints: EndpointsDefaultsAndDecorations = { getWebhookConfigForOrg: ["GET /orgs/{org}/hooks/{hook_id}/config"], list: ["GET /organizations"], listAppInstallations: ["GET /orgs/{org}/installations"], - listBlockedUsers: [ - "GET /orgs/{org}/blocks", - { mediaType: { previews: ["giant-sentry-fist"] } }, - ], + listBlockedUsers: ["GET /orgs/{org}/blocks"], listForAuthenticatedUser: ["GET /user/orgs"], listForUser: ["GET /users/{username}/orgs"], listInvitationTeams: ["GET /orgs/{org}/invitations/{invitation_id}/teams"], @@ -584,10 +576,7 @@ const Endpoints: EndpointsDefaultsAndDecorations = { setPublicMembershipForAuthenticatedUser: [ "PUT /orgs/{org}/public_members/{username}", ], - unblockUser: [ - "DELETE /orgs/{org}/blocks/{username}", - { mediaType: { previews: ["giant-sentry-fist"] } }, - ], + unblockUser: ["DELETE /orgs/{org}/blocks/{username}"], update: ["PATCH /orgs/{org}"], updateMembershipForAuthenticatedUser: [ "PATCH /user/memberships/orgs/{org}", @@ -1251,14 +1240,8 @@ const Endpoints: EndpointsDefaultsAndDecorations = { }, users: { addEmailForAuthenticated: ["POST /user/emails"], - block: [ - "PUT /user/blocks/{username}", - { mediaType: { previews: ["giant-sentry-fist"] } }, - ], - checkBlocked: [ - "GET /user/blocks/{username}", - { mediaType: { previews: ["giant-sentry-fist"] } }, - ], + block: ["PUT /user/blocks/{username}"], + checkBlocked: ["GET /user/blocks/{username}"], checkFollowingForUser: ["GET /users/{username}/following/{target_user}"], checkPersonIsFollowedByAuthenticated: ["GET /user/following/{username}"], createGpgKeyForAuthenticated: ["POST /user/gpg_keys"], @@ -1273,10 +1256,7 @@ const Endpoints: EndpointsDefaultsAndDecorations = { getGpgKeyForAuthenticated: ["GET /user/gpg_keys/{gpg_key_id}"], getPublicSshKeyForAuthenticated: ["GET /user/keys/{key_id}"], list: ["GET /users"], - listBlockedByAuthenticated: [ - "GET /user/blocks", - { mediaType: { previews: ["giant-sentry-fist"] } }, - ], + listBlockedByAuthenticated: ["GET /user/blocks"], listEmailsForAuthenticated: ["GET /user/emails"], listFollowedByAuthenticated: ["GET /user/following"], listFollowersForAuthenticatedUser: ["GET /user/followers"], @@ -1288,10 +1268,7 @@ const Endpoints: EndpointsDefaultsAndDecorations = { listPublicKeysForUser: ["GET /users/{username}/keys"], listPublicSshKeysForAuthenticated: ["GET /user/keys"], setPrimaryEmailVisibilityForAuthenticated: ["PATCH /user/email/visibility"], - unblock: [ - "DELETE /user/blocks/{username}", - { mediaType: { previews: ["giant-sentry-fist"] } }, - ], + unblock: ["DELETE /user/blocks/{username}"], unfollow: ["DELETE /user/following/{username}"], updateAuthenticated: ["PATCH /user"], }, diff --git a/src/generated/method-types.ts b/src/generated/method-types.ts index be9dfc158..0d2466ba8 100644 --- a/src/generated/method-types.ts +++ b/src/generated/method-types.ts @@ -1390,7 +1390,7 @@ export type RestEndpointMethods = { /** * Add a single repository to an installation. The authenticated user must have admin access to the repository. * - * You 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://docs.github.com/rest/reference/oauth-authorizations#create-a-new-authorization) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to access this endpoint. + * You must use a personal access token (which you can create via the [command line](https://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. */ addRepoToInstallation: { ( @@ -1759,7 +1759,7 @@ export type RestEndpointMethods = { /** * Remove a single repository from an installation. The authenticated user must have admin access to the repository. * - * You 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://docs.github.com/rest/reference/oauth-authorizations#create-a-new-authorization) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to access this endpoint. + * You must use a personal access token (which you can create via the [command line](https://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. */ removeRepoFromInstallation: { ( @@ -1796,6 +1796,16 @@ export type RestEndpointMethods = { defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string }>; }; + /** + * Exchanges a non-repository scoped user-to-server OAuth access token for a repository scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#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`. + */ + scopeToken: { + ( + params?: RestEndpointMethodTypes["apps"]["scopeToken"]["parameters"] + ): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ url: string }>; + }; /** * **Note:** Suspending a GitHub App installation is currently in beta and subject to change. Before you can suspend a GitHub App, the app owner must enable suspending installations for the app by opting-in to the beta. For more information, see "[Suspending a GitHub App installation](https://docs.github.com/apps/managing-github-apps/suspending-a-github-app-installation/)." * @@ -3329,7 +3339,7 @@ export type RestEndpointMethods = { /** * This method returns the contents of the repository's license file, if one is detected. * - * Similar to [Get repository content](https://docs.github.com/rest/reference/repos/contents#get-repository-content), this method also supports [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. + * Similar to [Get repository content](https://docs.github.com/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. */ getForRepo: { ( @@ -4460,7 +4470,7 @@ export type RestEndpointMethods = { * * Pull request reviews created in the `PENDING` state do not include the `submitted_at` property in the response. * - * **Note:** To comment on a specific line in a file, you need to first determine the _position_ of that line in the diff. The GitHub REST API v3 offers the `application/vnd.github.v3.diff` [media type](https://docs.github.com/rest/reference/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://docs.github.com/rest/reference/pulls#get-a-pull-request) endpoint. + * **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://docs.github.com/rest/overview/media-types#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://docs.github.com/rest/reference/pulls#get-a-pull-request) endpoint. * * The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. */ @@ -4652,7 +4662,7 @@ export type RestEndpointMethods = { endpoint: EndpointInterface<{ url: string }>; }; /** - * 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://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/reference/guides#dealing-with-abuse-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-abuse-rate-limits)" for details. */ merge: { ( @@ -4672,7 +4682,7 @@ export type RestEndpointMethods = { endpoint: EndpointInterface<{ url: string }>; }; /** - * 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://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/reference/guides#dealing-with-abuse-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-abuse-rate-limits)" for details. */ requestReviewers: { ( @@ -5542,7 +5552,7 @@ export type RestEndpointMethods = { * * Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment. * * Mark the active deployment as inactive by adding any non-successful deployment status. * - * For more information, see "[Create a deployment](https://docs.github.com/rest/reference/repos/deployments/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/rest/reference/repos#create-a-deployment-status)." + * For more information, see "[Create a deployment](https://docs.github.com/rest/reference/repos/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/rest/reference/repos#create-a-deployment-status)." */ deleteDeployment: { ( diff --git a/src/generated/parameters-and-response-types.ts b/src/generated/parameters-and-response-types.ts index 03f084c6e..53512129e 100644 --- a/src/generated/parameters-and-response-types.ts +++ b/src/generated/parameters-and-response-types.ts @@ -990,6 +990,14 @@ export type RestEndpointMethodTypes = { >; response: Endpoints["DELETE /installation/token"]["response"]; }; + scopeToken: { + parameters: RequestParameters & + Omit< + Endpoints["POST /applications/{client_id}/token/scoped"]["parameters"], + "baseUrl" | "headers" | "mediaType" + >; + response: Endpoints["POST /applications/{client_id}/token/scoped"]["response"]; + }; suspendInstallation: { parameters: RequestParameters & Omit<