Skip to content

feat: codeScanning.listAlertInstances(), actions.approveWorkflowRun(). Deprecates codeScanning.listAlertsInstances() #384

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
May 21, 2021
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ jobs:
strategy:
matrix:
node_version:
- "10"
- "12"
- 10
- 12
- 14
- 16
steps:
- uses: actions/checkout@master
- name: "Use Node.js ${{ matrix.node_version }}"
Expand Down
50 changes: 50 additions & 0 deletions docs/actions/approveWorkflowRun.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
name: Approve a workflow run for a fork pull request
example: octokit.rest.actions.approveWorkflowRun({ owner, repo, run_id })
route: POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve
scope: actions
type: API method
---

# Approve a workflow run for a fork pull request

**Note:** This endpoint is currently in beta and is subject to change.

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.

```js
octokit.rest.actions.approveWorkflowRun({
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>

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

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

The id of the workflow run.

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

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/actions#approve-a-workflow-run-for-a-fork-pull-request).
2 changes: 1 addition & 1 deletion docs/actions/cancelWorkflowRun.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ octokit.rest.actions.cancelWorkflowRun({
</td></tr>
<tr><td>run_id</td><td>yes</td><td>

The id of the workflow run
The id of the workflow run.

</td></tr>
</tbody>
Expand Down
2 changes: 1 addition & 1 deletion docs/actions/deleteWorkflowRun.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ octokit.rest.actions.deleteWorkflowRun({
</td></tr>
<tr><td>run_id</td><td>yes</td><td>

The id of the workflow run
The id of the workflow run.

</td></tr>
</tbody>
Expand Down
2 changes: 1 addition & 1 deletion docs/actions/deleteWorkflowRunLogs.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ octokit.rest.actions.deleteWorkflowRunLogs({
</td></tr>
<tr><td>run_id</td><td>yes</td><td>

The id of the workflow run
The id of the workflow run.

</td></tr>
</tbody>
Expand Down
2 changes: 1 addition & 1 deletion docs/actions/downloadWorkflowRunLogs.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ octokit.rest.actions.downloadWorkflowRunLogs({
</td></tr>
<tr><td>run_id</td><td>yes</td><td>

The id of the workflow run
The id of the workflow run.

</td></tr>
</tbody>
Expand Down
2 changes: 1 addition & 1 deletion docs/actions/getPendingDeploymentsForRun.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ octokit.rest.actions.getPendingDeploymentsForRun({
</td></tr>
<tr><td>run_id</td><td>yes</td><td>

The id of the workflow run
The id of the workflow run.

</td></tr>
</tbody>
Expand Down
2 changes: 1 addition & 1 deletion docs/actions/getReviewsForRun.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ octokit.rest.actions.getReviewsForRun({
</td></tr>
<tr><td>run_id</td><td>yes</td><td>

The id of the workflow run
The id of the workflow run.

</td></tr>
</tbody>
Expand Down
2 changes: 1 addition & 1 deletion docs/actions/getWorkflowRun.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ octokit.rest.actions.getWorkflowRun({
</td></tr>
<tr><td>run_id</td><td>yes</td><td>

The id of the workflow run
The id of the workflow run.

</td></tr>
</tbody>
Expand Down
2 changes: 1 addition & 1 deletion docs/actions/getWorkflowRunUsage.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ octokit.rest.actions.getWorkflowRunUsage({
</td></tr>
<tr><td>run_id</td><td>yes</td><td>

The id of the workflow run
The id of the workflow run.

</td></tr>
</tbody>
Expand Down
2 changes: 1 addition & 1 deletion docs/actions/listJobsForWorkflowRun.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ octokit.rest.actions.listJobsForWorkflowRun({
</td></tr>
<tr><td>run_id</td><td>yes</td><td>

The id of the workflow run
The id of the workflow run.

</td></tr>
<tr><td>filter</td><td>no</td><td>
Expand Down
2 changes: 1 addition & 1 deletion docs/actions/listWorkflowRunArtifacts.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ octokit.rest.actions.listWorkflowRunArtifacts({
</td></tr>
<tr><td>run_id</td><td>yes</td><td>

The id of the workflow run
The id of the workflow run.

</td></tr>
<tr><td>per_page</td><td>no</td><td>
Expand Down
2 changes: 1 addition & 1 deletion docs/actions/reRunWorkflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ octokit.rest.actions.reRunWorkflow({
</td></tr>
<tr><td>run_id</td><td>yes</td><td>

The id of the workflow run
The id of the workflow run.

</td></tr>
</tbody>
Expand Down
2 changes: 1 addition & 1 deletion docs/actions/reviewPendingDeploymentsForRun.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ octokit.rest.actions.reviewPendingDeploymentsForRun({
</td></tr>
<tr><td>run_id</td><td>yes</td><td>

The id of the workflow run
The id of the workflow run.

</td></tr>
<tr><td>environment_ids</td><td>yes</td><td>
Expand Down
2 changes: 1 addition & 1 deletion docs/apps/createFromManifest.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ octokit.rest.apps.createFromManifest({
</tbody>
</table>

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/apps/#create-a-github-app-from-a-manifest).
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/apps#create-a-github-app-from-a-manifest).
2 changes: 1 addition & 1 deletion docs/apps/deleteInstallation.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ installation_id parameter
</tbody>
</table>

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/apps/#delete-an-installation-for-the-authenticated-app).
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/apps#delete-an-installation-for-the-authenticated-app).
2 changes: 1 addition & 1 deletion docs/apps/getAuthenticated.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ octokit.rest.apps.getAuthenticated();

This endpoint has no parameters

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/apps/#get-the-authenticated-app).
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/apps#get-the-authenticated-app).
2 changes: 1 addition & 1 deletion docs/apps/getInstallation.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ installation_id parameter
</tbody>
</table>

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/apps/#get-an-installation-for-the-authenticated-app).
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/apps#get-an-installation-for-the-authenticated-app).
2 changes: 1 addition & 1 deletion docs/apps/getOrgInstallation.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ octokit.rest.apps.getOrgInstallation({
</tbody>
</table>

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/apps/#get-an-organization-installation-for-the-authenticated-app).
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/apps#get-an-organization-installation-for-the-authenticated-app).
2 changes: 1 addition & 1 deletion docs/apps/getRepoInstallation.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ octokit.rest.apps.getRepoInstallation({
</tbody>
</table>

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/apps/#get-a-repository-installation-for-the-authenticated-app).
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/apps#get-a-repository-installation-for-the-authenticated-app).
2 changes: 1 addition & 1 deletion docs/apps/getUserInstallation.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ octokit.rest.apps.getUserInstallation({
</tbody>
</table>

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/apps/#get-a-user-installation-for-the-authenticated-app).
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/apps#get-a-user-installation-for-the-authenticated-app).
2 changes: 1 addition & 1 deletion docs/apps/listInstallations.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ Only show notifications updated after the given time. This is a timestamp in [IS
</tbody>
</table>

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/apps/#list-installations-for-the-authenticated-app).
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app).
2 changes: 1 addition & 1 deletion docs/apps/suspendInstallation.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ installation_id parameter
</tbody>
</table>

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/apps/#suspend-an-app-installation).
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/apps#suspend-an-app-installation).
2 changes: 1 addition & 1 deletion docs/apps/unsuspendInstallation.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ installation_id parameter
</tbody>
</table>

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/apps/#unsuspend-an-app-installation).
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/apps#unsuspend-an-app-installation).
2 changes: 1 addition & 1 deletion docs/billing/getGithubActionsBillingOrg.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ octokit.rest.billing.getGithubActionsBillingOrg({
</tbody>
</table>

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/billing/#get-github-actions-billing-for-an-organization).
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-an-organization).
2 changes: 1 addition & 1 deletion docs/billing/getGithubActionsBillingUser.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ octokit.rest.billing.getGithubActionsBillingUser({
</tbody>
</table>

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/billing/#get-github-actions-billing-for-a-user).
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-a-user).
2 changes: 1 addition & 1 deletion docs/billing/getGithubPackagesBillingOrg.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ octokit.rest.billing.getGithubPackagesBillingOrg({
</tbody>
</table>

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/billing/#get-github-packages-billing-for-an-organization).
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-an-organization).
2 changes: 1 addition & 1 deletion docs/billing/getGithubPackagesBillingUser.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ octokit.rest.billing.getGithubPackagesBillingUser({
</tbody>
</table>

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/billing/#get-github-packages-billing-for-a-user).
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-a-user).
2 changes: 1 addition & 1 deletion docs/billing/getSharedStorageBillingOrg.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ octokit.rest.billing.getSharedStorageBillingOrg({
</tbody>
</table>

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/billing/#get-shared-storage-billing-for-an-organization).
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-an-organization).
2 changes: 1 addition & 1 deletion docs/billing/getSharedStorageBillingUser.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ octokit.rest.billing.getSharedStorageBillingUser({
</tbody>
</table>

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/billing/#get-shared-storage-billing-for-a-user).
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-a-user).
2 changes: 1 addition & 1 deletion docs/codeScanning/getSarif.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ The SARIF ID obtained after uploading.
</tbody>
</table>

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/code-scanning#get-information-about-a-sarif-upload).
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/code-scanning#list-recent-code-scanning-analyses-for-a-repository).
61 changes: 61 additions & 0 deletions docs/codeScanning/listAlertInstances.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
name: List instances of a code scanning alert
example: octokit.rest.codeScanning.listAlertInstances({ owner, repo, alert_number })
route: GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances
scope: codeScanning
type: API method
---

# List instances of a code scanning alert

Lists all instances of the specified code scanning alert. You must use an access token with the `security_events` scope to use this endpoint. GitHub Apps must have the `security_events` read permission to use this endpoint.

```js
octokit.rest.codeScanning.listAlertInstances({
owner,
repo,
alert_number,
});
```

## Parameters

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

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

</td></tr>
<tr><td>alert_number</td><td>yes</td><td>

The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation.

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

Page number of the results to fetch.

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

Results per page (max 100).

</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`.

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

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/code-scanning#list-instances-of-a-code-scanning-alert).
2 changes: 2 additions & 0 deletions docs/codeScanning/listAlertsInstances.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ type: API method

