Skip to content

Commit

Permalink
feat: many new unreleased endpoints (#632)
Browse files Browse the repository at this point in the history
* WIP octokit/openapi updated

* WIP octokit/openapi updated

* WIP octokit/openapi updated

* WIP octokit/openapi updated

* WIP octokit/openapi updated

* WIP octokit/openapi updated

* WIP octokit/openapi updated

* WIP octokit/openapi updated

* WIP octokit/openapi updated

* WIP octokit/openapi updated

* WIP octokit/openapi updated

* WIP octokit/openapi updated

* WIP octokit/openapi updated
  • Loading branch information
octokitbot committed May 11, 2023
1 parent 7da00f2 commit 835ab6b
Show file tree
Hide file tree
Showing 168 changed files with 54,147 additions and 12,920 deletions.
2 changes: 1 addition & 1 deletion docs/actions/deleteActionsCacheByKey.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ A key for identifying the cache.
</td></tr>
<tr><td>ref</td><td>no</td><td>

The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/<branch name>` or simply `<branch name>`. To reference a pull request use `refs/pull/<number>/merge`.
The full Git reference for narrowing down the cache. The `ref` for a branch should be formatted as `refs/heads/<branch name>`. To reference a pull request use `refs/pull/<number>/merge`.

</td></tr>
</tbody>
Expand Down
8 changes: 7 additions & 1 deletion docs/actions/deleteEnvironmentVariable.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Delete an environment variable
example: octokit.rest.actions.deleteEnvironmentVariable({ repository_id, name })
example: octokit.rest.actions.deleteEnvironmentVariable({ repository_id, name, environment_name })
route: DELETE /repositories/{repository_id}/environments/{environment_name}/variables/{name}
scope: actions
type: API method
Expand All @@ -16,6 +16,7 @@ GitHub Apps must have the `environment:write` repository permission to use this
octokit.rest.actions.deleteEnvironmentVariable({
repository_id,
name,
environment_name,
});
```

Expand All @@ -39,6 +40,11 @@ The unique identifier of the repository.

The name of the variable.

</td></tr>
<tr><td>environment_name</td><td>yes</td><td>

The name of the environment.

</td></tr>
</tbody>
</table>
Expand Down
2 changes: 1 addition & 1 deletion docs/actions/getActionsCacheList.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Page number of the results to fetch.
</td></tr>
<tr><td>ref</td><td>no</td><td>

The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/<branch name>` or simply `<branch name>`. To reference a pull request use `refs/pull/<number>/merge`.
The full Git reference for narrowing down the cache. The `ref` for a branch should be formatted as `refs/heads/<branch name>`. To reference a pull request use `refs/pull/<number>/merge`.

</td></tr>
<tr><td>key</td><td>no</td><td>
Expand Down
54 changes: 54 additions & 0 deletions docs/actions/listRepoOrganizationSecrets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
name: List repository organization secrets
example: octokit.rest.actions.listRepoOrganizationSecrets({ owner, repo })
route: GET /repos/{owner}/{repo}/actions/organization-secrets
scope: actions
type: API method
---

# List repository organization secrets

Lists all organization secrets shared with a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint.

```js
octokit.rest.actions.listRepoOrganizationSecrets({
owner,
repo,
});
```

## Parameters

<table>
<thead>
<tr>
<th>name</th>
<th>required</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr><td>owner</td><td>yes</td><td>

The account owner of the repository. The name is not case sensitive.

</td></tr>
<tr><td>repo</td><td>yes</td><td>

The name of the repository. The name is not case sensitive.

</td></tr>
<tr><td>per_page</td><td>no</td><td>

The number of results per page (max 100).

</td></tr>
<tr><td>page</td><td>no</td><td>

Page number of the results to fetch.

</td></tr>
</tbody>
</table>

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/actions/secrets#list-repository-organization-secrets).
54 changes: 54 additions & 0 deletions docs/actions/listRepoOrganizationVariables.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
name: List repository organization variables
example: octokit.rest.actions.listRepoOrganizationVariables({ owner, repo })
route: GET /repos/{owner}/{repo}/actions/organization-variables
scope: actions
type: API method
---

# List repository organization variables

Lists all organiation variables shared with a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions_variables:read` repository permission to use this endpoint.

```js
octokit.rest.actions.listRepoOrganizationVariables({
owner,
repo,
});
```

## Parameters

<table>
<thead>
<tr>
<th>name</th>
<th>required</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr><td>owner</td><td>yes</td><td>

The account owner of the repository. The name is not case sensitive.

</td></tr>
<tr><td>repo</td><td>yes</td><td>

The name of the repository. The name is not case sensitive.

</td></tr>
<tr><td>per_page</td><td>no</td><td>

The number of results per page (max 30).

</td></tr>
<tr><td>page</td><td>no</td><td>

Page number of the results to fetch.

</td></tr>
</tbody>
</table>

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/actions/variables#list-repository-organization-variables).
55 changes: 55 additions & 0 deletions docs/actions/reviewCustomGatesForRun.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
name: Review custom deployment protection rules for a workflow run
example: octokit.rest.actions.reviewCustomGatesForRun({ owner, repo, run_id })
route: POST /repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule
scope: actions
type: API method
---

# Review custom deployment protection rules for a workflow run

Approve or reject custom deployment protection rules provided by a GitHub App for a workflow run. For more information, see "[Using environments for deployment](https://docs.github.com/actions/deployment/targeting-different-environments/using-environments-for-deployment)."

**Note:** GitHub Apps can only review their own custom deployment protection rules.
To approve or reject pending deployments that are waiting for review from a specific person or team, see [`POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments`](/rest/actions/workflow-runs#review-pending-deployments-for-a-workflow-run).

GitHub Apps must have read and write permission for **Deployments** to use this endpoint.

```js
octokit.rest.actions.reviewCustomGatesForRun({
owner,
repo,
run_id,
});
```

## Parameters

<table>
<thead>
<tr>
<th>name</th>
<th>required</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr><td>owner</td><td>yes</td><td>

The account owner of the repository. The name is not case sensitive.

</td></tr>
<tr><td>repo</td><td>yes</td><td>

The name of the repository. The name is not case sensitive.

</td></tr>
<tr><td>run_id</td><td>yes</td><td>

The unique identifier of the workflow run.

</td></tr>
</tbody>
</table>

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/actions/workflow-runs#review-custom-deployment-protection-rules-for-a-workflow-run).
8 changes: 3 additions & 5 deletions docs/actions/setAllowedActionsOrganization.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ type: API method

Sets the actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."

If the organization belongs to an enterprise that has `selected` actions and reusable workflows set at the enterprise level, then you cannot override any of the enterprise's allowed actions and reusable workflows settings.

To use the `patterns_allowed` setting for private repositories, the organization must belong to an enterprise. If the organization does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories in the organization.

You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.

```js
Expand Down Expand Up @@ -50,7 +46,9 @@ Whether actions from GitHub Marketplace verified creators are allowed. Set to `t
</td></tr>
<tr><td>patterns_allowed</td><td>no</td><td>

Specifies a list of string-matching patterns to allow specific action(s) and reusable workflow(s). Wildcards, tags, and SHAs are allowed. For example, `monalisa/octocat@*`, `monalisa/octocat@v2`, `monalisa/*`."
Specifies a list of string-matching patterns to allow specific action(s) and reusable workflow(s). Wildcards, tags, and SHAs are allowed. For example, `monalisa/octocat@*`, `monalisa/octocat@v2`, `monalisa/*`.

**Note**: The `patterns_allowed` setting only applies to public repositories.

</td></tr>
</tbody>
Expand Down
8 changes: 3 additions & 5 deletions docs/actions/setAllowedActionsRepository.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ type: API method

Sets the actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)."

If the repository belongs to an organization or enterprise that has `selected` actions and reusable workflows set at the organization or enterprise levels, then you cannot override any of the allowed actions and reusable workflows settings.

To use the `patterns_allowed` setting for private repositories, the repository must belong to an enterprise. If the repository does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories.

You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API.

```js
Expand Down Expand Up @@ -56,7 +52,9 @@ Whether actions from GitHub Marketplace verified creators are allowed. Set to `t
</td></tr>
<tr><td>patterns_allowed</td><td>no</td><td>

Specifies a list of string-matching patterns to allow specific action(s) and reusable workflow(s). Wildcards, tags, and SHAs are allowed. For example, `monalisa/octocat@*`, `monalisa/octocat@v2`, `monalisa/*`."
Specifies a list of string-matching patterns to allow specific action(s) and reusable workflow(s). Wildcards, tags, and SHAs are allowed. For example, `monalisa/octocat@*`, `monalisa/octocat@v2`, `monalisa/*`.

**Note**: The `patterns_allowed` setting only applies to public repositories.

</td></tr>
</tbody>
Expand Down
2 changes: 0 additions & 2 deletions docs/actions/setGithubActionsPermissionsOrganization.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ type: API method

Sets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization.

If the organization belongs to an enterprise that has set restrictive permissions at the enterprise level, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the organization.

You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.

```js
Expand Down
2 changes: 0 additions & 2 deletions docs/actions/setGithubActionsPermissionsRepository.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ type: API method

Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions and reusable workflows in the repository.

If the repository belongs to an organization or enterprise that has set restrictive permissions at the organization or enterprise levels, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the repository.

You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API.

```js
Expand Down
2 changes: 1 addition & 1 deletion docs/actions/setWorkflowAccessToRepository.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ The name of the repository. The name is not case sensitive.
Defines the level of access that workflows outside of the repository have to actions and reusable workflows within the
repository.

`none` means the access is only possible from workflows in this repository. `user` level access allows sharing across user owned private repos only. `organization` level access allows sharing across the organization. `enterprise` level access allows sharing across the enterprise.
`none` means the access is only possible from workflows in this repository. `user` level access allows sharing across user owned private repos only. `organization` level access allows sharing across the organization.

</td></tr>
</tbody>
Expand Down
8 changes: 7 additions & 1 deletion docs/actions/updateEnvironmentVariable.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Update an environment variable
example: octokit.rest.actions.updateEnvironmentVariable({ repository_id })
example: octokit.rest.actions.updateEnvironmentVariable({ repository_id, environment_name })
route: PATCH /repositories/{repository_id}/environments/{environment_name}/variables/{name}
scope: actions
type: API method
Expand All @@ -15,6 +15,7 @@ GitHub Apps must have the `environment:write` repository permission to use this
```js
octokit.rest.actions.updateEnvironmentVariable({
repository_id,
environment_name,
});
```

Expand All @@ -38,6 +39,11 @@ The unique identifier of the repository.

The name of the variable.

</td></tr>
<tr><td>environment_name</td><td>yes</td><td>

The name of the environment.

</td></tr>
<tr><td>value</td><td>no</td><td>

Expand Down
2 changes: 2 additions & 0 deletions docs/activity/listRepoEvents.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ type: API method

# List repository events

**Note**: This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.

```js
octokit.rest.activity.listRepoEvents({
owner,
Expand Down
4 changes: 2 additions & 2 deletions docs/apps/checkToken.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type: API method

# Check a token

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://docs.github.com/rest/overview/other-authentication-methods#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`.
OAuth applications and GitHub applications with OAuth authorizations can use this 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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`.

```js
octokit.rest.apps.checkToken({
Expand All @@ -35,7 +35,7 @@ The client ID of the GitHub app.
</td></tr>
<tr><td>access_token</td><td>yes</td><td>

The access_token of the OAuth application.
The access_token of the OAuth or GitHub application.

</td></tr>
</tbody>
Expand Down
15 changes: 10 additions & 5 deletions docs/apps/createInstallationAccessToken.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,6 @@ The level of permission to grant the access token to retrieve Pages statuses, co

The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges.

</td></tr>
<tr><td>permissions.repository_announcement_banners</td><td>no</td><td>

The level of permission to grant the access token to view and manage announcement banners for a repository.

</td></tr>
<tr><td>permissions.repository_hooks</td><td>no</td><td>

Expand Down Expand Up @@ -178,6 +173,16 @@ The level of permission to grant the access token to view and manage announcemen

The level of permission to grant the access token to manage the post-receive hooks for an organization.

</td></tr>
<tr><td>permissions.organization_personal_access_tokens</td><td>no</td><td>

The level of permission to grant the access token for viewing and managing fine-grained personal access token requests to an organization.

</td></tr>
<tr><td>permissions.organization_personal_access_token_requests</td><td>no</td><td>

The level of permission to grant the access token for viewing and managing fine-grained personal access tokens that have been approved by an organization.

</td></tr>
<tr><td>permissions.organization_plan</td><td>no</td><td>

Expand Down
4 changes: 2 additions & 2 deletions docs/apps/deleteAuthorization.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ type: API method

# Delete an app authorization

OAuth application owners can revoke a grant for their OAuth application and a specific user. 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. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted.
Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized).
OAuth and GitHub application owners can revoke a grant for their application and a specific user. 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. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted.
Deleting an 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).

```js
octokit.rest.apps.deleteAuthorization({
Expand Down
2 changes: 1 addition & 1 deletion docs/apps/deleteToken.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type: API method

# Delete an app token

OAuth application owners can revoke a single token for an OAuth application. 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.
OAuth or GitHub application owners can revoke a single token for an OAuth application or a GitHub application with an OAuth authorization. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the application's `client_id` and `client_secret` as the username and password.

```js
octokit.rest.apps.deleteToken({
Expand Down
2 changes: 1 addition & 1 deletion docs/apps/listAccountsForPlan.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The unique identifier of the plan.
</td></tr>
<tr><td>sort</td><td>no</td><td>

The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to.
The property to sort the results by.

</td></tr>
<tr><td>direction</td><td>no</td><td>
Expand Down

0 comments on commit 835ab6b

Please sign in to comment.