Skip to content

Commit

Permalink
feat: deprecate import endpoints, new `octokit.rest.orgs.createOrUpda…
Browse files Browse the repository at this point in the history
…teCustomProperties()`, `octokit.rest.orgs.createOrUpdateCustomProperty()`, `octokit.rest.orgs.createOrUpdateCustomPropertiesValuesForRepos()`, `octokit.rest.actions.forceCancelWorkflowRun()`, `octokit.rest.orgs.getAllCustomProperties()`, `octokit.rest.orgs.getCustomProperty()`, `octokit.rest.orgs.listCustomPropertiesValuesForRepos()`, `octokit.rest.orgs.removeCustomProperty()` methods, `octokit.rest.orgs.removeCustomProperty()`description updates (#687)
  • Loading branch information
octokitbot committed Oct 24, 2023
1 parent 3c7810c commit 212e1e9
Show file tree
Hide file tree
Showing 91 changed files with 3,430 additions and 709 deletions.
1 change: 0 additions & 1 deletion docs/actions/addCustomLabelsToSelfHostedRunnerForRepo.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ type: API method
Add 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.
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.

Expand Down
1 change: 0 additions & 1 deletion docs/actions/cancelWorkflowRun.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ 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.
If the repository is private, you must use an access token with the `repo` scope.
GitHub Apps must have the `actions:write` permission to use this endpoint.

```js
Expand Down
1 change: 0 additions & 1 deletion docs/actions/createEnvironmentVariable.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ 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.
If the repository is private, you must use an access token with the `repo` scope.
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.

Expand Down
1 change: 0 additions & 1 deletion docs/actions/createRegistrationTokenForRepo.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ 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.
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.

Expand Down
1 change: 0 additions & 1 deletion docs/actions/createRemoveTokenForRepo.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ Returns a token that you can pass to remove a self-hosted runner from
a repository. The token expires after one hour.

You must authenticate using an access token with the `repo` 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.

Expand Down
1 change: 0 additions & 1 deletion docs/actions/createRepoVariable.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ 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.
If the repository is private, you must use an access token with the `repo` scope.
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.

Expand Down
1 change: 0 additions & 1 deletion docs/actions/deleteEnvironmentVariable.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ 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.
If the repository is private, you must use an access token with the `repo` scope.
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.

Expand Down
1 change: 0 additions & 1 deletion docs/actions/deleteRepoVariable.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ type: API method
Deletes a repository variable using the variable name.

You must authenticate using an access token with the `repo` 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 `actions_variables:write` repository permission to use this endpoint.
Authenticated users must have collaborator access to a repository to create, update, or read variables.

Expand Down
1 change: 0 additions & 1 deletion docs/actions/deleteSelfHostedRunnerFromRepo.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ type: API method
Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists.

You must authenticate using an access token with the `repo` 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.

Expand Down
54 changes: 54 additions & 0 deletions docs/actions/forceCancelWorkflowRun.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
name: Force cancel a workflow run
example: octokit.rest.actions.forceCancelWorkflowRun({ owner, repo, run_id })
route: POST /repos/{owner}/{repo}/actions/runs/{run_id}/force-cancel
scope: actions
type: API method
---

# Force cancel a workflow run

Cancels a workflow run and bypasses conditions that would otherwise cause a workflow execution to continue, such as an `always()` condition on a job.
You should only use this endpoint to cancel a workflow run when the workflow run is not responding to [`POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel`](/rest/actions/workflow-runs#cancel-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.

```js
octokit.rest.actions.forceCancelWorkflowRun({
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 without the `.git` extension. 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#force-cancel-a-workflow-run).
1 change: 0 additions & 1 deletion docs/actions/generateRunnerJitconfigForRepo.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ type: API method
Generates a configuration that can be passed to the runner application at startup.

You must authenticate using an access token with the `repo` 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.

Expand Down
1 change: 0 additions & 1 deletion docs/actions/getEnvironmentVariable.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ type: API method
Gets a specific variable in an environment.

You must authenticate using an access token with the `repo` 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 `environments:read` repository permission to use this endpoint.
Authenticated users must have collaborator access to a repository to create, update, or read variables.

Expand Down
1 change: 0 additions & 1 deletion docs/actions/getRepoVariable.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ type: API method
Gets a specific variable in a repository.

You must authenticate using an access token with the `repo` 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 `actions_variables:read` repository permission to use this endpoint.
Authenticated users must have collaborator access to a repository to create, update, or read variables.

Expand Down
1 change: 0 additions & 1 deletion docs/actions/getSelfHostedRunnerForRepo.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ type: API method
Gets a specific self-hosted runner configured in a repository.

You must authenticate using an access token with the `repo` 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.

Expand Down
1 change: 0 additions & 1 deletion docs/actions/listEnvironmentVariables.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ type: API method
Lists all environment variables.

You must authenticate using an access token with the `repo` 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 `environments:read` repository permission to use this endpoint.
Authenticated users must have collaborator access to a repository to create, update, or read variables.

Expand Down
1 change: 0 additions & 1 deletion docs/actions/listLabelsForSelfHostedRunnerForRepo.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ type: API method
Lists all labels for a self-hosted runner configured in a repository.

You must authenticate using an access token with the `repo` 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.

Expand Down
1 change: 0 additions & 1 deletion docs/actions/listRepoOrganizationVariables.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ type: API method
Lists all organiation variables shared with a repository.

You must authenticate using an access token with the `repo` 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 `actions_variables:read` repository permission to use this endpoint.
Authenticated users must have collaborator access to a repository to create, update, or read variables.

Expand Down
1 change: 0 additions & 1 deletion docs/actions/listRepoVariables.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ type: API method

Lists all repository variables.
You must authenticate using an access token with the `repo` 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 `actions_variables:read` repository permission to use this endpoint.
Authenticated users must have collaborator access to a repository to create, update, or read variables.

Expand Down
1 change: 0 additions & 1 deletion docs/actions/listRunnerApplicationsForRepo.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ type: API method
Lists binaries for the runner application that you can download and run.

You must authenticate using an access token with the `repo` 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.

Expand Down
1 change: 0 additions & 1 deletion docs/actions/listSelfHostedRunnersForRepo.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ type: API method
Lists all self-hosted runners configured in a repository.

You must authenticate using an access token with the `repo` 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.

Expand Down
1 change: 0 additions & 1 deletion docs/actions/reRunJobForWorkflowRun.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ type: API method
Re-run a job and its dependent jobs in a workflow run.

You must authenticate using an access token with the `repo` 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 `actions:write` permission to use this endpoint.

```js
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ Remove all custom labels from a self-hosted runner configured in a
repository. Returns the remaining read-only labels from the runner.

You must authenticate using an access token with the `repo` 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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ This endpoint returns a `404 Not Found` status if the custom label is not
present on the runner.

You must authenticate using an access token with the `repo` 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.

Expand Down
1 change: 0 additions & 1 deletion docs/actions/setCustomLabelsForSelfHostedRunnerForRepo.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ Remove all previous custom labels and set the new custom labels for a specific
self-hosted runner configured in a repository.

You must authenticate using an access token with the `repo` 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.

Expand Down
1 change: 0 additions & 1 deletion docs/actions/updateEnvironmentVariable.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ type: API method
Updates 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.
If the repository is private, you must use an access token with the `repo` scope.
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.

Expand Down
1 change: 0 additions & 1 deletion docs/actions/updateRepoVariable.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ type: API method
Updates 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.
If the repository is private, you must use an access token with the `repo` scope.
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.

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

# List check runs for a Git reference

**Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.

Lists check runs for a commit ref. The `ref` can be a SHA, branch name, or a tag name. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth apps and authenticated users must have the `repo` scope to get check runs in a private repository.

**Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.

If there are more than 1000 check suites on a single git reference, this endpoint will limit check runs to the 1000 most recent check suites. To iterate over all possible check runs, use the [List check suites for a Git reference](https://docs.github.com/rest/reference/checks#list-check-suites-for-a-git-reference) endpoint and provide the `check_suite_id` parameter to the [List check runs in a check suite](https://docs.github.com/rest/reference/checks#list-check-runs-in-a-check-suite) endpoint.

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

# List check runs in a check suite

**Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.

Lists check runs for a check suite using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth apps and authenticated users must have the `repo` scope to get check runs in a private repository.

**Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.

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

# List check suites for a Git reference

**Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`.

Lists check suites for a commit `ref`. The `ref` can be a SHA, branch name, or a tag name. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to list check suites. OAuth apps and authenticated users must have the `repo` scope to get check suites in a private repository.

**Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`.

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

# Update a check run

**Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.

Updates a check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to edit check runs.

**Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.

```js
octokit.rest.checks.update({
owner,
Expand Down
2 changes: 1 addition & 1 deletion docs/codeScanning/updateDefaultSetup.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ CodeQL query suite to be used.
</td></tr>
<tr><td>languages</td><td>no</td><td>

CodeQL languages to be analyzed. Supported values are: `c-cpp`, `csharp`, `go`, `java-kotlin`, `javascript-typescript`, `python`, `ruby`, and `swift`.
CodeQL languages to be analyzed.

</td></tr>
</tbody>
Expand Down

0 comments on commit 212e1e9

Please sign in to comment.