Skip to content

Commit 5d2de25

Browse files
authored
feat: GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_num}, GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_num}/logs, POST /repos/{owner}/{repo}/releases/generate-notes, POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest. Graduate nebula, zzzax, switcheroo, baptiste previews. Removes defunkt /repos/{owner}/{repo}/actions/runs/{run_id}/retry endpoint. Renames methods to have consistent AuthenticatedUser() suffix, deprecates previous method names (#462)
1 parent 2d038bf commit 5d2de25

File tree

57 files changed

+3491
-432
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+3491
-432
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
name: Download workflow run attempt logs
3+
example: octokit.rest.actions.downloadWorkflowRunAttemptLogs({ owner, repo, attempt_num, attempt_number })
4+
route: GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs
5+
scope: actions
6+
type: API method
7+
---
8+
9+
# Download workflow run attempt logs
10+
11+
Gets a redirect URL to download an archive of log files for a specific workflow run attempt. This link expires after
12+
1 minute. Look for `Location:` in the response header to find the URL for the download. Anyone with read access to
13+
the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope.
14+
GitHub Apps must have the `actions:read` permission to use this endpoint.
15+
16+
```js
17+
octokit.rest.actions.downloadWorkflowRunAttemptLogs({
18+
owner,
19+
repo,
20+
attempt_num,
21+
attempt_number,
22+
});
23+
```
24+
25+
## Parameters
26+
27+
<table>
28+
<thead>
29+
<tr>
30+
<th>name</th>
31+
<th>required</th>
32+
<th>description</th>
33+
</tr>
34+
</thead>
35+
<tbody>
36+
<tr><td>owner</td><td>yes</td><td>
37+
38+
</td></tr>
39+
<tr><td>repo</td><td>yes</td><td>
40+
41+
</td></tr>
42+
<tr><td>attempt_num</td><td>yes</td><td>
43+
44+
The attempt number of the workflow run.
45+
46+
</td></tr>
47+
<tr><td>attempt_number</td><td>yes</td><td>
48+
49+
The attempt number of the workflow run.
50+
51+
</td></tr>
52+
</tbody>
53+
</table>
54+
55+
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/actions#download-workflow-run-attempt-logs).

docs/actions/getWorkflowRunAttempt.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
name: Get a workflow run attempt
3+
example: octokit.rest.actions.getWorkflowRunAttempt({ owner, repo, run_id, attempt_number })
4+
route: GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}
5+
scope: actions
6+
type: API method
7+
---
8+
9+
# Get a workflow run attempt
10+
11+
Gets a specific workflow run attempt. Anyone with read access to the repository
12+
can use this endpoint. If the repository is private you must use an access token
13+
with the `repo` scope. GitHub Apps must have the `actions:read` permission to
14+
use this endpoint.
15+
16+
```js
17+
octokit.rest.actions.getWorkflowRunAttempt({
18+
owner,
19+
repo,
20+
run_id,
21+
attempt_number,
22+
});
23+
```
24+
25+
## Parameters
26+
27+
<table>
28+
<thead>
29+
<tr>
30+
<th>name</th>
31+
<th>required</th>
32+
<th>description</th>
33+
</tr>
34+
</thead>
35+
<tbody>
36+
<tr><td>owner</td><td>yes</td><td>
37+
38+
</td></tr>
39+
<tr><td>repo</td><td>yes</td><td>
40+
41+
</td></tr>
42+
<tr><td>run_id</td><td>yes</td><td>
43+
44+
The id of the workflow run.
45+
46+
</td></tr>
47+
<tr><td>attempt_number</td><td>yes</td><td>
48+
49+
The attempt number of the workflow run.
50+
51+
</td></tr>
52+
</tbody>
53+
</table>
54+
55+
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/actions#get-a-workflow-run-attempt).

docs/actions/retryWorkflow.md

Lines changed: 0 additions & 46 deletions
This file was deleted.

docs/apps/addRepoToInstallation.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ type: API method
88

99
# Add a repository to an app installation
1010

11+
**Deprecated:** This method has been renamed to apps.addRepoToInstallationForAuthenticatedUser
12+
1113
Add a single repository to an installation. The authenticated user must have admin access to the repository.
1214

1315
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.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
name: Add a repository to an app installation
3+
example: octokit.rest.apps.addRepoToInstallationForAuthenticatedUser({ installation_id, repository_id })
4+
route: PUT /user/installations/{installation_id}/repositories/{repository_id}
5+
scope: apps
6+
type: API method
7+
---
8+
9+
# Add a repository to an app installation
10+
11+
Add a single repository to an installation. The authenticated user must have admin access to the repository.
12+
13+
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.
14+
15+
```js
16+
octokit.rest.apps.addRepoToInstallationForAuthenticatedUser({
17+
installation_id,
18+
repository_id,
19+
});
20+
```
21+
22+
## Parameters
23+
24+
<table>
25+
<thead>
26+
<tr>
27+
<th>name</th>
28+
<th>required</th>
29+
<th>description</th>
30+
</tr>
31+
</thead>
32+
<tbody>
33+
<tr><td>installation_id</td><td>yes</td><td>
34+
35+
installation_id parameter
36+
37+
</td></tr>
38+
<tr><td>repository_id</td><td>yes</td><td>
39+
40+
</td></tr>
41+
</tbody>
42+
</table>
43+
44+
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/apps#add-a-repository-to-an-app-installation).