# List instances of a code scanning alert

**Deprecated:** This method has been renamed to codeScanning.listAlertInstances

Lists all instances of the specified code scanning alert. You must use an access token with the `security_events` scope to use this endpoint. GitHub Apps must have the `security_events` read permission to use this endpoint.

```js
Expand Down
2 changes: 1 addition & 1 deletion docs/codeScanning/uploadSarif.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,4 @@ The name of the tool used to generate the code scanning analysis. If this parame
</tbody>
</table>

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/code-scanning#upload-an-analysis-as-sarif-data).
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/code-scanning#upload-a-sarif-file).
2 changes: 1 addition & 1 deletion docs/codesOfConduct/getAllCodesOfConduct.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ octokit.rest.codesOfConduct.getAllCodesOfConduct();

This endpoint has no parameters

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/codes_of_conduct/#get-all-codes-of-conduct).
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/codes-of-conduct#get-all-codes-of-conduct).
2 changes: 1 addition & 1 deletion docs/codesOfConduct/getConductCode.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ octokit.rest.codesOfConduct.getConductCode({
</tbody>
</table>

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/codes_of_conduct/#get-a-code-of-conduct).
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/codes-of-conduct#get-a-code-of-conduct).
2 changes: 1 addition & 1 deletion docs/codesOfConduct/getForRepo.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ octokit.rest.codesOfConduct.getForRepo({
</tbody>
</table>

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/codes_of_conduct/#get-the-code-of-conduct-for-a-repository).
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/codes-of-conduct#get-the-code-of-conduct-for-a-repository).
2 changes: 1 addition & 1 deletion docs/emojis/get.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ octokit.rest.emojis.get();

This endpoint has no parameters

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/emojis/#get-emojis).
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/emojis#get-emojis).
2 changes: 1 addition & 1 deletion docs/gists/checkIsStarred.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ gist_id parameter
</tbody>
</table>

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/gists/#check-if-a-gist-is-starred).
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/gists#check-if-a-gist-is-starred).
2 changes: 1 addition & 1 deletion docs/gists/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ Content of the file
</tbody>
</table>

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/gists/#create-a-gist).
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/gists#create-a-gist).
2 changes: 1 addition & 1 deletion docs/gists/delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ gist_id parameter
</tbody>
</table>

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/gists/#delete-a-gist).
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/gists#delete-a-gist).
2 changes: 1 addition & 1 deletion docs/gists/fork.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ gist_id parameter
</tbody>
</table>

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/gists/#fork-a-gist).
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/gists#fork-a-gist).
Loading