UNPKG

@octokit/plugin-rest-endpoint-methods

Version:

Octokit plugin adding one method for all of api.github.com REST API endpoints

878 lines 854 kB
import type { EndpointInterface, RequestInterface } from "@octokit/types"; import type { RestEndpointMethodTypes } from "./parameters-and-response-types.js"; export type RestEndpointMethods = { actions: { /** * Adds custom labels to a self-hosted runner configured in an organization. * * Authenticated users must have admin access to the organization to use this endpoint. * * OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. */ addCustomLabelsToSelfHostedRunnerForOrg: { (params?: RestEndpointMethodTypes["actions"]["addCustomLabelsToSelfHostedRunnerForOrg"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["addCustomLabelsToSelfHostedRunnerForOrg"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Adds custom labels to a self-hosted runner configured in a repository. * * Authenticated users must have admin access to the organization to use this endpoint. * * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ addCustomLabelsToSelfHostedRunnerForRepo: { (params?: RestEndpointMethodTypes["actions"]["addCustomLabelsToSelfHostedRunnerForRepo"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["addCustomLabelsToSelfHostedRunnerForRepo"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Adds a repository to the list of repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." * * OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. */ addRepoAccessToSelfHostedRunnerGroupInOrg: { (params?: RestEndpointMethodTypes["actions"]["addRepoAccessToSelfHostedRunnerGroupInOrg"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["addRepoAccessToSelfHostedRunnerGroupInOrg"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Adds a repository to an organization secret when the `visibility` for * repository access is set to `selected`. For more information about setting the visibility, see [Create or * update an organization secret](https://docs.github.com/rest/actions/secrets#create-or-update-an-organization-secret). * * Authenticated users must have collaborator access to a repository to create, update, or read secrets. * * OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ addSelectedRepoToOrgSecret: { (params?: RestEndpointMethodTypes["actions"]["addSelectedRepoToOrgSecret"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["addSelectedRepoToOrgSecret"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Adds a repository to an organization variable that is available to selected repositories. * Organization variables that are available to selected repositories have their `visibility` field set to `selected`. * * Authenticated users must have collaborator access to a repository to create, update, or read secrets. * * OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ addSelectedRepoToOrgVariable: { (params?: RestEndpointMethodTypes["actions"]["addSelectedRepoToOrgVariable"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["addSelectedRepoToOrgVariable"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)." * * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ approveWorkflowRun: { (params?: RestEndpointMethodTypes["actions"]["approveWorkflowRun"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["approveWorkflowRun"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Cancels a workflow run using its `id`. * * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ cancelWorkflowRun: { (params?: RestEndpointMethodTypes["actions"]["cancelWorkflowRun"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["cancelWorkflowRun"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Create an environment variable that you can reference in a GitHub Actions workflow. * * Authenticated users must have collaborator access to a repository to create, update, or read variables. * * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ createEnvironmentVariable: { (params?: RestEndpointMethodTypes["actions"]["createEnvironmentVariable"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["createEnvironmentVariable"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Creates a GitHub-hosted runner for an organization. * OAuth tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint. */ createHostedRunnerForOrg: { (params?: RestEndpointMethodTypes["actions"]["createHostedRunnerForOrg"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["createHostedRunnerForOrg"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Creates or updates an environment secret with an encrypted value. Encrypt your secret using * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/rest/guides/encrypting-secrets-for-the-rest-api)." * * Authenticated users must have collaborator access to a repository to create, update, or read secrets. * * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ createOrUpdateEnvironmentSecret: { (params?: RestEndpointMethodTypes["actions"]["createOrUpdateEnvironmentSecret"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["createOrUpdateEnvironmentSecret"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Creates or updates an organization secret with an encrypted value. Encrypt your secret using * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to * use this endpoint. * * #### Example encrypting a secret using Node.js * * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. * * ``` * const sodium = require('tweetsodium'); * * const key = "base64-encoded-public-key"; * const value = "plain-text-secret"; * * // Convert the message and key to Uint8Array's (Buffer implements that interface) * const messageBytes = Buffer.from(value); * const keyBytes = Buffer.from(key, 'base64'); * * // Encrypt using LibSodium. * const encryptedBytes = sodium.seal(messageBytes, keyBytes); * * // Base64 the encrypted secret * const encrypted = Buffer.from(encryptedBytes).toString('base64'); * * console.log(encrypted); * ``` * * * #### Example encrypting a secret using Python * * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. * * ``` * from base64 import b64encode * from nacl import encoding, public * * def encrypt(public_key: str, secret_value: str) -> str: * """Encrypt a Unicode string using the public key.""" * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) * sealed_box = public.SealedBox(public_key) * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) * return b64encode(encrypted).decode("utf-8") * ``` * * #### Example encrypting a secret using C# * * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. * * ``` * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); * * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); * * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); * ``` * * #### Example encrypting a secret using Ruby * * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. * * ```ruby * require "rbnacl" * require "base64" * * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") * public_key = RbNaCl::PublicKey.new(key) * * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) * encrypted_secret = box.encrypt("my_secret") * * # Print the base64 encoded secret * puts Base64.strict_encode64(encrypted_secret) * ``` */ createOrUpdateOrgSecret: { (params?: RestEndpointMethodTypes["actions"]["createOrUpdateOrgSecret"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["createOrUpdateOrgSecret"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Creates or updates a repository secret with an encrypted value. Encrypt your secret using * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/rest/guides/encrypting-secrets-for-the-rest-api)." * * Authenticated users must have collaborator access to a repository to create, update, or read secrets. * * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ createOrUpdateRepoSecret: { (params?: RestEndpointMethodTypes["actions"]["createOrUpdateRepoSecret"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["createOrUpdateRepoSecret"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Creates an organization variable that you can reference in a GitHub Actions workflow. * * Authenticated users must have collaborator access to a repository to create, update, or read variables. * * OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ createOrgVariable: { (params?: RestEndpointMethodTypes["actions"]["createOrgVariable"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["createOrgVariable"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Returns a token that you can pass to the `config` script. The token expires after one hour. * * For example, you can replace `TOKEN` in the following example with the registration token provided by this endpoint to configure your self-hosted runner: * * ``` * ./config.sh --url https://github.com/octo-org --token TOKEN * ``` * * Authenticated users must have admin access to the organization to use this endpoint. * * OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ createRegistrationTokenForOrg: { (params?: RestEndpointMethodTypes["actions"]["createRegistrationTokenForOrg"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["createRegistrationTokenForOrg"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Returns a token that you can pass to the `config` script. The token expires after one hour. * * For example, you can replace `TOKEN` in the following example with the registration token provided by this endpoint to configure your self-hosted runner: * * ``` * ./config.sh --url https://github.com/octo-org --token TOKEN * ``` * * Authenticated users must have admin access to the repository to use this endpoint. * * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ createRegistrationTokenForRepo: { (params?: RestEndpointMethodTypes["actions"]["createRegistrationTokenForRepo"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["createRegistrationTokenForRepo"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * 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. * * For example, you can replace `TOKEN` in the following example with the registration token provided by this endpoint to remove your self-hosted runner from an organization: * * ``` * ./config.sh remove --token TOKEN * ``` * * Authenticated users must have admin access to the organization to use this endpoint. * * OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ createRemoveTokenForOrg: { (params?: RestEndpointMethodTypes["actions"]["createRemoveTokenForOrg"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["createRemoveTokenForOrg"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an repository. The token expires after one hour. * * For example, you can replace `TOKEN` in the following example with the registration token provided by this endpoint to remove your self-hosted runner from an organization: * * ``` * ./config.sh remove --token TOKEN * ``` * * Authenticated users must have admin access to the repository to use this endpoint. * * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ createRemoveTokenForRepo: { (params?: RestEndpointMethodTypes["actions"]["createRemoveTokenForRepo"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["createRemoveTokenForRepo"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Creates a repository variable that you can reference in a GitHub Actions workflow. * * Authenticated users must have collaborator access to a repository to create, update, or read variables. * * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ createRepoVariable: { (params?: RestEndpointMethodTypes["actions"]["createRepoVariable"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["createRepoVariable"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. * * You must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)." * * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ createWorkflowDispatch: { (params?: RestEndpointMethodTypes["actions"]["createWorkflowDispatch"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["createWorkflowDispatch"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Deletes a GitHub Actions cache for a repository, using a cache ID. * * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ deleteActionsCacheById: { (params?: RestEndpointMethodTypes["actions"]["deleteActionsCacheById"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["deleteActionsCacheById"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Deletes one or more GitHub Actions caches for a repository, using a complete cache key. By default, all caches that match the provided key are deleted, but you can optionally provide a Git ref to restrict deletions to caches that match both the provided key and the Git ref. * * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ deleteActionsCacheByKey: { (params?: RestEndpointMethodTypes["actions"]["deleteActionsCacheByKey"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["deleteActionsCacheByKey"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Deletes an artifact for a workflow run. * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ deleteArtifact: { (params?: RestEndpointMethodTypes["actions"]["deleteArtifact"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["deleteArtifact"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Deletes a secret in an environment using the secret name. * * Authenticated users must have collaborator access to a repository to create, update, or read secrets. * * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ deleteEnvironmentSecret: { (params?: RestEndpointMethodTypes["actions"]["deleteEnvironmentSecret"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["deleteEnvironmentSecret"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Deletes an environment variable using the variable name. * * Authenticated users must have collaborator access to a repository to create, update, or read variables. * * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ deleteEnvironmentVariable: { (params?: RestEndpointMethodTypes["actions"]["deleteEnvironmentVariable"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["deleteEnvironmentVariable"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Deletes a GitHub-hosted runner for an organization. */ deleteHostedRunnerForOrg: { (params?: RestEndpointMethodTypes["actions"]["deleteHostedRunnerForOrg"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["deleteHostedRunnerForOrg"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Deletes a secret in an organization using the secret name. * * Authenticated users must have collaborator access to a repository to create, update, or read secrets. * * OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ deleteOrgSecret: { (params?: RestEndpointMethodTypes["actions"]["deleteOrgSecret"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["deleteOrgSecret"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Deletes an organization variable using the variable name. * * Authenticated users must have collaborator access to a repository to create, update, or read variables. * * OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ deleteOrgVariable: { (params?: RestEndpointMethodTypes["actions"]["deleteOrgVariable"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["deleteOrgVariable"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Deletes a secret in a repository using the secret name. * * Authenticated users must have collaborator access to a repository to create, update, or read secrets. * * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ deleteRepoSecret: { (params?: RestEndpointMethodTypes["actions"]["deleteRepoSecret"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["deleteRepoSecret"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Deletes a repository variable using the variable name. * * Authenticated users must have collaborator access to a repository to create, update, or read variables. * * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ deleteRepoVariable: { (params?: RestEndpointMethodTypes["actions"]["deleteRepoVariable"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["deleteRepoVariable"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * 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. * * Authenticated users must have admin access to the organization to use this endpoint. * * OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ deleteSelfHostedRunnerFromOrg: { (params?: RestEndpointMethodTypes["actions"]["deleteSelfHostedRunnerFromOrg"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["deleteSelfHostedRunnerFromOrg"]["response"]>; defaults: RequestInterface["defaults"]; 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. * * Authenticated users must have admin access to the repository to use this endpoint. * * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ deleteSelfHostedRunnerFromRepo: { (params?: RestEndpointMethodTypes["actions"]["deleteSelfHostedRunnerFromRepo"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["deleteSelfHostedRunnerFromRepo"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Deletes a specific workflow run. * * Anyone with write access to the repository can use this endpoint. * * If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ deleteWorkflowRun: { (params?: RestEndpointMethodTypes["actions"]["deleteWorkflowRun"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["deleteWorkflowRun"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Deletes all logs for a workflow run. * * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ deleteWorkflowRunLogs: { (params?: RestEndpointMethodTypes["actions"]["deleteWorkflowRunLogs"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["deleteWorkflowRunLogs"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Removes a repository from the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." * * OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. */ disableSelectedRepositoryGithubActionsOrganization: { (params?: RestEndpointMethodTypes["actions"]["disableSelectedRepositoryGithubActionsOrganization"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["disableSelectedRepositoryGithubActionsOrganization"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Disables a workflow and sets the `state` of the workflow to `disabled_manually`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. * * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ disableWorkflow: { (params?: RestEndpointMethodTypes["actions"]["disableWorkflow"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["disableWorkflow"]["response"]>; defaults: RequestInterface["defaults"]; 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`. * * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ downloadArtifact: { (params?: RestEndpointMethodTypes["actions"]["downloadArtifact"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["downloadArtifact"]["response"]>; defaults: RequestInterface["defaults"]; 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. * * If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ downloadJobLogsForWorkflowRun: { (params?: RestEndpointMethodTypes["actions"]["downloadJobLogsForWorkflowRun"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["downloadJobLogsForWorkflowRun"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Gets a redirect URL to download an archive of log files for a specific workflow run attempt. This link expires after * 1 minute. Look for `Location:` in the response header to find the URL for the download. * * Anyone with read access to the repository can use this endpoint. * * If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ downloadWorkflowRunAttemptLogs: { (params?: RestEndpointMethodTypes["actions"]["downloadWorkflowRunAttemptLogs"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["downloadWorkflowRunAttemptLogs"]["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, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ downloadWorkflowRunLogs: { (params?: RestEndpointMethodTypes["actions"]["downloadWorkflowRunLogs"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["downloadWorkflowRunLogs"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." * * OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. */ enableSelectedRepositoryGithubActionsOrganization: { (params?: RestEndpointMethodTypes["actions"]["enableSelectedRepositoryGithubActionsOrganization"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["enableSelectedRepositoryGithubActionsOrganization"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Enables a workflow and sets the `state` of the workflow to `active`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. * * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ enableWorkflow: { (params?: RestEndpointMethodTypes["actions"]["enableWorkflow"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["enableWorkflow"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Cancels a workflow run and bypasses conditions that would otherwise cause a workflow execution to continue, such as an `always()` condition on a job. * You should only use this endpoint to cancel a workflow run when the workflow run is not responding to [`POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel`](/rest/actions/workflow-runs#cancel-a-workflow-run). * * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ forceCancelWorkflowRun: { (params?: RestEndpointMethodTypes["actions"]["forceCancelWorkflowRun"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["forceCancelWorkflowRun"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Generates a configuration that can be passed to the runner application at startup. * * The authenticated user must have admin access to the organization. * * OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ generateRunnerJitconfigForOrg: { (params?: RestEndpointMethodTypes["actions"]["generateRunnerJitconfigForOrg"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["generateRunnerJitconfigForOrg"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Generates a configuration that can be passed to the runner application at startup. * * The authenticated user must have admin access to the repository. * * OAuth tokens and personal access tokens (classic) need the`repo` scope to use this endpoint. */ generateRunnerJitconfigForRepo: { (params?: RestEndpointMethodTypes["actions"]["generateRunnerJitconfigForRepo"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["generateRunnerJitconfigForRepo"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Lists the GitHub Actions caches for a repository. * * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ getActionsCacheList: { (params?: RestEndpointMethodTypes["actions"]["getActionsCacheList"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["getActionsCacheList"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Gets GitHub Actions cache usage for a repository. * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. * * Anyone with read access to the repository can use this endpoint. * * If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ getActionsCacheUsage: { (params?: RestEndpointMethodTypes["actions"]["getActionsCacheUsage"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["getActionsCacheUsage"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Lists repositories and their GitHub Actions cache usage for an organization. * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. * * OAuth tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint. */ getActionsCacheUsageByRepoForOrg: { (params?: RestEndpointMethodTypes["actions"]["getActionsCacheUsageByRepoForOrg"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["getActionsCacheUsageByRepoForOrg"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Gets the total GitHub Actions cache usage for an organization. * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. * * OAuth tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint. */ getActionsCacheUsageForOrg: { (params?: RestEndpointMethodTypes["actions"]["getActionsCacheUsageForOrg"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["getActionsCacheUsageForOrg"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Gets the selected actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." * * OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. */ getAllowedActionsOrganization: { (params?: RestEndpointMethodTypes["actions"]["getAllowedActionsOrganization"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["getAllowedActionsOrganization"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Gets the settings for selected actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." * * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ getAllowedActionsRepository: { (params?: RestEndpointMethodTypes["actions"]["getAllowedActionsRepository"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["getAllowedActionsRepository"]["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, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ getArtifact: { (params?: RestEndpointMethodTypes["actions"]["getArtifact"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["getArtifact"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Gets the customization template for an OpenID Connect (OIDC) subject claim. * * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ getCustomOidcSubClaimForRepo: { (params?: RestEndpointMethodTypes["actions"]["getCustomOidcSubClaimForRepo"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["getCustomOidcSubClaimForRepo"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Get the public key for an environment, which you need to encrypt environment * secrets. You need to encrypt a secret before you can create or update secrets. * * Anyone with read access to the repository can use this endpoint. * * If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ getEnvironmentPublicKey: { (params?: RestEndpointMethodTypes["actions"]["getEnvironmentPublicKey"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["getEnvironmentPublicKey"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Gets a single environment secret without revealing its encrypted value. * * Authenticated users must have collaborator access to a repository to create, update, or read secrets. * * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ getEnvironmentSecret: { (params?: RestEndpointMethodTypes["actions"]["getEnvironmentSecret"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["getEnvironmentSecret"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Gets a specific variable in an environment. * * Authenticated users must have collaborator access to a repository to create, update, or read variables. * * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ getEnvironmentVariable: { (params?: RestEndpointMethodTypes["actions"]["getEnvironmentVariable"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["getEnvironmentVariable"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." * * OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. */ getGithubActionsDefaultWorkflowPermissionsOrganization: { (params?: RestEndpointMethodTypes["actions"]["getGithubActionsDefaultWorkflowPermissionsOrganization"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["getGithubActionsDefaultWorkflowPermissionsOrganization"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, * as well as if GitHub Actions can submit approving pull request reviews. * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." * * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. */ getGithubActionsDefaultWorkflowPermissionsRepository: { (params?: RestEndpointMethodTypes["actions"]["getGithubActionsDefaultWorkflowPermissionsRepository"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["getGithubActionsDefaultWorkflowPermissionsRepository"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Gets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. * * OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. */ getGithubActionsPermissionsOrganization: { (params?: RestEndpointMethodTypes["actions"]["getGithubActionsPermissionsOrganization"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["getGithubActionsPermissionsOrganization"]["response"]>; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** * Gets the GitHub Actions permissions policy for a repo