Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 4 additions & 5 deletions docs/actions/addCustomLabelsToSelfHostedRunnerForOrg.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ type: API method

# Add custom labels to a self-hosted runner for an organization

Add custom labels to a self-hosted runner configured in an organization.
Adds custom labels to a self-hosted runner configured in an organization.

You must authenticate using an access token with the `admin:org` scope to use this endpoint.
If the repository is private, you must use an access token with the `repo` scope.
GitHub Apps must have the `administration` permission for repositories and the `organization_self_hosted_runners` permission for organizations.
Authenticated users must have admin access to repositories or organizations, or the `manage_runners:enterprise` scope for enterprises, to use these endpoints.
Authenticated users must have admin access to the organization to use this endpoint.

OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

```js
octokit.rest.actions.addCustomLabelsToSelfHostedRunnerForOrg({
Expand Down
8 changes: 4 additions & 4 deletions docs/actions/addCustomLabelsToSelfHostedRunnerForRepo.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ type: API method

# Add custom labels to a self-hosted runner for a repository

Add custom labels to a self-hosted runner configured in a repository.
Adds custom labels to a self-hosted runner configured in a repository.

You must authenticate using an access token with the `repo` scope to use this endpoint.
GitHub Apps must have the `administration` permission for repositories and the `organization_self_hosted_runners` permission for organizations.
Authenticated users must have admin access to repositories or organizations, or the `manage_runners:enterprise` scope for enterprises, to use these endpoints.
Authenticated users must have admin access to the organization to use this endpoint.

OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

```js
octokit.rest.actions.addCustomLabelsToSelfHostedRunnerForRepo({
Expand Down
7 changes: 3 additions & 4 deletions docs/actions/addSelectedRepoToOrgSecret.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ type: API method
# Add selected repository to an organization secret

Adds a repository to an organization secret when the `visibility` for
repository access is set to `selected`. The visibility is set when you [Create or
repository access is set to `selected`. For more information about setting the visibility, see [Create or
update an organization secret](https://docs.github.com/rest/actions/secrets#create-or-update-an-organization-secret).

You must authenticate using an access token with the `admin:org` scope to use this endpoint.
If the repository is private, you must use an access token with the `repo` scope.
GitHub Apps must have the `secrets` organization permission to use this endpoint.
Authenticated users must have collaborator access to a repository to create, update, or read secrets.

OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

```js
octokit.rest.actions.addSelectedRepoToOrgSecret({
org,
Expand Down
7 changes: 3 additions & 4 deletions docs/actions/addSelectedRepoToOrgVariable.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ type: API method
Adds a repository to an organization variable that is available to selected repositories.
Organization variables that are available to selected repositories have their `visibility` field set to `selected`.

You must authenticate using an access token with the `admin:org` scope to use this endpoint.
If the repository is private, you must use an access token with the `repo` scope.
GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint.
Authenticated users must have collaborator access to a repository to create, update, or read variables.
Authenticated users must have collaborator access to a repository to create, update, or read secrets.

OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

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

Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)."

You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint.
OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

```js
octokit.rest.actions.approveWorkflowRun({
Expand Down
3 changes: 1 addition & 2 deletions docs/actions/cancelWorkflowRun.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ type: API method

Cancels a workflow run using its `id`.

You must authenticate using an access token with the `repo` scope to use this endpoint.
GitHub Apps must have the `actions:write` permission to use this endpoint.
OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

```js
octokit.rest.actions.cancelWorkflowRun({
Expand Down
6 changes: 3 additions & 3 deletions docs/actions/createEnvironmentVariable.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ type: API method

Create an environment variable that you can reference in a GitHub Actions workflow.

You must authenticate using an access token with the `repo` scope to use this endpoint.
GitHub Apps must have the `environment:write` repository permission to use this endpoint.
Authenticated users must have collaborator access to a repository to create, update, or read variables.

OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

```js
octokit.rest.actions.createEnvironmentVariable({
repository_id,
Expand Down Expand Up @@ -41,7 +41,7 @@ The unique identifier of the repository.
</td></tr>
<tr><td>environment_name</td><td>yes</td><td>

The name of the environment.
The name of the environment. The name must be URL encoded. For example, any slashes in the name must be replaced with `%2F`.

</td></tr>
<tr><td>name</td><td>yes</td><td>
Expand Down
6 changes: 3 additions & 3 deletions docs/actions/createOrUpdateEnvironmentSecret.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ type: API method
Creates or updates an environment secret with an encrypted value. Encrypt your secret using
[LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/rest/guides/encrypting-secrets-for-the-rest-api)."

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.
Authenticated users must have collaborator access to a repository to create, update, or read secrets.

OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

```js
octokit.rest.actions.createOrUpdateEnvironmentSecret({
repository_id,
Expand Down Expand Up @@ -43,7 +43,7 @@ The unique identifier of the repository.
</td></tr>
<tr><td>environment_name</td><td>yes</td><td>

The name of the environment.
The name of the environment. The name must be URL encoded. For example, any slashes in the name must be replaced with `%2F`.

</td></tr>
<tr><td>secret_name</td><td>yes</td><td>
Expand Down
4 changes: 2 additions & 2 deletions docs/actions/createOrUpdateRepoSecret.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ type: API method
Creates or updates a repository secret with an encrypted value. Encrypt your secret using
[LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/rest/guides/encrypting-secrets-for-the-rest-api)."

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.
Authenticated users must have collaborator access to a repository to create, update, or read secrets.

OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

```js
octokit.rest.actions.createOrUpdateRepoSecret({
owner,
Expand Down
5 changes: 2 additions & 3 deletions docs/actions/createOrgVariable.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ type: API method

Creates an organization variable that you can reference in a GitHub Actions workflow.

You must authenticate using an access token with the `admin:org` scope to use this endpoint.
If the repository is private, you must use an access token with the `repo` scope.
GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint.
Authenticated users must have collaborator access to a repository to create, update, or read variables.

OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

```js
octokit.rest.actions.createOrgVariable({
org,
Expand Down
13 changes: 5 additions & 8 deletions docs/actions/createRegistrationTokenForOrg.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,16 @@ type: API method

Returns a token that you can pass to the `config` script. The token expires after one hour.

You must authenticate using an access token with the `admin:org` scope to use this endpoint.
If the repository is private, you must use an access token with the `repo` scope.
GitHub Apps must have the `administration` permission for repositories and the `organization_self_hosted_runners` permission for organizations.
Authenticated users must have admin access to repositories or organizations, or the `manage_runners:enterprise` scope for enterprises, to use these endpoints.

Example using registration token:

Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint.
For example, you can replace `TOKEN` in the following example with the registration token provided by this endpoint to configure your self-hosted runner:

```
./config.sh --url https://github.com/octo-org --token TOKEN
```

Authenticated users must have admin access to the organization to use this endpoint.

OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

```js
octokit.rest.actions.createRegistrationTokenForOrg({
org,
Expand Down
16 changes: 7 additions & 9 deletions docs/actions/createRegistrationTokenForRepo.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,17 @@ type: API method

# Create a registration token for a repository

Returns a token that you can pass to the `config` script. The token
expires after one hour.
Returns a token that you can pass to the `config` script. The token expires after one hour.

You must authenticate using an access token with the `repo` scope to use this endpoint.
GitHub Apps must have the `administration` permission for repositories and the `organization_self_hosted_runners` permission for organizations.
Authenticated users must have admin access to repositories or organizations, or the `manage_runners:enterprise` scope for enterprises, to use these endpoints.
For example, you can replace `TOKEN` in the following example with the registration token provided by this endpoint to configure your self-hosted runner:

Example using registration token:
```
./config.sh --url https://github.com/octo-org --token TOKEN
```

Configure your self-hosted runner, replacing `TOKEN` with the registration token provided
by this endpoint.
Authenticated users must have admin access to the repository to use this endpoint.

`config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN`
OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

```js
octokit.rest.actions.createRegistrationTokenForRepo({
Expand Down
14 changes: 5 additions & 9 deletions docs/actions/createRemoveTokenForOrg.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,16 @@ type: API method

Returns a token that you can pass to the `config` script to remove a self-hosted runner from an organization. The token expires after one hour.

You must authenticate using an access token with the `admin:org` scope to use this endpoint.
If the repository is private, you must use an access token with the `repo` scope.
GitHub Apps must have the `administration` permission for repositories and the `organization_self_hosted_runners` permission for organizations.
Authenticated users must have admin access to repositories or organizations, or the `manage_runners:enterprise` scope for enterprises, to use these endpoints.

Example using remove token:

To remove your self-hosted runner from an organization, replace `TOKEN` with the remove token provided by this
endpoint.
For example, you can replace `TOKEN` in the following example with the registration token provided by this endpoint to remove your self-hosted runner from an organization:

```
./config.sh remove --token TOKEN
```

Authenticated users must have admin access to the organization to use this endpoint.

OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

```js
octokit.rest.actions.createRemoveTokenForOrg({
org,
Expand Down
16 changes: 7 additions & 9 deletions docs/actions/createRemoveTokenForRepo.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,17 @@ type: API method

# Create a remove token for a repository

Returns a token that you can pass to remove a self-hosted runner from
a repository. The token expires after one hour.
Returns a token that you can pass to the `config` script to remove a self-hosted runner from an repository. The token expires after one hour.

You must authenticate using an access token with the `repo` scope to use this endpoint.
GitHub Apps must have the `administration` permission for repositories and the `organization_self_hosted_runners` permission for organizations.
Authenticated users must have admin access to repositories or organizations, or the `manage_runners:enterprise` scope for enterprises, to use these endpoints.
For example, you can replace `TOKEN` in the following example with the registration token provided by this endpoint to remove your self-hosted runner from an organization:

Example using remove token:
```
./config.sh remove --token TOKEN
```

To remove your self-hosted runner from a repository, replace TOKEN with
the remove token provided by this endpoint.
Authenticated users must have admin access to the repository to use this endpoint.

`config.sh remove --token TOKEN`
OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

```js
octokit.rest.actions.createRemoveTokenForRepo({
Expand Down
4 changes: 2 additions & 2 deletions docs/actions/createRepoVariable.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ type: API method

Creates a repository variable that you can reference in a GitHub Actions workflow.

You must authenticate using an access token with the `repo` scope to use this endpoint.
GitHub Apps must have the `actions_variables:write` repository permission to use this endpoint.
Authenticated users must have collaborator access to a repository to create, update, or read variables.

OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

```js
octokit.rest.actions.createRepoVariable({
owner,
Expand Down
2 changes: 1 addition & 1 deletion docs/actions/createWorkflowDispatch.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ You can use this endpoint to manually trigger a GitHub Actions workflow run. You

You must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)."

You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)."
OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

```js
octokit.rest.actions.createWorkflowDispatch({
Expand Down
4 changes: 1 addition & 3 deletions docs/actions/deleteActionsCacheById.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ type: API method

Deletes a GitHub Actions cache for a repository, using a cache ID.

You must authenticate using an access token with the `repo` scope to use this endpoint.

GitHub Apps must have the `actions:write` permission to use this endpoint.
OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

```js
octokit.rest.actions.deleteActionsCacheById({
Expand Down
4 changes: 1 addition & 3 deletions docs/actions/deleteActionsCacheByKey.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ type: API method

Deletes one or more GitHub Actions caches for a repository, using a complete cache key. By default, all caches that match the provided key are deleted, but you can optionally provide a Git ref to restrict deletions to caches that match both the provided key and the Git ref.

You must authenticate using an access token with the `repo` scope to use this endpoint.

GitHub Apps must have the `actions:write` permission to use this endpoint.
OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

```js
octokit.rest.actions.deleteActionsCacheByKey({
Expand Down
3 changes: 2 additions & 1 deletion docs/actions/deleteArtifact.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ type: API method

# Delete an artifact

Deletes an artifact for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint.
Deletes an artifact for a workflow run.
OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

```js
octokit.rest.actions.deleteArtifact({
Expand Down
6 changes: 3 additions & 3 deletions docs/actions/deleteEnvironmentSecret.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ type: API method

Deletes a secret in an environment using the secret name.

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.
Authenticated users must have collaborator access to a repository to create, update, or read secrets.

OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

```js
octokit.rest.actions.deleteEnvironmentSecret({
repository_id,
Expand All @@ -40,7 +40,7 @@ The unique identifier of the repository.
</td></tr>
<tr><td>environment_name</td><td>yes</td><td>

The name of the environment.
The name of the environment. The name must be URL encoded. For example, any slashes in the name must be replaced with `%2F`.

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

Deletes an environment variable using the variable name.

You must authenticate using an access token with the `repo` scope to use this endpoint.
GitHub Apps must have the `environment:write` repository permission to use this endpoint.
Authenticated users must have collaborator access to a repository to create, update, or read variables.

OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

```js
octokit.rest.actions.deleteEnvironmentVariable({
repository_id,
Expand Down Expand Up @@ -45,7 +45,7 @@ The name of the variable.
</td></tr>
<tr><td>environment_name</td><td>yes</td><td>

The name of the environment.
The name of the environment. The name must be URL encoded. For example, any slashes in the name must be replaced with `%2F`.

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

Deletes a secret in an organization using the secret name.

You must authenticate using an access token with the `admin:org` scope to use this endpoint.
If the repository is private, you must use an access token with the `repo` scope.
GitHub Apps must have the `secrets` organization permission to use this endpoint.
Authenticated users must have collaborator access to a repository to create, update, or read secrets.

OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

```js
octokit.rest.actions.deleteOrgSecret({
org,
Expand Down
Loading