diff --git a/docs/actions/cancelWorkflowRun.md b/docs/actions/cancelWorkflowRun.md index 3cd97879a..379b3dcb8 100644 --- a/docs/actions/cancelWorkflowRun.md +++ b/docs/actions/cancelWorkflowRun.md @@ -8,7 +8,7 @@ type: API method # Cancel a workflow run -Cancels a workflow run using its `id`. Anyone with write access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint. +Cancels a workflow run using its `id`. Anyone with write access to the repository and an access token with the `repo` scope can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint. ```js octokit.actions.cancelWorkflowRun({ diff --git a/docs/actions/createOrUpdateSecretForRepo.md b/docs/actions/createOrUpdateSecretForRepo.md index 2ef079a74..ba4975afb 100644 --- a/docs/actions/createOrUpdateSecretForRepo.md +++ b/docs/actions/createOrUpdateSecretForRepo.md @@ -8,7 +8,7 @@ type: API method # Create or update a secret for a repository -Creates or updates a secret with an encrypted value. Encrypt your secret using [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). Anyone with write access to the repository can use this endpoint. GitHub Apps must have the `secrets` permission to use this endpoint. +Creates or updates a secret with an encrypted value. Encrypt your secret using [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). Anyone with write access to the repository and an access token with the `repo` scope can use this endpoint. GitHub Apps must have the `secrets` permission to use this endpoint. Encrypt your secret using the [tweetsodium](https://github.com/mastahyeti/tweetsodium) library. diff --git a/docs/actions/createRegistrationToken.md b/docs/actions/createRegistrationToken.md index 666fe4b43..7c8ddc697 100644 --- a/docs/actions/createRegistrationToken.md +++ b/docs/actions/createRegistrationToken.md @@ -10,7 +10,7 @@ type: API method **Deprecated:** This method has been renamed to actions.createRegistrationTokenForRepo -Returns a token that you can pass to the `config` script. The token expires after one hour. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration:write` repository permission to use this endpoint. +Returns a token that you can pass to the `config` script. The token expires after one hour. Anyone with admin access to the repository and an access token with the `repo` scope can use this endpoint. Configure your self-hosted runner, replacing TOKEN with the registration token provided by this endpoint. diff --git a/docs/actions/createRegistrationTokenForOrg.md b/docs/actions/createRegistrationTokenForOrg.md index 3cb86e09a..03f257bd1 100644 --- a/docs/actions/createRegistrationTokenForOrg.md +++ b/docs/actions/createRegistrationTokenForOrg.md @@ -10,7 +10,7 @@ type: API method **Warning:** The self-hosted runners API for organizations is currently in public beta and subject to change. -Returns a token that you can pass to the `config` script. The token expires after one hour. Anyone with admin access to the organization can use this endpoint. GitHub Apps must have the `self-hosted runners:write` organization permission to use this endpoint. +Returns a token that you can pass to the `config` script. The token expires after one hour. Anyone with admin access to the organization can use this endpoint. Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. diff --git a/docs/actions/createRegistrationTokenForRepo.md b/docs/actions/createRegistrationTokenForRepo.md index 2f15f8a01..99a96c782 100644 --- a/docs/actions/createRegistrationTokenForRepo.md +++ b/docs/actions/createRegistrationTokenForRepo.md @@ -8,7 +8,7 @@ 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. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration:write` repository permission to use this endpoint. +Returns a token that you can pass to the `config` script. The token expires after one hour. Anyone with admin access to the repository and an access token with the `repo` scope can use this endpoint. Configure your self-hosted runner, replacing TOKEN with the registration token provided by this endpoint. diff --git a/docs/actions/createRemoveToken.md b/docs/actions/createRemoveToken.md index 692e6eb9a..04babf633 100644 --- a/docs/actions/createRemoveToken.md +++ b/docs/actions/createRemoveToken.md @@ -10,7 +10,7 @@ type: API method **Deprecated:** This method has been renamed to actions.createRemoveTokenForRepo -Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration:write` repository permission to use this endpoint. +Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. Anyone with admin access to the repository and an access token with the `repo` scope can use this endpoint. Remove your self-hosted runner from a repository, replacing TOKEN with the remove token provided by this endpoint. diff --git a/docs/actions/createRemoveTokenForOrg.md b/docs/actions/createRemoveTokenForOrg.md index 9f357bc9e..7fcba6ba1 100644 --- a/docs/actions/createRemoveTokenForOrg.md +++ b/docs/actions/createRemoveTokenForOrg.md @@ -10,7 +10,7 @@ type: API method **Warning:** The self-hosted runners API for organizations is currently in public beta and subject to change. -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. Anyone with admin access to the organization can use this endpoint. GitHub Apps must have the `self-hosted runners:write` organization permission to use this endpoint. +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. Anyone with admin access to the organization can use this endpoint. To remove your self-hosted runner from an organization, replace `TOKEN` with the remove token provided by this endpoint. diff --git a/docs/actions/createRemoveTokenForRepo.md b/docs/actions/createRemoveTokenForRepo.md index 114eb344b..2cd4465f1 100644 --- a/docs/actions/createRemoveTokenForRepo.md +++ b/docs/actions/createRemoveTokenForRepo.md @@ -8,7 +8,7 @@ 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. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration:write` repository permission to use this endpoint. +Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. Anyone with admin access to the repository and an access token with the `repo` scope can use this endpoint. Remove your self-hosted runner from a repository, replacing TOKEN with the remove token provided by this endpoint. diff --git a/docs/actions/deleteArtifact.md b/docs/actions/deleteArtifact.md index 66b5ce5f1..fae8a30f2 100644 --- a/docs/actions/deleteArtifact.md +++ b/docs/actions/deleteArtifact.md @@ -8,7 +8,7 @@ type: API method # Delete an artifact -Deletes an artifact for a workflow run. Anyone with write access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint. +Deletes an artifact for a workflow run. Anyone with write access to the repository and an access token with the `repo` scope can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint. ```js octokit.actions.deleteArtifact({ diff --git a/docs/actions/deleteSecretFromRepo.md b/docs/actions/deleteSecretFromRepo.md index 59b19ca67..0b886d5df 100644 --- a/docs/actions/deleteSecretFromRepo.md +++ b/docs/actions/deleteSecretFromRepo.md @@ -8,7 +8,7 @@ type: API method # Delete a secret from a repository -Deletes a secret in a repository using the secret name. Anyone with write access to the repository can use this endpoint. GitHub Apps must have the `secrets` permission to use this endpoint. +Deletes a secret in a repository using the secret name. Anyone with write access to the repository and an access token with the `repo` scope can use this endpoint. GitHub Apps must have the `secrets` permission to use this endpoint. ```js octokit.actions.deleteSecretFromRepo({ diff --git a/docs/actions/deleteSelfHostedRunnerFromOrg.md b/docs/actions/deleteSelfHostedRunnerFromOrg.md index 790d8cd52..276d9dba0 100644 --- a/docs/actions/deleteSelfHostedRunnerFromOrg.md +++ b/docs/actions/deleteSelfHostedRunnerFromOrg.md @@ -10,7 +10,7 @@ type: API method **Warning:** The self-hosted runners API for organizations is currently in public beta and subject to change. -Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. Anyone with admin access to the organization can use this endpoint. GitHub Apps must have the `self-hosted runners:write` organization permission to use this endpoint. +Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. Anyone with admin access to the organization can use this endpoint. ```js octokit.actions.deleteSelfHostedRunnerFromOrg({ diff --git a/docs/actions/deleteSelfHostedRunnerFromRepo.md b/docs/actions/deleteSelfHostedRunnerFromRepo.md index 39b5cee1f..8610e3885 100644 --- a/docs/actions/deleteSelfHostedRunnerFromRepo.md +++ b/docs/actions/deleteSelfHostedRunnerFromRepo.md @@ -8,7 +8,7 @@ type: API method # Delete a self-hosted runner from a repository -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. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration:write` repository permission to use this endpoint. +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. Anyone with admin access to the repository and an access token with the `repo` scope can use this endpoint. ```js octokit.actions.deleteSelfHostedRunnerFromRepo({ diff --git a/docs/actions/deleteWorkflowRunLogs.md b/docs/actions/deleteWorkflowRunLogs.md index f1ffbfc6c..0925e3948 100644 --- a/docs/actions/deleteWorkflowRunLogs.md +++ b/docs/actions/deleteWorkflowRunLogs.md @@ -8,7 +8,7 @@ type: API method # Delete workflow run logs -Deletes all logs for a workflow run. Anyone with write access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint. +Deletes all logs for a workflow run. Anyone with write access to the repository and an access token with the `repo` scope can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint. ```js octokit.actions.deleteWorkflowRunLogs({ diff --git a/docs/actions/downloadArtifact.md b/docs/actions/downloadArtifact.md index 6da7bc942..78f24573b 100644 --- a/docs/actions/downloadArtifact.md +++ b/docs/actions/downloadArtifact.md @@ -8,7 +8,7 @@ type: API method # Download an artifact -Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in the response header to find the URL for the download. The `:archive_format` must be `zip`. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint. +Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in the response header to find the URL for the download. The `:archive_format` must be `zip`. 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` permission to use this endpoint. Call this endpoint using the `-v` flag, which enables verbose output and allows you to see the download URL in the header. To download the file into the current working directory, specify the filename using the `-o` flag. diff --git a/docs/actions/downloadWorkflowJobLogs.md b/docs/actions/downloadWorkflowJobLogs.md new file mode 100644 index 000000000..f22b9902d --- /dev/null +++ b/docs/actions/downloadWorkflowJobLogs.md @@ -0,0 +1,52 @@ +--- +name: Download workflow job logs +example: octokit.actions.downloadWorkflowJobLogs({ owner, repo, job_id }) +route: GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs +scope: actions +type: API method +--- + +# Download workflow job logs + +Gets a redirect URL to download a plain text file of logs for a workflow job. 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` permission to use this endpoint. + +Call this endpoint using the `-v` flag, which enables verbose output and allows you to see the download URL in the header. To download the file into the current working directory, specify the filename using the `-o` flag. + +```js +octokit.actions.downloadWorkflowJobLogs({ + owner, + repo, + job_id, +}); +``` + +## Parameters + + + + + + + + + + + + + + +
namerequireddescription
owneryes + +owner parameter + +
repoyes + +repo parameter + +
job_idyes + +job_id parameter + +
+ +See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/actions/workflow-jobs/#download-workflow-job-logs). diff --git a/docs/actions/downloadWorkflowRunLogs.md b/docs/actions/downloadWorkflowRunLogs.md new file mode 100644 index 000000000..1e0448768 --- /dev/null +++ b/docs/actions/downloadWorkflowRunLogs.md @@ -0,0 +1,52 @@ +--- +name: Download workflow run logs +example: octokit.actions.downloadWorkflowRunLogs({ owner, repo, run_id }) +route: GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs +scope: actions +type: API method +--- + +# Download workflow run logs + +Gets a redirect URL to download an archive of log files for a workflow run. 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` permission to use this endpoint. + +Call this endpoint using the `-v` flag, which enables verbose output and allows you to see the download URL in the header. To download the file into the current working directory, specify the filename using the `-o` flag. + +```js +octokit.actions.downloadWorkflowRunLogs({ + owner, + repo, + run_id, +}); +``` + +## Parameters + + + + + + + + + + + + + + +
namerequireddescription
owneryes + +owner parameter + +
repoyes + +repo parameter + +
run_idyes + +run_id parameter + +
+ +See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/actions/workflow-runs/#download-workflow-run-logs). diff --git a/docs/actions/getArtifact.md b/docs/actions/getArtifact.md index 16499bf98..408296932 100644 --- a/docs/actions/getArtifact.md +++ b/docs/actions/getArtifact.md @@ -8,7 +8,7 @@ type: API method # Get an artifact -Gets a specific artifact for a workflow run. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint. +Gets a specific artifact for a workflow run. 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` permission to use this endpoint. ```js octokit.actions.getArtifact({ diff --git a/docs/actions/getPublicKey.md b/docs/actions/getPublicKey.md index 58b59479c..598ef4a66 100644 --- a/docs/actions/getPublicKey.md +++ b/docs/actions/getPublicKey.md @@ -8,7 +8,7 @@ type: API method # Get your public key -Gets your public key, which you must store. You need your public key to use other secrets endpoints. Use the returned `key` to encrypt your secrets. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `secrets` permission to use this endpoint. +Gets your public key, which you must store. You need your public key to use other secrets endpoints. Use the returned `key` to encrypt your secrets. 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 `secrets` permission to use this endpoint. ```js octokit.actions.getPublicKey({ diff --git a/docs/actions/getSecret.md b/docs/actions/getSecret.md index f26497f08..ba75d8d9d 100644 --- a/docs/actions/getSecret.md +++ b/docs/actions/getSecret.md @@ -8,7 +8,7 @@ type: API method # Get a secret -Gets a single secret without revealing its encrypted value. Anyone with write access to the repository can use this endpoint. GitHub Apps must have the `secrets` permission to use this endpoint. +Gets a single secret without revealing its encrypted value. Anyone with write access to the repository and an access token with the `repo` scope can use this endpoint. GitHub Apps must have the `secrets` permission to use this endpoint. ```js octokit.actions.getSecret({ diff --git a/docs/actions/getSelfHostedRunner.md b/docs/actions/getSelfHostedRunner.md index 6c901165e..285fceb04 100644 --- a/docs/actions/getSelfHostedRunner.md +++ b/docs/actions/getSelfHostedRunner.md @@ -10,7 +10,7 @@ type: API method **Deprecated:** This method has been renamed to actions.getSelfHostedRunnerForRepo -Gets a specific self-hosted runner. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration:read` repository permission to use this endpoint. +Gets a specific self-hosted runner. Anyone with admin access to the repository and an access token with the `repo` scope can use this endpoint. ```js octokit.actions.getSelfHostedRunner({ diff --git a/docs/actions/getSelfHostedRunnerForOrg.md b/docs/actions/getSelfHostedRunnerForOrg.md index 264f56fc1..f4b6a36cc 100644 --- a/docs/actions/getSelfHostedRunnerForOrg.md +++ b/docs/actions/getSelfHostedRunnerForOrg.md @@ -10,7 +10,7 @@ type: API method **Warning:** The self-hosted runners API for organizations is currently in public beta and subject to change. -Gets a specific self-hosted runner for an organization. Anyone with admin access to the organization can use this endpoint. GitHub Apps must have the `self-hosted runners:read` organization permission to use this endpoint. +Gets a specific self-hosted runner for an organization. Anyone with admin access to the organization can use this endpoint. ```js octokit.actions.getSelfHostedRunnerForOrg({ diff --git a/docs/actions/getSelfHostedRunnerForRepo.md b/docs/actions/getSelfHostedRunnerForRepo.md index e5a1758e7..687575bcf 100644 --- a/docs/actions/getSelfHostedRunnerForRepo.md +++ b/docs/actions/getSelfHostedRunnerForRepo.md @@ -8,7 +8,7 @@ type: API method # Get a self-hosted runner for a repository -Gets a specific self-hosted runner. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration:read` repository permission to use this endpoint. +Gets a specific self-hosted runner. Anyone with admin access to the repository and an access token with the `repo` scope can use this endpoint. ```js octokit.actions.getSelfHostedRunnerForRepo({ diff --git a/docs/actions/getWorkflow.md b/docs/actions/getWorkflow.md index a6673f9b4..dabee8e1c 100644 --- a/docs/actions/getWorkflow.md +++ b/docs/actions/getWorkflow.md @@ -8,7 +8,7 @@ type: API method # Get a workflow -Gets a specific workflow. You can also replace `:workflow_id` with `:workflow_file_name`. For example, you could use `main.yml`. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint. +Gets a specific workflow. You can also replace `:workflow_id` with `:workflow_file_name`. For example, you could use `main.yml`. 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` permission to use this endpoint. ```js octokit.actions.getWorkflow({ diff --git a/docs/actions/getWorkflowJob.md b/docs/actions/getWorkflowJob.md index 50b64e38f..3874499dd 100644 --- a/docs/actions/getWorkflowJob.md +++ b/docs/actions/getWorkflowJob.md @@ -8,7 +8,7 @@ type: API method # Get a workflow job -Gets a specific job in a workflow run. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint. +Gets a specific job in a workflow run. 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` permission to use this endpoint. ```js octokit.actions.getWorkflowJob({ diff --git a/docs/actions/getWorkflowRun.md b/docs/actions/getWorkflowRun.md index d27df1f55..3cf209e7d 100644 --- a/docs/actions/getWorkflowRun.md +++ b/docs/actions/getWorkflowRun.md @@ -8,7 +8,7 @@ type: API method # Get a workflow run -Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint. +Gets a specific workflow run. 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` permission to use this endpoint. ```js octokit.actions.getWorkflowRun({ diff --git a/docs/actions/listArtifactsForRepo.md b/docs/actions/listArtifactsForRepo.md index 8ac6f6fb1..001bb271c 100644 --- a/docs/actions/listArtifactsForRepo.md +++ b/docs/actions/listArtifactsForRepo.md @@ -8,7 +8,7 @@ type: API method # List artifacts for a repository -Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint. +Lists all artifacts for a repository. 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` permission to use this endpoint. ```js octokit.actions.listArtifactsForRepo({ diff --git a/docs/actions/listDownloadsForSelfHostedRunnerApplication.md b/docs/actions/listDownloadsForSelfHostedRunnerApplication.md index 0e7df3c89..e4dffd6e9 100644 --- a/docs/actions/listDownloadsForSelfHostedRunnerApplication.md +++ b/docs/actions/listDownloadsForSelfHostedRunnerApplication.md @@ -10,7 +10,7 @@ type: API method **Deprecated:** This method has been renamed to actions.listRunnerApplicationsForRepo -Lists binaries for the runner application that you can download and run. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration:read` repository permission to use this endpoint. +Lists binaries for the runner application that you can download and run. Anyone with admin access to the repository and an access token with the `repo` scope can use this endpoint. ```js octokit.actions.listDownloadsForSelfHostedRunnerApplication({ diff --git a/docs/actions/listJobsForWorkflowRun.md b/docs/actions/listJobsForWorkflowRun.md index 3d3c26ade..2e6dca402 100644 --- a/docs/actions/listJobsForWorkflowRun.md +++ b/docs/actions/listJobsForWorkflowRun.md @@ -8,7 +8,7 @@ type: API method # List jobs for a workflow run -Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://developer.github.com/v3/#parameters). +Lists jobs for a workflow run. 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` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://developer.github.com/v3/#parameters). ```js octokit.actions.listJobsForWorkflowRun({ diff --git a/docs/actions/listRepoWorkflowRuns.md b/docs/actions/listRepoWorkflowRuns.md index 3e5703773..67a5123e2 100644 --- a/docs/actions/listRepoWorkflowRuns.md +++ b/docs/actions/listRepoWorkflowRuns.md @@ -10,7 +10,7 @@ type: API method Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://developer.github.com/v3/#parameters). -Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint. +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` permission to use this endpoint. ```js octokit.actions.listRepoWorkflowRuns({ diff --git a/docs/actions/listRepoWorkflows.md b/docs/actions/listRepoWorkflows.md index 2fadceeba..d2ef74358 100644 --- a/docs/actions/listRepoWorkflows.md +++ b/docs/actions/listRepoWorkflows.md @@ -8,7 +8,7 @@ type: API method # List repository workflows -Lists the workflows in a repository. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint. +Lists the workflows in a repository. 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` permission to use this endpoint. ```js octokit.actions.listRepoWorkflows({ diff --git a/docs/actions/listRunnerApplicationsForOrg.md b/docs/actions/listRunnerApplicationsForOrg.md index 22a3d7362..e9ceaece0 100644 --- a/docs/actions/listRunnerApplicationsForOrg.md +++ b/docs/actions/listRunnerApplicationsForOrg.md @@ -10,7 +10,7 @@ type: API method **Warning:** The self-hosted runners API for organizations is currently in public beta and subject to change. -Lists binaries for the runner application that you can download and run. Anyone with admin access to the organization can use this endpoint. GitHub Apps must have the `self-hosted runners:read` organization permission to use this endpoint. +Lists binaries for the runner application that you can download and run. Anyone with admin access to the organization can use this endpoint. ```js octokit.actions.listRunnerApplicationsForOrg({ diff --git a/docs/actions/listRunnerApplicationsForRepo.md b/docs/actions/listRunnerApplicationsForRepo.md index 0e53e13b3..aac6aac0e 100644 --- a/docs/actions/listRunnerApplicationsForRepo.md +++ b/docs/actions/listRunnerApplicationsForRepo.md @@ -8,7 +8,7 @@ type: API method # List runner applications for a repository -Lists binaries for the runner application that you can download and run. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration:read` repository permission to use this endpoint. +Lists binaries for the runner application that you can download and run. Anyone with admin access to the repository and an access token with the `repo` scope can use this endpoint. ```js octokit.actions.listRunnerApplicationsForRepo({ diff --git a/docs/actions/listSecretsForRepo.md b/docs/actions/listSecretsForRepo.md index 47e9063ff..96aab90fe 100644 --- a/docs/actions/listSecretsForRepo.md +++ b/docs/actions/listSecretsForRepo.md @@ -8,7 +8,7 @@ type: API method # List secrets for a repository -Lists all secrets available in a repository without revealing their encrypted values. Anyone with write access to the repository can use this endpoint. GitHub Apps must have the `secrets` permission to use this endpoint. +Lists all secrets available in a repository without revealing their encrypted values. Anyone with write access to the repository and an access token with the `repo` scope can use this endpoint. GitHub Apps must have the `secrets` permission to use this endpoint. ```js octokit.actions.listSecretsForRepo({ diff --git a/docs/actions/listSelfHostedRunnersForOrg.md b/docs/actions/listSelfHostedRunnersForOrg.md index 779b3f9ae..080fc340f 100644 --- a/docs/actions/listSelfHostedRunnersForOrg.md +++ b/docs/actions/listSelfHostedRunnersForOrg.md @@ -10,7 +10,7 @@ type: API method **Warning:** The self-hosted runners API for organizations is currently in public beta and subject to change. -Lists all self-hosted runners for an organization. Anyone with admin access to the organization can use this endpoint. GitHub Apps must have the `self-hosted runners:read` organization permission to use this endpoint. +Lists all self-hosted runners for an organization. Anyone with admin access to the organization can use this endpoint. ```js octokit.actions.listSelfHostedRunnersForOrg({ diff --git a/docs/actions/listSelfHostedRunnersForRepo.md b/docs/actions/listSelfHostedRunnersForRepo.md index 43fbbf8c2..aa842f774 100644 --- a/docs/actions/listSelfHostedRunnersForRepo.md +++ b/docs/actions/listSelfHostedRunnersForRepo.md @@ -8,7 +8,7 @@ type: API method # List self-hosted runners for a repository -Lists all self-hosted runners for a repository. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration:read` repository permission to use this endpoint. +Lists all self-hosted runners for a repository. Anyone with admin access to the repository and an access token with the `repo` scope can use this endpoint. ```js octokit.actions.listSelfHostedRunnersForRepo({ diff --git a/docs/actions/listWorkflowJobLogs.md b/docs/actions/listWorkflowJobLogs.md index f1061e80a..f3da0ddea 100644 --- a/docs/actions/listWorkflowJobLogs.md +++ b/docs/actions/listWorkflowJobLogs.md @@ -1,14 +1,16 @@ --- -name: List workflow job logs +name: Download workflow job logs example: octokit.actions.listWorkflowJobLogs({ owner, repo, job_id }) route: GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs scope: actions type: API method --- -# List workflow job logs +# Download workflow job logs -Gets a redirect URL to download a plain text file of logs for a workflow job. 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. GitHub Apps must have the `actions` permission to use this endpoint. +**Deprecated:** This method has been renamed to actions.downloadWorkflowJobLogs + +Gets a redirect URL to download a plain text file of logs for a workflow job. 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` permission to use this endpoint. Call this endpoint using the `-v` flag, which enables verbose output and allows you to see the download URL in the header. To download the file into the current working directory, specify the filename using the `-o` flag. @@ -45,18 +47,8 @@ repo parameter job_id parameter - -per_pageno - -Results per page (max 100) - - -pageno - -Page number of the results to fetch. - -See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/actions/workflow-jobs/#list-workflow-job-logs). +See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/actions/workflow-jobs/#download-workflow-job-logs). diff --git a/docs/actions/listWorkflowRunArtifacts.md b/docs/actions/listWorkflowRunArtifacts.md index c2ec06849..3eacfbc76 100644 --- a/docs/actions/listWorkflowRunArtifacts.md +++ b/docs/actions/listWorkflowRunArtifacts.md @@ -8,7 +8,7 @@ type: API method # List workflow run artifacts -Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint. +Lists artifacts for a workflow run. 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` permission to use this endpoint. ```js octokit.actions.listWorkflowRunArtifacts({ diff --git a/docs/actions/listWorkflowRunLogs.md b/docs/actions/listWorkflowRunLogs.md index 976b109b3..12e905d1f 100644 --- a/docs/actions/listWorkflowRunLogs.md +++ b/docs/actions/listWorkflowRunLogs.md @@ -1,14 +1,16 @@ --- -name: List workflow run logs +name: Download workflow run logs example: octokit.actions.listWorkflowRunLogs({ owner, repo, run_id }) route: GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs scope: actions type: API method --- -# List workflow run logs +# Download workflow run logs -Gets a redirect URL to download an archive of log files for a workflow run. 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. GitHub Apps must have the `actions` permission to use this endpoint. +**Deprecated:** This method has been renamed to actions.downloadWorkflowRunLogs + +Gets a redirect URL to download an archive of log files for a workflow run. 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` permission to use this endpoint. Call this endpoint using the `-v` flag, which enables verbose output and allows you to see the download URL in the header. To download the file into the current working directory, specify the filename using the `-o` flag. @@ -45,18 +47,8 @@ repo parameter run_id parameter - -per_pageno - -Results per page (max 100) - - -pageno - -Page number of the results to fetch. - -See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/actions/workflow-runs/#list-workflow-run-logs). +See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/actions/workflow-runs/#download-workflow-run-logs). diff --git a/docs/actions/listWorkflowRuns.md b/docs/actions/listWorkflowRuns.md index f4e88b7d7..f85561772 100644 --- a/docs/actions/listWorkflowRuns.md +++ b/docs/actions/listWorkflowRuns.md @@ -10,7 +10,7 @@ type: API method List all workflow runs for a workflow. You can also replace `:workflow_id` with `:workflow_file_name`. For example, you could use `main.yml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://developer.github.com/v3/#parameters). -Anyone with read access to the repository can use this endpoint. +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. ```js octokit.actions.listWorkflowRuns({ diff --git a/docs/actions/reRunWorkflow.md b/docs/actions/reRunWorkflow.md index 92573599a..d25a5f382 100644 --- a/docs/actions/reRunWorkflow.md +++ b/docs/actions/reRunWorkflow.md @@ -8,7 +8,7 @@ type: API method # Re-run a workflow -Re-runs your workflow run using its `id`. Anyone with write access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint. +Re-runs your workflow run using its `id`. Anyone with write access to the repository and an access token with the `repo` scope can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint. ```js octokit.actions.reRunWorkflow({ diff --git a/docs/actions/removeSelfHostedRunner.md b/docs/actions/removeSelfHostedRunner.md index 16b2b0fea..4035ee2dd 100644 --- a/docs/actions/removeSelfHostedRunner.md +++ b/docs/actions/removeSelfHostedRunner.md @@ -10,7 +10,7 @@ type: API method **Deprecated:** This method has been renamed to actions.deleteSelfHostedRunnerFromRepo -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. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration:write` repository permission to use this endpoint. +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. Anyone with admin access to the repository and an access token with the `repo` scope can use this endpoint. ```js octokit.actions.removeSelfHostedRunner({ diff --git a/docs/apps/deleteInstallation.md b/docs/apps/deleteInstallation.md index fea9ea90b..0ba674125 100644 --- a/docs/apps/deleteInstallation.md +++ b/docs/apps/deleteInstallation.md @@ -8,7 +8,7 @@ type: API method # Delete an installation -Uninstalls a GitHub App on a user, organization, or business account. +Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an installation](https://developer.github.com/v3/apps/#suspend-an-installation)" endpoint. You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. diff --git a/docs/apps/suspendInstallation.md b/docs/apps/suspendInstallation.md new file mode 100644 index 000000000..9389b6dee --- /dev/null +++ b/docs/apps/suspendInstallation.md @@ -0,0 +1,44 @@ +--- +name: Suspend an installation +example: octokit.apps.suspendInstallation({ installation_id }) +route: PUT /app/installations/{installation_id}/suspended +scope: apps +type: API method +--- + +# Suspend an installation + +**Note:** Suspending a GitHub App installation is currently in beta and subject to change. Before you can suspend a GitHub App, the app owner must enable suspending installations for the app by opting-in to the beta. For more information, see "[Suspending a GitHub App installation](https://developer.github.com/apps/managing-github-apps/suspending-a-github-app-installation/)." + +Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account. + +To suspend a GitHub App, you must be an account owner or have admin permissions in the repository or organization where the app is installed. + +You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + +```js +octokit.apps.suspendInstallation({ + installation_id, +}); +``` + +## Parameters + + + + + + + + + + + + +
namerequireddescription
installation_idyes + +installation_id parameter + +
+ +See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/apps/#suspend-an-installation). diff --git a/docs/apps/unsuspendInstallation.md b/docs/apps/unsuspendInstallation.md new file mode 100644 index 000000000..97d14ebd6 --- /dev/null +++ b/docs/apps/unsuspendInstallation.md @@ -0,0 +1,44 @@ +--- +name: Unsuspend an installation +example: octokit.apps.unsuspendInstallation({ installation_id }) +route: DELETE /app/installations/{installation_id}/suspended +scope: apps +type: API method +--- + +# Unsuspend an installation + +**Note:** Suspending a GitHub App installation is currently in beta and subject to change. Before you can suspend a GitHub App, the app owner must enable suspending installations for the app by opting-in to the beta. For more information, see "[Suspending a GitHub App installation](https://developer.github.com/apps/managing-github-apps/suspending-a-github-app-installation/)." + +Removes a GitHub App installation suspension. + +To unsuspend a GitHub App, you must be an account owner or have admin permissions in the repository or organization where the app is installed and suspended. + +You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + +```js +octokit.apps.unsuspendInstallation({ + installation_id, +}); +``` + +## Parameters + + + + + + + + + + + + +
namerequireddescription
installation_idyes + +installation_id parameter + +
+ +See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/apps/#unsuspend-an-installation). diff --git a/package-lock.json b/package-lock.json index 7fb4bd575..69d90cfe2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1730,9 +1730,9 @@ } }, "@octokit/types": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-2.12.1.tgz", - "integrity": "sha512-LRLR1tjbcCfAmUElvTmMvLEzstpx6Xt/aQVTg2xvd+kHA2Ekp1eWl5t+gU7bcwjXHYEAzh4hH4WH+kS3vh+wRw==", + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-2.13.0.tgz", + "integrity": "sha512-aSHYeR01V/ZDyU6BaCGqndC8qAjUBH/OFw3Y6EmHdP2uVFsgoPtxUJLPJEfhhr8f7F2cGS9QZ0tUqnfItHxKug==", "requires": { "@types/node": ">= 8" } diff --git a/package.json b/package.json index 623587384..5f14c5f04 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "author": "Gregor Martynus (https://twitter.com/gr2m)", "license": "MIT", "dependencies": { - "@octokit/types": "^2.12.1", + "@octokit/types": "^2.13.0", "deprecation": "^2.3.1" }, "devDependencies": { diff --git a/scripts/update-endpoints/generated/endpoints.json b/scripts/update-endpoints/generated/endpoints.json index c78e63f4f..4052d8b73 100644 --- a/scripts/update-endpoints/generated/endpoints.json +++ b/scripts/update-endpoints/generated/endpoints.json @@ -184,7 +184,7 @@ "url": "/app/installations/{installation_id}", "isDeprecated": false, "isLegacy": false, - "description": "Uninstalls a GitHub App on a user, organization, or business account.\n\nYou must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.", + "description": "Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the \"[Suspend an installation](https://developer.github.com/v3/apps/#suspend-an-installation)\" endpoint.\n\nYou must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.", "documentationUrl": "https://developer.github.com/v3/apps/#delete-an-installation", "previews": [{ "name": "machine-man" }], "headers": [ @@ -284,6 +284,66 @@ ], "renamed": null }, + { + "name": "Suspend an installation", + "scope": "apps", + "id": "suspendInstallation", + "method": "PUT", + "url": "/app/installations/{installation_id}/suspended", + "isDeprecated": false, + "isLegacy": false, + "description": "**Note:** Suspending a GitHub App installation is currently in beta and subject to change. Before you can suspend a GitHub App, the app owner must enable suspending installations for the app by opting-in to the beta. For more information, see \"[Suspending a GitHub App installation](https://developer.github.com/apps/managing-github-apps/suspending-a-github-app-installation/).\"\n\nSuspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account.\n\nTo suspend a GitHub App, you must be an account owner or have admin permissions in the repository or organization where the app is installed.\n\nYou must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.", + "documentationUrl": "https://developer.github.com/v3/apps/#suspend-an-installation", + "previews": [], + "headers": [], + "parameters": [ + { + "name": "installation_id", + "description": "installation_id parameter", + "in": "PATH", + "type": "integer", + "required": true, + "enum": null, + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + } + ], + "responses": [], + "renamed": null + }, + { + "name": "Unsuspend an installation", + "scope": "apps", + "id": "unsuspendInstallation", + "method": "DELETE", + "url": "/app/installations/{installation_id}/suspended", + "isDeprecated": false, + "isLegacy": false, + "description": "**Note:** Suspending a GitHub App installation is currently in beta and subject to change. Before you can suspend a GitHub App, the app owner must enable suspending installations for the app by opting-in to the beta. For more information, see \"[Suspending a GitHub App installation](https://developer.github.com/apps/managing-github-apps/suspending-a-github-app-installation/).\"\n\nRemoves a GitHub App installation suspension.\n\nTo unsuspend a GitHub App, you must be an account owner or have admin permissions in the repository or organization where the app is installed and suspended.\n\nYou must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.", + "documentationUrl": "https://developer.github.com/v3/apps/#unsuspend-an-installation", + "previews": [], + "headers": [], + "parameters": [ + { + "name": "installation_id", + "description": "installation_id parameter", + "in": "PATH", + "type": "integer", + "required": true, + "enum": null, + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + } + ], + "responses": [], + "renamed": null + }, { "name": "List your grants", "scope": "oauthAuthorizations", @@ -5051,7 +5111,7 @@ "url": "/orgs/{org}/actions/runners", "isDeprecated": false, "isLegacy": false, - "description": "**Warning:** The self-hosted runners API for organizations is currently in public beta and subject to change.\n\nLists all self-hosted runners for an organization. Anyone with admin access to the organization can use this endpoint. GitHub Apps must have the `self-hosted runners:read` organization permission to use this endpoint.", + "description": "**Warning:** The self-hosted runners API for organizations is currently in public beta and subject to change.\n\nLists all self-hosted runners for an organization. Anyone with admin access to the organization can use this endpoint.", "documentationUrl": "https://developer.github.com/v3/actions/self-hosted-runners/#list-self-hosted-runners-for-an-organization", "previews": [], "headers": [], @@ -5117,7 +5177,7 @@ "url": "/orgs/{org}/actions/runners/downloads", "isDeprecated": false, "isLegacy": false, - "description": "**Warning:** The self-hosted runners API for organizations is currently in public beta and subject to change.\n\nLists binaries for the runner application that you can download and run. Anyone with admin access to the organization can use this endpoint. GitHub Apps must have the `self-hosted runners:read` organization permission to use this endpoint.", + "description": "**Warning:** The self-hosted runners API for organizations is currently in public beta and subject to change.\n\nLists binaries for the runner application that you can download and run. Anyone with admin access to the organization can use this endpoint.", "documentationUrl": "https://developer.github.com/v3/actions/self-hosted-runners/#list-runner-applications-for-an-organization", "previews": [], "headers": [], @@ -5157,7 +5217,7 @@ "url": "/orgs/{org}/actions/runners/registration-token", "isDeprecated": false, "isLegacy": false, - "description": "**Warning:** The self-hosted runners API for organizations is currently in public beta and subject to change.\n\nReturns a token that you can pass to the `config` script. The token expires after one hour. Anyone with admin access to the organization can use this endpoint. GitHub Apps must have the `self-hosted runners:write` organization permission to use this endpoint.\n\nConfigure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint.", + "description": "**Warning:** The self-hosted runners API for organizations is currently in public beta and subject to change.\n\nReturns a token that you can pass to the `config` script. The token expires after one hour. Anyone with admin access to the organization can use this endpoint.\n\nConfigure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint.", "documentationUrl": "https://developer.github.com/v3/actions/self-hosted-runners/#create-a-registration-token-for-an-organization", "previews": [], "headers": [], @@ -5197,7 +5257,7 @@ "url": "/orgs/{org}/actions/runners/remove-token", "isDeprecated": false, "isLegacy": false, - "description": "**Warning:** The self-hosted runners API for organizations is currently in public beta and subject to change.\n\nReturns 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. Anyone with admin access to the organization can use this endpoint. GitHub Apps must have the `self-hosted runners:write` organization permission to use this endpoint.\n\nTo remove your self-hosted runner from an organization, replace `TOKEN` with the remove token provided by this endpoint.", + "description": "**Warning:** The self-hosted runners API for organizations is currently in public beta and subject to change.\n\nReturns 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. Anyone with admin access to the organization can use this endpoint.\n\nTo remove your self-hosted runner from an organization, replace `TOKEN` with the remove token provided by this endpoint.", "documentationUrl": "https://developer.github.com/v3/actions/self-hosted-runners/#create-a-remove-token-for-an-organization", "previews": [], "headers": [], @@ -5237,7 +5297,7 @@ "url": "/orgs/{org}/actions/runners/{runner_id}", "isDeprecated": false, "isLegacy": false, - "description": "**Warning:** The self-hosted runners API for organizations is currently in public beta and subject to change.\n\nGets a specific self-hosted runner for an organization. Anyone with admin access to the organization can use this endpoint. GitHub Apps must have the `self-hosted runners:read` organization permission to use this endpoint.", + "description": "**Warning:** The self-hosted runners API for organizations is currently in public beta and subject to change.\n\nGets a specific self-hosted runner for an organization. Anyone with admin access to the organization can use this endpoint.", "documentationUrl": "https://developer.github.com/v3/actions/self-hosted-runners/#get-a-self-hosted-runner-for-an-organization", "previews": [], "headers": [], @@ -5290,7 +5350,7 @@ "url": "/orgs/{org}/actions/runners/{runner_id}", "isDeprecated": false, "isLegacy": false, - "description": "**Warning:** The self-hosted runners API for organizations is currently in public beta and subject to change.\n\nForces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. Anyone with admin access to the organization can use this endpoint. GitHub Apps must have the `self-hosted runners:write` organization permission to use this endpoint.", + "description": "**Warning:** The self-hosted runners API for organizations is currently in public beta and subject to change.\n\nForces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. Anyone with admin access to the organization can use this endpoint.", "documentationUrl": "https://developer.github.com/v3/actions/self-hosted-runners/#delete-a-self-hosted-runner-from-an-organization", "previews": [], "headers": [], @@ -13011,7 +13071,7 @@ "url": "/repos/{owner}/{repo}/actions/artifacts", "isDeprecated": false, "isLegacy": false, - "description": "Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint.", + "description": "Lists all artifacts for a repository. 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` permission to use this endpoint.", "documentationUrl": "https://developer.github.com/v3/actions/artifacts/#list-artifacts-for-a-repository", "previews": [], "headers": [], @@ -13090,7 +13150,7 @@ "url": "/repos/{owner}/{repo}/actions/artifacts/{artifact_id}", "isDeprecated": false, "isLegacy": false, - "description": "Gets a specific artifact for a workflow run. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint.", + "description": "Gets a specific artifact for a workflow run. 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` permission to use this endpoint.", "documentationUrl": "https://developer.github.com/v3/actions/artifacts/#get-an-artifact", "previews": [], "headers": [], @@ -13156,7 +13216,7 @@ "url": "/repos/{owner}/{repo}/actions/artifacts/{artifact_id}", "isDeprecated": false, "isLegacy": false, - "description": "Deletes an artifact for a workflow run. Anyone with write access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint.", + "description": "Deletes an artifact for a workflow run. Anyone with write access to the repository and an access token with the `repo` scope can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint.", "documentationUrl": "https://developer.github.com/v3/actions/artifacts/#delete-an-artifact", "previews": [], "headers": [], @@ -13212,7 +13272,7 @@ "url": "/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}", "isDeprecated": false, "isLegacy": false, - "description": "Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in the response header to find the URL for the download. The `:archive_format` must be `zip`. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint.\n\nCall this endpoint using the `-v` flag, which enables verbose output and allows you to see the download URL in the header. To download the file into the current working directory, specify the filename using the `-o` flag.", + "description": "Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in the response header to find the URL for the download. The `:archive_format` must be `zip`. 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` permission to use this endpoint.\n\nCall this endpoint using the `-v` flag, which enables verbose output and allows you to see the download URL in the header. To download the file into the current working directory, specify the filename using the `-o` flag.", "documentationUrl": "https://developer.github.com/v3/actions/artifacts/#download-an-artifact", "previews": [], "headers": [], @@ -13281,7 +13341,7 @@ "url": "/repos/{owner}/{repo}/actions/jobs/{job_id}", "isDeprecated": false, "isLegacy": false, - "description": "Gets a specific job in a workflow run. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint.", + "description": "Gets a specific job in a workflow run. 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` permission to use this endpoint.", "documentationUrl": "https://developer.github.com/v3/actions/workflow-jobs/#get-a-workflow-job", "previews": [], "headers": [], @@ -13340,15 +13400,15 @@ "renamed": null }, { - "name": "List workflow job logs", + "name": "Download workflow job logs", "scope": "actions", - "id": "listWorkflowJobLogs", + "id": "downloadWorkflowJobLogs", "method": "GET", "url": "/repos/{owner}/{repo}/actions/jobs/{job_id}/logs", "isDeprecated": false, "isLegacy": false, - "description": "Gets a redirect URL to download a plain text file of logs for a workflow job. 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. GitHub Apps must have the `actions` permission to use this endpoint.\n\nCall this endpoint using the `-v` flag, which enables verbose output and allows you to see the download URL in the header. To download the file into the current working directory, specify the filename using the `-o` flag.", - "documentationUrl": "https://developer.github.com/v3/actions/workflow-jobs/#list-workflow-job-logs", + "description": "Gets a redirect URL to download a plain text file of logs for a workflow job. 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` permission to use this endpoint.\n\nCall this endpoint using the `-v` flag, which enables verbose output and allows you to see the download URL in the header. To download the file into the current working directory, specify the filename using the `-o` flag.", + "documentationUrl": "https://developer.github.com/v3/actions/workflow-jobs/#download-workflow-job-logs", "previews": [], "headers": [], "parameters": [ @@ -13390,13 +13450,43 @@ "validation": null, "alias": null, "deprecated": null + } + ], + "responses": [], + "renamed": null + }, + { + "name": "Download workflow job logs", + "scope": "actions", + "id": "listWorkflowJobLogs", + "method": "GET", + "url": "/repos/{owner}/{repo}/actions/jobs/{job_id}/logs", + "isDeprecated": false, + "isLegacy": false, + "description": "Gets a redirect URL to download a plain text file of logs for a workflow job. 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` permission to use this endpoint.\n\nCall this endpoint using the `-v` flag, which enables verbose output and allows you to see the download URL in the header. To download the file into the current working directory, specify the filename using the `-o` flag.", + "documentationUrl": "https://developer.github.com/v3/actions/workflow-jobs/#download-workflow-job-logs", + "previews": [], + "headers": [], + "parameters": [ + { + "name": "owner", + "description": "owner parameter", + "in": "PATH", + "type": "string", + "required": true, + "enum": null, + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null }, { - "name": "per_page", - "description": "Results per page (max 100)", - "in": "QUERY", - "type": "integer", - "required": false, + "name": "repo", + "description": "repo parameter", + "in": "PATH", + "type": "string", + "required": true, "enum": null, "allowNull": false, "mapToData": null, @@ -13405,11 +13495,11 @@ "deprecated": null }, { - "name": "page", - "description": "Page number of the results to fetch.", - "in": "QUERY", + "name": "job_id", + "description": "job_id parameter", + "in": "PATH", "type": "integer", - "required": false, + "required": true, "enum": null, "allowNull": false, "mapToData": null, @@ -13419,7 +13509,12 @@ } ], "responses": [], - "renamed": null + "renamed": { + "before": { "scope": "actions", "id": "listWorkflowJobLogs" }, + "after": { "scope": "actions", "id": "downloadWorkflowJobLogs" }, + "date": "2020-05-04", + "note": "\"actions/list-workflow-job-logs\" operation ID is now \"actions/download-workflow-job-logs\"" + } }, { "name": "List self-hosted runners for a repository", @@ -13429,7 +13524,7 @@ "url": "/repos/{owner}/{repo}/actions/runners", "isDeprecated": false, "isLegacy": false, - "description": "Lists all self-hosted runners for a repository. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration:read` repository permission to use this endpoint.", + "description": "Lists all self-hosted runners for a repository. Anyone with admin access to the repository and an access token with the `repo` scope can use this endpoint.", "documentationUrl": "https://developer.github.com/v3/actions/self-hosted-runners/#list-self-hosted-runners-for-a-repository", "previews": [], "headers": [], @@ -13508,7 +13603,7 @@ "url": "/repos/{owner}/{repo}/actions/runners/downloads", "isDeprecated": false, "isLegacy": false, - "description": "Lists binaries for the runner application that you can download and run. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration:read` repository permission to use this endpoint.", + "description": "Lists binaries for the runner application that you can download and run. Anyone with admin access to the repository and an access token with the `repo` scope can use this endpoint.", "documentationUrl": "https://developer.github.com/v3/actions/self-hosted-runners/#list-runner-applications-for-a-repository", "previews": [], "headers": [], @@ -13561,7 +13656,7 @@ "url": "/repos/{owner}/{repo}/actions/runners/downloads", "isDeprecated": false, "isLegacy": false, - "description": "Lists binaries for the runner application that you can download and run. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration:read` repository permission to use this endpoint.", + "description": "Lists binaries for the runner application that you can download and run. Anyone with admin access to the repository and an access token with the `repo` scope can use this endpoint.", "documentationUrl": "https://developer.github.com/v3/actions/self-hosted-runners/#list-runner-applications-for-a-repository", "previews": [], "headers": [], @@ -13622,7 +13717,7 @@ "url": "/repos/{owner}/{repo}/actions/runners/registration-token", "isDeprecated": false, "isLegacy": false, - "description": "Returns a token that you can pass to the `config` script. The token expires after one hour. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration:write` repository permission to use this endpoint.\n\nConfigure your self-hosted runner, replacing TOKEN with the registration token provided by this endpoint.", + "description": "Returns a token that you can pass to the `config` script. The token expires after one hour. Anyone with admin access to the repository and an access token with the `repo` scope can use this endpoint.\n\nConfigure your self-hosted runner, replacing TOKEN with the registration token provided by this endpoint.", "documentationUrl": "https://developer.github.com/v3/actions/self-hosted-runners/#create-a-registration-token-for-a-repository", "previews": [], "headers": [], @@ -13675,7 +13770,7 @@ "url": "/repos/{owner}/{repo}/actions/runners/registration-token", "isDeprecated": false, "isLegacy": false, - "description": "Returns a token that you can pass to the `config` script. The token expires after one hour. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration:write` repository permission to use this endpoint.\n\nConfigure your self-hosted runner, replacing TOKEN with the registration token provided by this endpoint.", + "description": "Returns a token that you can pass to the `config` script. The token expires after one hour. Anyone with admin access to the repository and an access token with the `repo` scope can use this endpoint.\n\nConfigure your self-hosted runner, replacing TOKEN with the registration token provided by this endpoint.", "documentationUrl": "https://developer.github.com/v3/actions/self-hosted-runners/#create-a-registration-token-for-a-repository", "previews": [], "headers": [], @@ -13733,7 +13828,7 @@ "url": "/repos/{owner}/{repo}/actions/runners/remove-token", "isDeprecated": false, "isLegacy": false, - "description": "Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration:write` repository permission to use this endpoint.\n\nRemove your self-hosted runner from a repository, replacing TOKEN with the remove token provided by this endpoint.", + "description": "Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. Anyone with admin access to the repository and an access token with the `repo` scope can use this endpoint.\n\nRemove your self-hosted runner from a repository, replacing TOKEN with the remove token provided by this endpoint.", "documentationUrl": "https://developer.github.com/v3/actions/self-hosted-runners/#create-a-remove-token-for-a-repository", "previews": [], "headers": [], @@ -13786,7 +13881,7 @@ "url": "/repos/{owner}/{repo}/actions/runners/remove-token", "isDeprecated": false, "isLegacy": false, - "description": "Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration:write` repository permission to use this endpoint.\n\nRemove your self-hosted runner from a repository, replacing TOKEN with the remove token provided by this endpoint.", + "description": "Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. Anyone with admin access to the repository and an access token with the `repo` scope can use this endpoint.\n\nRemove your self-hosted runner from a repository, replacing TOKEN with the remove token provided by this endpoint.", "documentationUrl": "https://developer.github.com/v3/actions/self-hosted-runners/#create-a-remove-token-for-a-repository", "previews": [], "headers": [], @@ -13844,7 +13939,7 @@ "url": "/repos/{owner}/{repo}/actions/runners/{runner_id}", "isDeprecated": false, "isLegacy": false, - "description": "Gets a specific self-hosted runner. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration:read` repository permission to use this endpoint.", + "description": "Gets a specific self-hosted runner. Anyone with admin access to the repository and an access token with the `repo` scope can use this endpoint.", "documentationUrl": "https://developer.github.com/v3/actions/self-hosted-runners/#get-a-self-hosted-runner-for-a-repository", "previews": [], "headers": [], @@ -13910,7 +14005,7 @@ "url": "/repos/{owner}/{repo}/actions/runners/{runner_id}", "isDeprecated": false, "isLegacy": false, - "description": "Gets a specific self-hosted runner. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration:read` repository permission to use this endpoint.", + "description": "Gets a specific self-hosted runner. Anyone with admin access to the repository and an access token with the `repo` scope can use this endpoint.", "documentationUrl": "https://developer.github.com/v3/actions/self-hosted-runners/#get-a-self-hosted-runner-for-a-repository", "previews": [], "headers": [], @@ -13981,7 +14076,7 @@ "url": "/repos/{owner}/{repo}/actions/runners/{runner_id}", "isDeprecated": false, "isLegacy": false, - "description": "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. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration:write` repository permission to use this endpoint.", + "description": "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. Anyone with admin access to the repository and an access token with the `repo` scope can use this endpoint.", "documentationUrl": "https://developer.github.com/v3/actions/self-hosted-runners/#delete-a-self-hosted-runner-from-a-repository", "previews": [], "headers": [], @@ -14037,7 +14132,7 @@ "url": "/repos/{owner}/{repo}/actions/runners/{runner_id}", "isDeprecated": false, "isLegacy": false, - "description": "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. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration:write` repository permission to use this endpoint.", + "description": "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. Anyone with admin access to the repository and an access token with the `repo` scope can use this endpoint.", "documentationUrl": "https://developer.github.com/v3/actions/self-hosted-runners/#delete-a-self-hosted-runner-from-a-repository", "previews": [], "headers": [], @@ -14098,7 +14193,7 @@ "url": "/repos/{owner}/{repo}/actions/runs", "isDeprecated": false, "isLegacy": false, - "description": "Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://developer.github.com/v3/#parameters).\n\nAnyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint.", + "description": "Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://developer.github.com/v3/#parameters).\n\nAnyone 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` permission to use this endpoint.", "documentationUrl": "https://developer.github.com/v3/actions/workflow-runs/#list-repository-workflow-runs", "previews": [], "headers": [], @@ -14229,7 +14324,7 @@ "url": "/repos/{owner}/{repo}/actions/runs/{run_id}", "isDeprecated": false, "isLegacy": false, - "description": "Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint.", + "description": "Gets a specific workflow run. 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` permission to use this endpoint.", "documentationUrl": "https://developer.github.com/v3/actions/workflow-runs/#get-a-workflow-run", "previews": [], "headers": [], @@ -14295,7 +14390,7 @@ "url": "/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", "isDeprecated": false, "isLegacy": false, - "description": "Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint.", + "description": "Lists artifacts for a workflow run. 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` permission to use this endpoint.", "documentationUrl": "https://developer.github.com/v3/actions/artifacts/#list-workflow-run-artifacts", "previews": [], "headers": [], @@ -14387,7 +14482,7 @@ "url": "/repos/{owner}/{repo}/actions/runs/{run_id}/cancel", "isDeprecated": false, "isLegacy": false, - "description": "Cancels a workflow run using its `id`. Anyone with write access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint.", + "description": "Cancels a workflow run using its `id`. Anyone with write access to the repository and an access token with the `repo` scope can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint.", "documentationUrl": "https://developer.github.com/v3/actions/workflow-runs/#cancel-a-workflow-run", "previews": [], "headers": [], @@ -14443,7 +14538,7 @@ "url": "/repos/{owner}/{repo}/actions/runs/{run_id}/jobs", "isDeprecated": false, "isLegacy": false, - "description": "Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://developer.github.com/v3/#parameters).", + "description": "Lists jobs for a workflow run. 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` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://developer.github.com/v3/#parameters).", "documentationUrl": "https://developer.github.com/v3/actions/workflow-jobs/#list-jobs-for-a-workflow-run", "previews": [], "headers": [], @@ -14541,15 +14636,15 @@ "renamed": null }, { - "name": "List workflow run logs", + "name": "Download workflow run logs", "scope": "actions", - "id": "listWorkflowRunLogs", + "id": "downloadWorkflowRunLogs", "method": "GET", "url": "/repos/{owner}/{repo}/actions/runs/{run_id}/logs", "isDeprecated": false, "isLegacy": false, - "description": "Gets a redirect URL to download an archive of log files for a workflow run. 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. GitHub Apps must have the `actions` permission to use this endpoint.\n\nCall this endpoint using the `-v` flag, which enables verbose output and allows you to see the download URL in the header. To download the file into the current working directory, specify the filename using the `-o` flag.", - "documentationUrl": "https://developer.github.com/v3/actions/workflow-runs/#list-workflow-run-logs", + "description": "Gets a redirect URL to download an archive of log files for a workflow run. 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` permission to use this endpoint.\n\nCall this endpoint using the `-v` flag, which enables verbose output and allows you to see the download URL in the header. To download the file into the current working directory, specify the filename using the `-o` flag.", + "documentationUrl": "https://developer.github.com/v3/actions/workflow-runs/#download-workflow-run-logs", "previews": [], "headers": [], "parameters": [ @@ -14591,13 +14686,43 @@ "validation": null, "alias": null, "deprecated": null + } + ], + "responses": [], + "renamed": null + }, + { + "name": "Download workflow run logs", + "scope": "actions", + "id": "listWorkflowRunLogs", + "method": "GET", + "url": "/repos/{owner}/{repo}/actions/runs/{run_id}/logs", + "isDeprecated": false, + "isLegacy": false, + "description": "Gets a redirect URL to download an archive of log files for a workflow run. 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` permission to use this endpoint.\n\nCall this endpoint using the `-v` flag, which enables verbose output and allows you to see the download URL in the header. To download the file into the current working directory, specify the filename using the `-o` flag.", + "documentationUrl": "https://developer.github.com/v3/actions/workflow-runs/#download-workflow-run-logs", + "previews": [], + "headers": [], + "parameters": [ + { + "name": "owner", + "description": "owner parameter", + "in": "PATH", + "type": "string", + "required": true, + "enum": null, + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null }, { - "name": "per_page", - "description": "Results per page (max 100)", - "in": "QUERY", - "type": "integer", - "required": false, + "name": "repo", + "description": "repo parameter", + "in": "PATH", + "type": "string", + "required": true, "enum": null, "allowNull": false, "mapToData": null, @@ -14606,11 +14731,11 @@ "deprecated": null }, { - "name": "page", - "description": "Page number of the results to fetch.", - "in": "QUERY", + "name": "run_id", + "description": "run_id parameter", + "in": "PATH", "type": "integer", - "required": false, + "required": true, "enum": null, "allowNull": false, "mapToData": null, @@ -14620,7 +14745,12 @@ } ], "responses": [], - "renamed": null + "renamed": { + "before": { "scope": "actions", "id": "listWorkflowRunLogs" }, + "after": { "scope": "actions", "id": "downloadWorkflowRunLogs" }, + "date": "2020-05-04", + "note": "\"actions/list-workflow-run-logs\" operation ID is now \"actions/download-workflow-run-logs\"" + } }, { "name": "Delete workflow run logs", @@ -14630,7 +14760,7 @@ "url": "/repos/{owner}/{repo}/actions/runs/{run_id}/logs", "isDeprecated": false, "isLegacy": false, - "description": "Deletes all logs for a workflow run. Anyone with write access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint.", + "description": "Deletes all logs for a workflow run. Anyone with write access to the repository and an access token with the `repo` scope can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint.", "documentationUrl": "https://developer.github.com/v3/actions/workflow-runs/#delete-workflow-run-logs", "previews": [], "headers": [], @@ -14686,7 +14816,7 @@ "url": "/repos/{owner}/{repo}/actions/runs/{run_id}/rerun", "isDeprecated": false, "isLegacy": false, - "description": "Re-runs your workflow run using its `id`. Anyone with write access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint.", + "description": "Re-runs your workflow run using its `id`. Anyone with write access to the repository and an access token with the `repo` scope can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint.", "documentationUrl": "https://developer.github.com/v3/actions/workflow-runs/#re-run-a-workflow", "previews": [], "headers": [], @@ -14742,7 +14872,7 @@ "url": "/repos/{owner}/{repo}/actions/secrets", "isDeprecated": false, "isLegacy": false, - "description": "Lists all secrets available in a repository without revealing their encrypted values. Anyone with write access to the repository can use this endpoint. GitHub Apps must have the `secrets` permission to use this endpoint.", + "description": "Lists all secrets available in a repository without revealing their encrypted values. Anyone with write access to the repository and an access token with the `repo` scope can use this endpoint. GitHub Apps must have the `secrets` permission to use this endpoint.", "documentationUrl": "https://developer.github.com/v3/actions/secrets/#list-secrets-for-a-repository", "previews": [], "headers": [], @@ -14821,7 +14951,7 @@ "url": "/repos/{owner}/{repo}/actions/secrets/public-key", "isDeprecated": false, "isLegacy": false, - "description": "Gets your public key, which you must store. You need your public key to use other secrets endpoints. Use the returned `key` to encrypt your secrets. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `secrets` permission to use this endpoint.", + "description": "Gets your public key, which you must store. You need your public key to use other secrets endpoints. Use the returned `key` to encrypt your secrets. 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 `secrets` permission to use this endpoint.", "documentationUrl": "https://developer.github.com/v3/actions/secrets/#get-your-public-key", "previews": [], "headers": [], @@ -14874,7 +15004,7 @@ "url": "/repos/{owner}/{repo}/actions/secrets/{name}", "isDeprecated": false, "isLegacy": false, - "description": "Gets a single secret without revealing its encrypted value. Anyone with write access to the repository can use this endpoint. GitHub Apps must have the `secrets` permission to use this endpoint.", + "description": "Gets a single secret without revealing its encrypted value. Anyone with write access to the repository and an access token with the `repo` scope can use this endpoint. GitHub Apps must have the `secrets` permission to use this endpoint.", "documentationUrl": "https://developer.github.com/v3/actions/secrets/#get-a-secret", "previews": [], "headers": [], @@ -14940,7 +15070,7 @@ "url": "/repos/{owner}/{repo}/actions/secrets/{name}", "isDeprecated": false, "isLegacy": false, - "description": "Creates or updates a secret with an encrypted value. Encrypt your secret using [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). Anyone with write access to the repository can use this endpoint. GitHub Apps must have the `secrets` permission to use this endpoint.\n\nEncrypt your secret using the [tweetsodium](https://github.com/mastahyeti/tweetsodium) library.\n\n\n\nEncrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/stable/public/#nacl-public-sealedbox) with Python 3.\n\n\n\nEncrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package.\n\n\n\nEncrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem.", + "description": "Creates or updates a secret with an encrypted value. Encrypt your secret using [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). Anyone with write access to the repository and an access token with the `repo` scope can use this endpoint. GitHub Apps must have the `secrets` permission to use this endpoint.\n\nEncrypt your secret using the [tweetsodium](https://github.com/mastahyeti/tweetsodium) library.\n\n\n\nEncrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/stable/public/#nacl-public-sealedbox) with Python 3.\n\n\n\nEncrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package.\n\n\n\nEncrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem.", "documentationUrl": "https://developer.github.com/v3/actions/secrets/#create-or-update-a-secret-for-a-repository", "previews": [], "headers": [], @@ -15022,7 +15152,7 @@ "url": "/repos/{owner}/{repo}/actions/secrets/{name}", "isDeprecated": false, "isLegacy": false, - "description": "Deletes a secret in a repository using the secret name. Anyone with write access to the repository can use this endpoint. GitHub Apps must have the `secrets` permission to use this endpoint.", + "description": "Deletes a secret in a repository using the secret name. Anyone with write access to the repository and an access token with the `repo` scope can use this endpoint. GitHub Apps must have the `secrets` permission to use this endpoint.", "documentationUrl": "https://developer.github.com/v3/actions/secrets/#delete-a-secret-from-a-repository", "previews": [], "headers": [], @@ -15078,7 +15208,7 @@ "url": "/repos/{owner}/{repo}/actions/workflows", "isDeprecated": false, "isLegacy": false, - "description": "Lists the workflows in a repository. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint.", + "description": "Lists the workflows in a repository. 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` permission to use this endpoint.", "documentationUrl": "https://developer.github.com/v3/actions/workflows/#list-repository-workflows", "previews": [], "headers": [], @@ -15157,7 +15287,7 @@ "url": "/repos/{owner}/{repo}/actions/workflows/{workflow_id}", "isDeprecated": false, "isLegacy": false, - "description": "Gets a specific workflow. You can also replace `:workflow_id` with `:workflow_file_name`. For example, you could use `main.yml`. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint.", + "description": "Gets a specific workflow. You can also replace `:workflow_id` with `:workflow_file_name`. For example, you could use `main.yml`. 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` permission to use this endpoint.", "documentationUrl": "https://developer.github.com/v3/actions/workflows/#get-a-workflow", "previews": [], "headers": [], @@ -15223,7 +15353,7 @@ "url": "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", "isDeprecated": false, "isLegacy": false, - "description": "List all workflow runs for a workflow. You can also replace `:workflow_id` with `:workflow_file_name`. For example, you could use `main.yml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://developer.github.com/v3/#parameters).\n\nAnyone with read access to the repository can use this endpoint.", + "description": "List all workflow runs for a workflow. You can also replace `:workflow_id` with `:workflow_file_name`. For example, you could use `main.yml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://developer.github.com/v3/#parameters).\n\nAnyone 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.", "documentationUrl": "https://developer.github.com/v3/actions/workflow-runs/#list-workflow-runs", "previews": [], "headers": [], diff --git a/src/generated/endpoints.ts b/src/generated/endpoints.ts index 34127eb50..8e6372644 100644 --- a/src/generated/endpoints.ts +++ b/src/generated/endpoints.ts @@ -45,6 +45,12 @@ const Endpoints: EndpointsDefaultsAndDecorations = { downloadArtifact: [ "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}", ], + downloadWorkflowJobLogs: [ + "GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs", + ], + downloadWorkflowRunLogs: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs", + ], getArtifact: ["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"], getPublicKey: ["GET /repos/{owner}/{repo}/actions/secrets/public-key"], getSecret: ["GET /repos/{owner}/{repo}/actions/secrets/{name}"], @@ -80,12 +86,16 @@ const Endpoints: EndpointsDefaultsAndDecorations = { listSelfHostedRunnersForRepo: ["GET /repos/{owner}/{repo}/actions/runners"], listWorkflowJobLogs: [ "GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs", + {}, + { renamed: ["actions", "downloadWorkflowJobLogs"] }, ], listWorkflowRunArtifacts: [ "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", ], listWorkflowRunLogs: [ "GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs", + {}, + { renamed: ["actions", "downloadWorkflowRunLogs"] }, ], listWorkflowRuns: [ "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", @@ -311,6 +321,10 @@ const Endpoints: EndpointsDefaultsAndDecorations = { ], resetToken: ["PATCH /applications/{client_id}/token"], revokeInstallationToken: ["DELETE /installation/token"], + suspendInstallation: ["PUT /app/installations/{installation_id}/suspended"], + unsuspendInstallation: [ + "DELETE /app/installations/{installation_id}/suspended", + ], }, checks: { create: [ diff --git a/src/generated/method-types.ts b/src/generated/method-types.ts index a18b68bf7..f398ee711 100644 --- a/src/generated/method-types.ts +++ b/src/generated/method-types.ts @@ -4,7 +4,7 @@ import { RestEndpointMethodTypes } from "./parameters-and-response-types"; export type RestEndpointMethods = { actions: { /** - * Cancels a workflow run using its `id`. Anyone with write access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint. + * Cancels a workflow run using its `id`. Anyone with write access to the repository and an access token with the `repo` scope can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint. */ cancelWorkflowRun: { ( @@ -16,7 +16,7 @@ export type RestEndpointMethods = { endpoint: EndpointInterface<{ url: string }>; }; /** - * Creates or updates a secret with an encrypted value. Encrypt your secret using [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). Anyone with write access to the repository can use this endpoint. GitHub Apps must have the `secrets` permission to use this endpoint. + * Creates or updates a secret with an encrypted value. Encrypt your secret using [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). Anyone with write access to the repository and an access token with the `repo` scope can use this endpoint. GitHub Apps must have the `secrets` permission to use this endpoint. * * Encrypt your secret using the [tweetsodium](https://github.com/mastahyeti/tweetsodium) library. * @@ -42,7 +42,7 @@ export type RestEndpointMethods = { endpoint: EndpointInterface<{ url: string }>; }; /** - * Returns a token that you can pass to the `config` script. The token expires after one hour. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration:write` repository permission to use this endpoint. + * Returns a token that you can pass to the `config` script. The token expires after one hour. Anyone with admin access to the repository and an access token with the `repo` scope can use this endpoint. * * Configure your self-hosted runner, replacing TOKEN with the registration token provided by this endpoint. * @deprecated octokit.actions.createRegistrationToken() has been renamed to octokit.actions.createRegistrationTokenForRepo() (2020-04-22) @@ -59,7 +59,7 @@ export type RestEndpointMethods = { /** * **Warning:** The self-hosted runners API for organizations is currently in public beta and subject to change. * - * Returns a token that you can pass to the `config` script. The token expires after one hour. Anyone with admin access to the organization can use this endpoint. GitHub Apps must have the `self-hosted runners:write` organization permission to use this endpoint. + * Returns a token that you can pass to the `config` script. The token expires after one hour. Anyone with admin access to the organization can use this endpoint. * * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. */ @@ -73,7 +73,7 @@ export type RestEndpointMethods = { endpoint: EndpointInterface<{ url: string }>; }; /** - * Returns a token that you can pass to the `config` script. The token expires after one hour. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration:write` repository permission to use this endpoint. + * Returns a token that you can pass to the `config` script. The token expires after one hour. Anyone with admin access to the repository and an access token with the `repo` scope can use this endpoint. * * Configure your self-hosted runner, replacing TOKEN with the registration token provided by this endpoint. */ @@ -87,7 +87,7 @@ export type RestEndpointMethods = { endpoint: EndpointInterface<{ url: string }>; }; /** - * Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration:write` repository permission to use this endpoint. + * Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. Anyone with admin access to the repository and an access token with the `repo` scope can use this endpoint. * * Remove your self-hosted runner from a repository, replacing TOKEN with the remove token provided by this endpoint. * @deprecated octokit.actions.createRemoveToken() has been renamed to octokit.actions.createRemoveTokenForRepo() (2020-04-22) @@ -104,7 +104,7 @@ export type RestEndpointMethods = { /** * **Warning:** The self-hosted runners API for organizations is currently in public beta and subject to change. * - * 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. Anyone with admin access to the organization can use this endpoint. GitHub Apps must have the `self-hosted runners:write` organization permission to use this endpoint. + * 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. Anyone with admin access to the organization can use this endpoint. * * To remove your self-hosted runner from an organization, replace `TOKEN` with the remove token provided by this endpoint. */ @@ -118,7 +118,7 @@ export type RestEndpointMethods = { endpoint: EndpointInterface<{ url: string }>; }; /** - * Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration:write` repository permission to use this endpoint. + * Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. Anyone with admin access to the repository and an access token with the `repo` scope can use this endpoint. * * Remove your self-hosted runner from a repository, replacing TOKEN with the remove token provided by this endpoint. */ @@ -132,7 +132,7 @@ export type RestEndpointMethods = { endpoint: EndpointInterface<{ url: string }>; }; /** - * Deletes an artifact for a workflow run. Anyone with write access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint. + * Deletes an artifact for a workflow run. Anyone with write access to the repository and an access token with the `repo` scope can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint. */ deleteArtifact: { ( @@ -144,7 +144,7 @@ export type RestEndpointMethods = { endpoint: EndpointInterface<{ url: string }>; }; /** - * Deletes a secret in a repository using the secret name. Anyone with write access to the repository can use this endpoint. GitHub Apps must have the `secrets` permission to use this endpoint. + * Deletes a secret in a repository using the secret name. Anyone with write access to the repository and an access token with the `repo` scope can use this endpoint. GitHub Apps must have the `secrets` permission to use this endpoint. */ deleteSecretFromRepo: { ( @@ -158,7 +158,7 @@ export type RestEndpointMethods = { /** * **Warning:** The self-hosted runners API for organizations is currently in public beta and subject to change. * - * Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. Anyone with admin access to the organization can use this endpoint. GitHub Apps must have the `self-hosted runners:write` organization permission to use this endpoint. + * Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. Anyone with admin access to the organization can use this endpoint. */ deleteSelfHostedRunnerFromOrg: { ( @@ -170,7 +170,7 @@ export type RestEndpointMethods = { endpoint: EndpointInterface<{ url: string }>; }; /** - * 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. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration:write` repository permission to use this endpoint. + * 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. Anyone with admin access to the repository and an access token with the `repo` scope can use this endpoint. */ deleteSelfHostedRunnerFromRepo: { ( @@ -182,7 +182,7 @@ export type RestEndpointMethods = { endpoint: EndpointInterface<{ url: string }>; }; /** - * Deletes all logs for a workflow run. Anyone with write access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint. + * Deletes all logs for a workflow run. Anyone with write access to the repository and an access token with the `repo` scope can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint. */ deleteWorkflowRunLogs: { ( @@ -194,7 +194,7 @@ export type RestEndpointMethods = { endpoint: EndpointInterface<{ url: string }>; }; /** - * Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in the response header to find the URL for the download. The `:archive_format` must be `zip`. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint. + * Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in the response header to find the URL for the download. The `:archive_format` must be `zip`. 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` permission to use this endpoint. * * Call this endpoint using the `-v` flag, which enables verbose output and allows you to see the download URL in the header. To download the file into the current working directory, specify the filename using the `-o` flag. */ @@ -208,7 +208,35 @@ export type RestEndpointMethods = { endpoint: EndpointInterface<{ url: string }>; }; /** - * Gets a specific artifact for a workflow run. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint. + * Gets a redirect URL to download a plain text file of logs for a workflow job. 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` permission to use this endpoint. + * + * Call this endpoint using the `-v` flag, which enables verbose output and allows you to see the download URL in the header. To download the file into the current working directory, specify the filename using the `-o` flag. + */ + downloadWorkflowJobLogs: { + ( + params?: RestEndpointMethodTypes["actions"]["downloadWorkflowJobLogs"]["parameters"] + ): Promise< + RestEndpointMethodTypes["actions"]["downloadWorkflowJobLogs"]["response"] + >; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ url: string }>; + }; + /** + * Gets a redirect URL to download an archive of log files for a workflow run. 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` permission to use this endpoint. + * + * Call this endpoint using the `-v` flag, which enables verbose output and allows you to see the download URL in the header. To download the file into the current working directory, specify the filename using the `-o` flag. + */ + downloadWorkflowRunLogs: { + ( + params?: RestEndpointMethodTypes["actions"]["downloadWorkflowRunLogs"]["parameters"] + ): Promise< + RestEndpointMethodTypes["actions"]["downloadWorkflowRunLogs"]["response"] + >; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ url: string }>; + }; + /** + * Gets a specific artifact for a workflow run. 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` permission to use this endpoint. */ getArtifact: { ( @@ -218,7 +246,7 @@ export type RestEndpointMethods = { endpoint: EndpointInterface<{ url: string }>; }; /** - * Gets your public key, which you must store. You need your public key to use other secrets endpoints. Use the returned `key` to encrypt your secrets. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `secrets` permission to use this endpoint. + * Gets your public key, which you must store. You need your public key to use other secrets endpoints. Use the returned `key` to encrypt your secrets. 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 `secrets` permission to use this endpoint. */ getPublicKey: { ( @@ -230,7 +258,7 @@ export type RestEndpointMethods = { endpoint: EndpointInterface<{ url: string }>; }; /** - * Gets a single secret without revealing its encrypted value. Anyone with write access to the repository can use this endpoint. GitHub Apps must have the `secrets` permission to use this endpoint. + * Gets a single secret without revealing its encrypted value. Anyone with write access to the repository and an access token with the `repo` scope can use this endpoint. GitHub Apps must have the `secrets` permission to use this endpoint. */ getSecret: { ( @@ -240,7 +268,7 @@ export type RestEndpointMethods = { endpoint: EndpointInterface<{ url: string }>; }; /** - * Gets a specific self-hosted runner. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration:read` repository permission to use this endpoint. + * Gets a specific self-hosted runner. Anyone with admin access to the repository and an access token with the `repo` scope can use this endpoint. * @deprecated octokit.actions.getSelfHostedRunner() has been renamed to octokit.actions.getSelfHostedRunnerForRepo() (2020-04-22) */ getSelfHostedRunner: { @@ -255,7 +283,7 @@ export type RestEndpointMethods = { /** * **Warning:** The self-hosted runners API for organizations is currently in public beta and subject to change. * - * Gets a specific self-hosted runner for an organization. Anyone with admin access to the organization can use this endpoint. GitHub Apps must have the `self-hosted runners:read` organization permission to use this endpoint. + * Gets a specific self-hosted runner for an organization. Anyone with admin access to the organization can use this endpoint. */ getSelfHostedRunnerForOrg: { ( @@ -267,7 +295,7 @@ export type RestEndpointMethods = { endpoint: EndpointInterface<{ url: string }>; }; /** - * Gets a specific self-hosted runner. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration:read` repository permission to use this endpoint. + * Gets a specific self-hosted runner. Anyone with admin access to the repository and an access token with the `repo` scope can use this endpoint. */ getSelfHostedRunnerForRepo: { ( @@ -279,7 +307,7 @@ export type RestEndpointMethods = { endpoint: EndpointInterface<{ url: string }>; }; /** - * Gets a specific workflow. You can also replace `:workflow_id` with `:workflow_file_name`. For example, you could use `main.yml`. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint. + * Gets a specific workflow. You can also replace `:workflow_id` with `:workflow_file_name`. For example, you could use `main.yml`. 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` permission to use this endpoint. */ getWorkflow: { ( @@ -289,7 +317,7 @@ export type RestEndpointMethods = { endpoint: EndpointInterface<{ url: string }>; }; /** - * Gets a specific job in a workflow run. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint. + * Gets a specific job in a workflow run. 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` permission to use this endpoint. */ getWorkflowJob: { ( @@ -301,7 +329,7 @@ export type RestEndpointMethods = { endpoint: EndpointInterface<{ url: string }>; }; /** - * Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint. + * Gets a specific workflow run. 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` permission to use this endpoint. */ getWorkflowRun: { ( @@ -313,7 +341,7 @@ export type RestEndpointMethods = { endpoint: EndpointInterface<{ url: string }>; }; /** - * Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint. + * Lists all artifacts for a repository. 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` permission to use this endpoint. */ listArtifactsForRepo: { ( @@ -325,7 +353,7 @@ export type RestEndpointMethods = { endpoint: EndpointInterface<{ url: string }>; }; /** - * Lists binaries for the runner application that you can download and run. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration:read` repository permission to use this endpoint. + * Lists binaries for the runner application that you can download and run. Anyone with admin access to the repository and an access token with the `repo` scope can use this endpoint. * @deprecated octokit.actions.listDownloadsForSelfHostedRunnerApplication() has been renamed to octokit.actions.listRunnerApplicationsForRepo() (2020-04-22) */ listDownloadsForSelfHostedRunnerApplication: { @@ -338,7 +366,7 @@ export type RestEndpointMethods = { endpoint: EndpointInterface<{ url: string }>; }; /** - * Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://developer.github.com/v3/#parameters). + * Lists jobs for a workflow run. 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` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://developer.github.com/v3/#parameters). */ listJobsForWorkflowRun: { ( @@ -352,7 +380,7 @@ export type RestEndpointMethods = { /** * Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://developer.github.com/v3/#parameters). * - * Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint. + * 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` permission to use this endpoint. */ listRepoWorkflowRuns: { ( @@ -364,7 +392,7 @@ export type RestEndpointMethods = { endpoint: EndpointInterface<{ url: string }>; }; /** - * Lists the workflows in a repository. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint. + * Lists the workflows in a repository. 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` permission to use this endpoint. */ listRepoWorkflows: { ( @@ -378,7 +406,7 @@ export type RestEndpointMethods = { /** * **Warning:** The self-hosted runners API for organizations is currently in public beta and subject to change. * - * Lists binaries for the runner application that you can download and run. Anyone with admin access to the organization can use this endpoint. GitHub Apps must have the `self-hosted runners:read` organization permission to use this endpoint. + * Lists binaries for the runner application that you can download and run. Anyone with admin access to the organization can use this endpoint. */ listRunnerApplicationsForOrg: { ( @@ -390,7 +418,7 @@ export type RestEndpointMethods = { endpoint: EndpointInterface<{ url: string }>; }; /** - * Lists binaries for the runner application that you can download and run. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration:read` repository permission to use this endpoint. + * Lists binaries for the runner application that you can download and run. Anyone with admin access to the repository and an access token with the `repo` scope can use this endpoint. */ listRunnerApplicationsForRepo: { ( @@ -402,7 +430,7 @@ export type RestEndpointMethods = { endpoint: EndpointInterface<{ url: string }>; }; /** - * Lists all secrets available in a repository without revealing their encrypted values. Anyone with write access to the repository can use this endpoint. GitHub Apps must have the `secrets` permission to use this endpoint. + * Lists all secrets available in a repository without revealing their encrypted values. Anyone with write access to the repository and an access token with the `repo` scope can use this endpoint. GitHub Apps must have the `secrets` permission to use this endpoint. */ listSecretsForRepo: { ( @@ -416,7 +444,7 @@ export type RestEndpointMethods = { /** * **Warning:** The self-hosted runners API for organizations is currently in public beta and subject to change. * - * Lists all self-hosted runners for an organization. Anyone with admin access to the organization can use this endpoint. GitHub Apps must have the `self-hosted runners:read` organization permission to use this endpoint. + * Lists all self-hosted runners for an organization. Anyone with admin access to the organization can use this endpoint. */ listSelfHostedRunnersForOrg: { ( @@ -428,7 +456,7 @@ export type RestEndpointMethods = { endpoint: EndpointInterface<{ url: string }>; }; /** - * Lists all self-hosted runners for a repository. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration:read` repository permission to use this endpoint. + * Lists all self-hosted runners for a repository. Anyone with admin access to the repository and an access token with the `repo` scope can use this endpoint. */ listSelfHostedRunnersForRepo: { ( @@ -440,9 +468,10 @@ export type RestEndpointMethods = { endpoint: EndpointInterface<{ url: string }>; }; /** - * Gets a redirect URL to download a plain text file of logs for a workflow job. 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. GitHub Apps must have the `actions` permission to use this endpoint. + * Gets a redirect URL to download a plain text file of logs for a workflow job. 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` permission to use this endpoint. * * Call this endpoint using the `-v` flag, which enables verbose output and allows you to see the download URL in the header. To download the file into the current working directory, specify the filename using the `-o` flag. + * @deprecated octokit.actions.listWorkflowJobLogs() has been renamed to octokit.actions.downloadWorkflowJobLogs() (2020-05-04) */ listWorkflowJobLogs: { ( @@ -454,7 +483,7 @@ export type RestEndpointMethods = { endpoint: EndpointInterface<{ url: string }>; }; /** - * Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint. + * Lists artifacts for a workflow run. 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` permission to use this endpoint. */ listWorkflowRunArtifacts: { ( @@ -466,9 +495,10 @@ export type RestEndpointMethods = { endpoint: EndpointInterface<{ url: string }>; }; /** - * Gets a redirect URL to download an archive of log files for a workflow run. 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. GitHub Apps must have the `actions` permission to use this endpoint. + * Gets a redirect URL to download an archive of log files for a workflow run. 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` permission to use this endpoint. * * Call this endpoint using the `-v` flag, which enables verbose output and allows you to see the download URL in the header. To download the file into the current working directory, specify the filename using the `-o` flag. + * @deprecated octokit.actions.listWorkflowRunLogs() has been renamed to octokit.actions.downloadWorkflowRunLogs() (2020-05-04) */ listWorkflowRunLogs: { ( @@ -482,7 +512,7 @@ export type RestEndpointMethods = { /** * List all workflow runs for a workflow. You can also replace `:workflow_id` with `:workflow_file_name`. For example, you could use `main.yml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://developer.github.com/v3/#parameters). * - * Anyone with read access to the repository can use this endpoint. + * 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. */ listWorkflowRuns: { ( @@ -494,7 +524,7 @@ export type RestEndpointMethods = { endpoint: EndpointInterface<{ url: string }>; }; /** - * Re-runs your workflow run using its `id`. Anyone with write access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint. + * Re-runs your workflow run using its `id`. Anyone with write access to the repository and an access token with the `repo` scope can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint. */ reRunWorkflow: { ( @@ -506,7 +536,7 @@ export type RestEndpointMethods = { endpoint: EndpointInterface<{ url: string }>; }; /** - * 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. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration:write` repository permission to use this endpoint. + * 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. Anyone with admin access to the repository and an access token with the `repo` scope can use this endpoint. * @deprecated octokit.actions.removeSelfHostedRunner() has been renamed to octokit.actions.deleteSelfHostedRunnerFromRepo() (2020-04-22) */ removeSelfHostedRunner: { @@ -1165,7 +1195,7 @@ export type RestEndpointMethods = { endpoint: EndpointInterface<{ url: string }>; }; /** - * Uninstalls a GitHub App on a user, organization, or business account. + * Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an installation](https://developer.github.com/v3/apps/#suspend-an-installation)" endpoint. * * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ @@ -1532,6 +1562,42 @@ export type RestEndpointMethods = { defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string }>; }; + /** + * **Note:** Suspending a GitHub App installation is currently in beta and subject to change. Before you can suspend a GitHub App, the app owner must enable suspending installations for the app by opting-in to the beta. For more information, see "[Suspending a GitHub App installation](https://developer.github.com/apps/managing-github-apps/suspending-a-github-app-installation/)." + * + * Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account. + * + * To suspend a GitHub App, you must be an account owner or have admin permissions in the repository or organization where the app is installed. + * + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + suspendInstallation: { + ( + params?: RestEndpointMethodTypes["apps"]["suspendInstallation"]["parameters"] + ): Promise< + RestEndpointMethodTypes["apps"]["suspendInstallation"]["response"] + >; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ url: string }>; + }; + /** + * **Note:** Suspending a GitHub App installation is currently in beta and subject to change. Before you can suspend a GitHub App, the app owner must enable suspending installations for the app by opting-in to the beta. For more information, see "[Suspending a GitHub App installation](https://developer.github.com/apps/managing-github-apps/suspending-a-github-app-installation/)." + * + * Removes a GitHub App installation suspension. + * + * To unsuspend a GitHub App, you must be an account owner or have admin permissions in the repository or organization where the app is installed and suspended. + * + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + unsuspendInstallation: { + ( + params?: RestEndpointMethodTypes["apps"]["unsuspendInstallation"]["parameters"] + ): Promise< + RestEndpointMethodTypes["apps"]["unsuspendInstallation"]["response"] + >; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ url: string }>; + }; }; checks: { /** diff --git a/src/generated/parameters-and-response-types.ts b/src/generated/parameters-and-response-types.ts index 571184713..0069bd339 100644 --- a/src/generated/parameters-and-response-types.ts +++ b/src/generated/parameters-and-response-types.ts @@ -114,6 +114,22 @@ export type RestEndpointMethodTypes = { >; response: Endpoints["GET /repos/:owner/:repo/actions/artifacts/:artifact_id/:archive_format"]["response"]; }; + downloadWorkflowJobLogs: { + parameters: RequestParameters & + Omit< + Endpoints["GET /repos/:owner/:repo/actions/jobs/:job_id/logs"]["parameters"], + "baseUrl" | "headers" | "mediaType" + >; + response: Endpoints["GET /repos/:owner/:repo/actions/jobs/:job_id/logs"]["response"]; + }; + downloadWorkflowRunLogs: { + parameters: RequestParameters & + Omit< + Endpoints["GET /repos/:owner/:repo/actions/runs/:run_id/logs"]["parameters"], + "baseUrl" | "headers" | "mediaType" + >; + response: Endpoints["GET /repos/:owner/:repo/actions/runs/:run_id/logs"]["response"]; + }; getArtifact: { parameters: RequestParameters & Omit< @@ -942,6 +958,22 @@ export type RestEndpointMethodTypes = { >; response: Endpoints["DELETE /installation/token"]["response"]; }; + suspendInstallation: { + parameters: RequestParameters & + Omit< + Endpoints["PUT /app/installations/:installation_id/suspended"]["parameters"], + "baseUrl" | "headers" | "mediaType" + >; + response: Endpoints["PUT /app/installations/:installation_id/suspended"]["response"]; + }; + unsuspendInstallation: { + parameters: RequestParameters & + Omit< + Endpoints["DELETE /app/installations/:installation_id/suspended"]["parameters"], + "baseUrl" | "headers" | "mediaType" + >; + response: Endpoints["DELETE /app/installations/:installation_id/suspended"]["response"]; + }; }; checks: { create: {