docs/apps/removeRepoFromInstallation.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ type: API method
88

99
# Remove a repository from an app installation
1010

11+
**Deprecated:** This method has been renamed to apps.removeRepoFromInstallationForAuthenticatedUser
12+
1113
Remove a single repository from an installation. The authenticated user must have admin access to the repository.
1214

1315
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.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
name: Remove a repository from an app installation
3+
example: octokit.rest.apps.removeRepoFromInstallationForAuthenticatedUser({ installation_id, repository_id })
4+
route: DELETE /user/installations/{installation_id}/repositories/{repository_id}
5+
scope: apps
6+
type: API method
7+
---
8+
9+
# Remove a repository from an app installation
10+
11+
Remove a single repository from an installation. The authenticated user must have admin access to the repository.
12+
13+
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.
14+
15+
```js
16+
octokit.rest.apps.removeRepoFromInstallationForAuthenticatedUser({
17+
installation_id,
18+
repository_id,
19+
});
20+
```
21+
22+
## Parameters
23+
24+
<table>
25+
<thead>
26+
<tr>
27+
<th>name</th>
28+
<th>required</th>
29+
<th>description</th>
30+
</tr>
31+
</thead>
32+
<tbody>
33+
<tr><td>installation_id</td><td>yes</td><td>
34+
35+
installation_id parameter
36+
37+
</td></tr>
38+
<tr><td>repository_id</td><td>yes</td><td>
39+
40+
</td></tr>
41+
</tbody>
42+
</table>
43+
44+
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/apps#remove-a-repository-from-an-app-installation).

docs/checks/rerequestRun.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
name: Rerequest a check run
3+
example: octokit.rest.checks.rerequestRun({ owner, repo, check_run_id })
4+
route: POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest
5+
scope: checks
6+
type: API method
7+
---
8+
9+
# Rerequest a check run
10+
11+
Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared.
12+
13+
To rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository.
14+
15+
```js
16+
octokit.rest.checks.rerequestRun({
17+
owner,
18+
repo,
19+
check_run_id,
20+
});
21+
```
22+
23+
## Parameters
24+
25+
<table>
26+
<thead>
27+
<tr>
28+
<th>name</th>
29+
<th>required</th>
30+
<th>description</th>
31+
</tr>
32+
</thead>
33+
<tbody>
34+
<tr><td>owner</td><td>yes</td><td>
35+
36+
</td></tr>
37+
<tr><td>repo</td><td>yes</td><td>
38+
39+
</td></tr>
40+
<tr><td>check_run_id</td><td>yes</td><td>
41+
42+
check_run_id parameter
43+
44+
</td></tr>
45+
</tbody>
46+
</table>
47+
48+
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/checks#rerequest-a-check-run).

docs/codeScanning/getAnalysis.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ the response contains the analysis data that was uploaded.
2727
This is formatted as
2828
[SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html).
2929

30-
**Deprecation notice**:
31-
The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field.
32-
3330
```js
3431
octokit.rest.codeScanning.getAnalysis({
3532
owner,
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
name: List repositories for a user migration
3+
example: octokit.rest.migrations.listReposForAuthenticatedUser({ migration_id })
4+
route: GET /user/migrations/{migration_id}/repositories
5+
scope: migrations
6+
type: API method
7+
---
8+
9+
# List repositories for a user migration
10+
11+
Lists all the repositories for this user migration.
12+
13+
```js
14+
octokit.rest.migrations.listReposForAuthenticatedUser({
15+
migration_id,
16+
});
17+
```
18+
19+
## Parameters
20+
21+
<table>
22+
<thead>
23+
<tr>
24+
<th>name</th>
25+
<th>required</th>
26+
<th>description</th>
27+
</tr>
28+
</thead>
29+
<tbody>
30+
<tr><td>migration_id</td><td>yes</td><td>
31+
32+
migration_id parameter
33+
34+
</td></tr>
35+
<tr><td>per_page</td><td>no</td><td>
36+
37+
Results per page (max 100)
38+
39+
</td></tr>
40+
<tr><td>page</td><td>no</td><td>
41+
42+
Page number of the results to fetch.
43+
44+
</td></tr>
45+
</tbody>
46+
</table>
47+
48+
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/migrations#list-repositories-for-a-user-migration).

docs/migrations/listReposForUser.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ type: API method
88

99
# List repositories for a user migration
1010

11+
**Deprecated:** This method has been renamed to migrations.listReposForAuthenticatedUser
12+
1113
Lists all the repositories for this user migration.
1214

1315
```js

docs/repos/acceptInvitation.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ type: API method
88

99
# Accept a repository invitation
1010

11+
**Deprecated:** This method has been renamed to repos.acceptInvitationForAuthenticatedUser
12+
1113
```js
1214
octokit.rest.repos.acceptInvitation({
1315
invitation_id,

0 commit comments

Comments
 (0)