Skip to content

feat: .actions.downloadWorkflowRunAttemptLogs(), .actions.getWorkflowRunAttempt(), .repos.generateReleaseNotes(), .checks.rerequestRun(). 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

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 2 commits into from
Oct 7, 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
55 changes: 55 additions & 0 deletions docs/actions/downloadWorkflowRunAttemptLogs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
name: Download workflow run attempt logs
example: octokit.rest.actions.downloadWorkflowRunAttemptLogs({ owner, repo, attempt_num, attempt_number })
route: GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs
scope: actions
type: API method
---

# Download workflow run attempt logs

Gets a redirect URL to download an archive of log files for a specific workflow run attempt. This link expires after
1 minute. Look for `Location:` in the response header to find the URL for the download. Anyone with read access to
the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope.
GitHub Apps must have the `actions:read` permission to use this endpoint.

```js
octokit.rest.actions.downloadWorkflowRunAttemptLogs({
owner,
repo,
attempt_num,
attempt_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>attempt_num</td><td>yes</td><td>

The attempt number of the workflow run.

</td></tr>
<tr><td>attempt_number</td><td>yes</td><td>

The attempt number of the workflow run.

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

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/actions#download-workflow-run-attempt-logs).
55 changes: 55 additions & 0 deletions docs/actions/getWorkflowRunAttempt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
name: Get a workflow run attempt
example: octokit.rest.actions.getWorkflowRunAttempt({ owner, repo, run_id, attempt_number })
route: GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}
scope: actions
type: API method
---

# Get a workflow run attempt

Gets a specific workflow run attempt. Anyone with read access to the repository
can use this endpoint. If the repository is private you must use an access token
with the `repo` scope. GitHub Apps must have the `actions:read` permission to
use this endpoint.

```js
octokit.rest.actions.getWorkflowRunAttempt({
owner,
repo,
run_id,
attempt_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>run_id</td><td>yes</td><td>

The id of the workflow run.

</td></tr>
<tr><td>attempt_number</td><td>yes</td><td>

The attempt number of the workflow run.

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

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/actions#get-a-workflow-run-attempt).
46 changes: 0 additions & 46 deletions docs/actions/retryWorkflow.md

This file was deleted.

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

# Add a repository to an app installation

**Deprecated:** This method has been renamed to apps.addRepoToInstallationForAuthenticatedUser

Add a single repository to an installation. The authenticated user must have admin access to the repository.

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.
Expand Down
44 changes: 44 additions & 0 deletions docs/apps/addRepoToInstallationForAuthenticatedUser.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
name: Add a repository to an app installation
example: octokit.rest.apps.addRepoToInstallationForAuthenticatedUser({ installation_id, repository_id })
route: PUT /user/installations/{installation_id}/repositories/{repository_id}
scope: apps
type: API method
---

# Add a repository to an app installation

Add a single repository to an installation. The authenticated user must have admin access to the repository.

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.

```js
octokit.rest.apps.addRepoToInstallationForAuthenticatedUser({
installation_id,
repository_id,
});
```

## Parameters

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

installation_id parameter

</td></tr>
<tr><td>repository_id</td><td>yes</td><td>

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

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/apps#add-a-repository-to-an-app-installation).
2 changes: 2 additions & 0 deletions docs/apps/removeRepoFromInstallation.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ type: API method

# Remove a repository from an app installation

**Deprecated:** This method has been renamed to apps.removeRepoFromInstallationForAuthenticatedUser

Remove a single repository from an installation. The authenticated user must have admin access to the repository.

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.
Expand Down
44 changes: 44 additions & 0 deletions docs/apps/removeRepoFromInstallationForAuthenticatedUser.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
name: Remove a repository from an app installation
example: octokit.rest.apps.removeRepoFromInstallationForAuthenticatedUser({ installation_id, repository_id })
route: DELETE /user/installations/{installation_id}/repositories/{repository_id}
scope: apps
type: API method
---

# Remove a repository from an app installation

Remove a single repository from an installation. The authenticated user must have admin access to the repository.

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.

```js
octokit.rest.apps.removeRepoFromInstallationForAuthenticatedUser({
installation_id,
repository_id,
});
```

## Parameters

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

installation_id parameter

</td></tr>
<tr><td>repository_id</td><td>yes</td><td>

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

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/apps#remove-a-repository-from-an-app-installation).
48 changes: 48 additions & 0 deletions docs/checks/rerequestRun.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
name: Rerequest a check run
example: octokit.rest.checks.rerequestRun({ owner, repo, check_run_id })
route: POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest
scope: checks
type: API method
---

# Rerequest a check run

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.

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.

```js
octokit.rest.checks.rerequestRun({
owner,
repo,
check_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>check_run_id</td><td>yes</td><td>

check_run_id parameter

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

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/checks#rerequest-a-check-run).
3 changes: 0 additions & 3 deletions docs/codeScanning/getAnalysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ the response contains the analysis data that was uploaded.
This is formatted as
[SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html).

**Deprecation notice**:
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.

```js
octokit.rest.codeScanning.getAnalysis({
owner,
Expand Down
48 changes: 48 additions & 0 deletions docs/migrations/listReposForAuthenticatedUser.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
name: List repositories for a user migration
example: octokit.rest.migrations.listReposForAuthenticatedUser({ migration_id })
route: GET /user/migrations/{migration_id}/repositories
scope: migrations
type: API method
---

# List repositories for a user migration

Lists all the repositories for this user migration.

```js
octokit.rest.migrations.listReposForAuthenticatedUser({
migration_id,
});
```

## Parameters

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

migration_id parameter

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

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/reference/migrations#list-repositories-for-a-user-migration).
2 changes: 2 additions & 0 deletions docs/migrations/listReposForUser.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ type: API method

# List repositories for a user migration

**Deprecated:** This method has been renamed to migrations.listReposForAuthenticatedUser

Lists all the repositories for this user migration.

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

# Accept a repository invitation

**Deprecated:** This method has been renamed to repos.acceptInvitationForAuthenticatedUser

```js
octokit.rest.repos.acceptInvitation({
invitation_id,
Expand Down
Loading