# endpoints

operation_id: actions/delete-actions-cache-by-key
path: /repos/{owner}/{repo}/actions/caches
method: DELETE
summary: Delete GitHub Actions caches for a repository (using a cache key)
auth_scheme_ref: GitHubBearerToken
description:
  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.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/actions-cache-key-required"},{"$ref":"#/components/parameters/actions-cache-git-ref-full"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/actions-cache-list"}},"schema":{"$ref":"#/components/schemas/actions-cache-list"}}},"description":"Response"}}


operation_id: actions/delete-actions-cache-by-id
path: /repos/{owner}/{repo}/actions/caches/{cache_id}
method: DELETE
summary: Delete a GitHub Actions cache for a repository (using a cache ID)
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  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.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/cache-id"}],"requestBody":null}


operation_id: actions/list-concurrency-groups-for-repository
path: /repos/{owner}/{repo}/actions/concurrency_groups
method: GET
summary: List concurrency groups for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Lists the active concurrency groups for a repository.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/pagination-after"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/concurrency-group-list"}},"schema":{"$ref":"#/components/schemas/concurrency-group-list"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: actions/get-concurrency-group-for-repository
path: /repos/{owner}/{repo}/actions/concurrency_groups/{concurrency_group_name}
method: GET
summary: Get a concurrency group for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Gets a specific concurrency group for a repository, including all instances in the group's queue.
  Returns 404 if the group is inactive or does not exist.

  Optionally, pass `ahead_of_run` or `ahead_of_job` to filter the results to only the items
  ahead of the specified workflow run or job in the queue, plus the specified item itself
  (returned as the last element). This is useful for determining what is blocking a particular
  run or job. Returns 422 if the specified run or job is not in this concurrency group.

  When using `ahead_of_run`, this matches workflow-level concurrency and any reusable-workflow
  leases held on behalf of that run. Job-level leases within the run are not considered to
  block the run as a whole. Use `ahead_of_job` to match job-level concurrency and reusable-workflow
  leases on the job's ancestor paths.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/concurrency-group-name"},{"description":"Filter to items ahead of this workflow run ID in the queue, plus the run itself.\nMatches workflow-level concurrency and reusable-workflow leases held on behalf of\nthe run. Mutually exclusive with `ahead_of_job`.","in":"query","name":"ahead_of_run","schema":{"minimum":1,"type":"integer"},"style":"form"},{"description":"Filter to items ahead of this job ID in the queue, plus the job itself.\nMatches job-level concurrency and reusable-workflow leases on the job's\nancestor paths. Mutually exclusive with `ahead_of_run`.","in":"query","name":"ahead_of_job","schema":{"minimum":1,"type":"integer"},"style":"form"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/concurrency-group"}},"schema":{"$ref":"#/components/schemas/concurrency-group"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: actions/get-job-for-workflow-run
path: /repos/{owner}/{repo}/actions/jobs/{job_id}
method: GET
summary: Get a job for a workflow run
auth_scheme_ref: GitHubBearerToken
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, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/job-id"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/job"}},"schema":{"$ref":"#/components/schemas/job"}}},"description":"Response"}}


operation_id: actions/download-job-logs-for-workflow-run
path: /repos/{owner}/{repo}/actions/jobs/{job_id}/logs
method: GET
summary: Download job logs for a workflow run
auth_scheme_ref: GitHubBearerToken
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, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/job-id"}],"requestBody":null}

output_schema:
  {"302":{"description":"Response","headers":{"Location":{"example":"https://pipelines.actions.githubusercontent.com/ab1f3cCFPB34Nd6imvFxpGZH5hNlDp2wijMwl2gDoO0bcrrlJj/_apis/pipelines/1/jobs/19/signedlogcontent?urlExpires=2020-01-22T22%3A44%3A54.1389777Z&urlSigningMethod=HMACV1&urlSignature=2TUDfIg4fm36OJmfPy6km5QD5DLCOkBVzvhWZM8B%2BUY%3D","schema":{"type":"string"},"style":"simple"}}}}


operation_id: actions/re-run-job-for-workflow-run
path: /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun
method: POST
summary: Re-run a job from a workflow run
auth_scheme_ref: GitHubBearerToken
description:
  Re-run a job and its dependent jobs in a workflow run.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/job-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{}},"schema":{"nullable":true,"properties":{"enable_debug_logging":{"default":false,"description":"Whether to enable debug logging for the re-run.","type":"boolean"},"enable_debugger":{"default":false,"description":"Whether to enable the debugger for the re-run of this job.","type":"boolean"}},"type":"object"}}}}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{}},"schema":{"$ref":"#/components/schemas/empty-object"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"}}


operation_id: actions/get-custom-oidc-sub-claim-for-repo
path: /repos/{owner}/{repo}/actions/oidc/customization/sub
method: GET
summary: Get the customization template for an OIDC subject claim for a repository
auth_scheme_ref: GitHubBearerToken
description:
  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.

input_schema:
[cell repeats an earlier one in this file: 116 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/oidc-custom-sub-repo"}},"schema":{"$ref":"#/components/schemas/oidc-custom-sub-repo"}}},"description":"Status response"},"400":{"$ref":"#/components/responses/bad_request"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: actions/set-custom-oidc-sub-claim-for-repo
path: /repos/{owner}/{repo}/actions/oidc/customization/sub
method: PUT
summary: Set the customization template for an OIDC subject claim for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Sets the customization template and `opt-in` or `opt-out` flag for an OpenID Connect (OIDC) subject claim for a repository.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"include_claim_keys":["repo","context"],"use_default":false}}},"schema":{"description":"Actions OIDC subject customization for a repository","properties":{"include_claim_keys":{"description":"Array of unique strings. Each claim key can only contain alphanumeric characters and underscores.","items":{"type":"string"},"type":"array"},"use_default":{"description":"Whether to use the default template or not. If `true`, the `include_claim_keys` field is ignored.","type":"boolean"},"use_immutable_subject":{"description":"Whether to opt in to the immutable OIDC subject claim format for this repository. When `true`, OIDC tokens will use a stable, repository-ID-based `sub` claim.","type":"boolean"}},"required":["use_default"],"title":"Actions OIDC subject customization for a repository","type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{}},"schema":{"$ref":"#/components/schemas/empty-object"}}},"description":"Empty response"},"400":{"$ref":"#/components/responses/bad_request"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed_simple"}}


operation_id: actions/list-repo-organization-secrets
path: /repos/{owner}/{repo}/actions/organization-secrets
method: GET
summary: List repository organization secrets
auth_scheme_ref: GitHubBearerToken
description:
  Lists all organization secrets shared with a repository without revealing their encrypted
  values.

  Authenticated users must have collaborator access to a repository to create, update, or read secrets.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/actions-secret-paginated"}},"schema":{"properties":{"secrets":{"items":{"$ref":"#/components/schemas/actions-secret"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","secrets"],"type":"object"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}}}


operation_id: actions/list-repo-organization-variables
path: /repos/{owner}/{repo}/actions/organization-variables
method: GET
summary: List repository organization variables
auth_scheme_ref: GitHubBearerToken
description:
  Lists all organization variables shared with a repository.

  Authenticated users must have collaborator access to a repository to create, update, or read variables.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/variables-per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/actions-variables-paginated"}},"schema":{"properties":{"total_count":{"type":"integer"},"variables":{"items":{"$ref":"#/components/schemas/actions-variable"},"type":"array"}},"required":["total_count","variables"],"type":"object"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}}}


operation_id: actions/get-github-actions-permissions-repository
path: /repos/{owner}/{repo}/actions/permissions
method: GET
summary: Get GitHub Actions permissions for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions and reusable workflows allowed to run in the repository.

  OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 116 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/actions-repository-permissions"}},"schema":{"$ref":"#/components/schemas/actions-repository-permissions"}}},"description":"Response"}}


operation_id: actions/set-github-actions-permissions-repository
path: /repos/{owner}/{repo}/actions/permissions
method: PUT
summary: Set GitHub Actions permissions for a repository
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions and reusable workflows in the repository.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"allowed_actions":"selected","enabled":true,"sha_pinning_required":true}}},"schema":{"properties":{"allowed_actions":{"$ref":"#/components/schemas/allowed-actions"},"enabled":{"$ref":"#/components/schemas/actions-enabled"},"sha_pinning_required":{"$ref":"#/components/schemas/sha-pinning-required"}},"required":["enabled"],"type":"object"}}},"required":true}}


operation_id: actions/get-workflow-access-to-repository
path: /repos/{owner}/{repo}/actions/permissions/access
method: GET
summary: Get the level of access for workflows outside of the repository
auth_scheme_ref: GitHubBearerToken
description:
  Gets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository.
  This endpoint only applies to private repositories.
  For more information, see "[Allowing access to components in a private repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-a-private-repository)."

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 116 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/actions-workflow-access-to-repository"}},"schema":{"$ref":"#/components/schemas/actions-workflow-access-to-repository"}}},"description":"Response"}}


operation_id: actions/set-workflow-access-to-repository
path: /repos/{owner}/{repo}/actions/permissions/access
method: PUT
summary: Set the level of access for workflows outside of the repository
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository.
  This endpoint only applies to private repositories.
  For more information, see "[Allowing access to components in a private repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-a-private-repository)".

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/actions-workflow-access-to-repository"}},"schema":{"$ref":"#/components/schemas/actions-workflow-access-to-repository"}}},"required":true}}


operation_id: actions/get-artifact-and-log-retention-settings-repository
path: /repos/{owner}/{repo}/actions/permissions/artifact-and-log-retention
method: GET
summary: Get artifact and log retention settings for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Gets artifact and log retention settings for a repository.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 116 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"value":{"days":90,"maximum_allowed_days":365}}},"schema":{"$ref":"#/components/schemas/actions-artifact-and-log-retention-response"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: actions/set-artifact-and-log-retention-settings-repository
path: /repos/{owner}/{repo}/actions/permissions/artifact-and-log-retention
method: PUT
summary: Set artifact and log retention settings for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Sets artifact and log retention settings for a repository.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Set retention days","value":{"days":90}}},"schema":{"$ref":"#/components/schemas/actions-artifact-and-log-retention"}}},"required":true}}

output_schema:
  {"204":{"description":"Empty response for successful settings update"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: actions/get-fork-pr-contributor-approval-permissions-repository
path: /repos/{owner}/{repo}/actions/permissions/fork-pr-contributor-approval
method: GET
summary: Get fork PR contributor approval permissions for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Gets the fork PR contributor approval policy for a repository.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 116 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/actions-fork-pr-contributor-approval"}},"schema":{"$ref":"#/components/schemas/actions-fork-pr-contributor-approval"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: actions/set-fork-pr-contributor-approval-permissions-repository
path: /repos/{owner}/{repo}/actions/permissions/fork-pr-contributor-approval
method: PUT
summary: Set fork PR contributor approval permissions for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Sets the fork PR contributor approval policy for a repository.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Set approval policy to first time contributors","value":{"approval_policy":"first_time_contributors"}}},"schema":{"$ref":"#/components/schemas/actions-fork-pr-contributor-approval"}}},"required":true}}

output_schema:
[cell repeats an earlier one in this file: 142 characters]


operation_id: actions/get-private-repo-fork-pr-workflows-settings-repository
path: /repos/{owner}/{repo}/actions/permissions/fork-pr-workflows-private-repos
method: GET
summary: Get private repo fork PR workflow settings for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Gets the settings for whether workflows from fork pull requests can run on a private repository.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 116 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/actions-fork-pr-workflows-private-repos"}},"schema":{"$ref":"#/components/schemas/actions-fork-pr-workflows-private-repos"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: actions/set-private-repo-fork-pr-workflows-settings-repository
path: /repos/{owner}/{repo}/actions/permissions/fork-pr-workflows-private-repos
method: PUT
summary: Set private repo fork PR workflow settings for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Sets the settings for whether workflows from fork pull requests can run on a private repository.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/actions-fork-pr-workflows-private-repos"}},"schema":{"$ref":"#/components/schemas/actions-fork-pr-workflows-private-repos-request"}}},"required":true}}

output_schema:
  {"204":{"description":"Empty response for successful settings update"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: actions/get-allowed-actions-repository
path: /repos/{owner}/{repo}/actions/permissions/selected-actions
method: GET
summary: Get allowed actions and reusable workflows for a repository
auth_scheme_ref: GitHubBearerToken
description:
  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.

input_schema:
[cell repeats an earlier one in this file: 116 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/selected-actions"}},"schema":{"$ref":"#/components/schemas/selected-actions"}}},"description":"Response"}}


operation_id: actions/set-allowed-actions-repository
path: /repos/{owner}/{repo}/actions/permissions/selected-actions
method: PUT
summary: Set allowed actions and reusable workflows for a repository
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Sets the actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository permission 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 app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"selected_actions":{"$ref":"#/components/examples/selected-actions"}},"schema":{"$ref":"#/components/schemas/selected-actions"}}}}}


operation_id: actions/get-github-actions-default-workflow-permissions-repository
path: /repos/{owner}/{repo}/actions/permissions/workflow
method: GET
summary: Get default workflow permissions for a repository
auth_scheme_ref: GitHubBearerToken
description:
  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.

input_schema:
[cell repeats an earlier one in this file: 116 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/actions-default-workflow-permissions"}},"schema":{"$ref":"#/components/schemas/actions-get-default-workflow-permissions"}}},"description":"Response"}}


operation_id: actions/set-github-actions-default-workflow-permissions-repository
path: /repos/{owner}/{repo}/actions/permissions/workflow
method: PUT
summary: Set default workflow permissions for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets 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 app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/actions-default-workflow-permissions"}},"schema":{"$ref":"#/components/schemas/actions-set-default-workflow-permissions"}}},"required":true}}

output_schema:
  {"204":{"description":"Success response"},"409":{"description":"Conflict response when changing a setting is prevented by the owning organization"}}


operation_id: actions/list-self-hosted-runners-for-repo
path: /repos/{owner}/{repo}/actions/runners
method: GET
summary: List self-hosted runners for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Lists all self-hosted runners configured in a repository.

  Authenticated users must have admin access to the repository to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"description":"The name of a self-hosted runner.","in":"query","name":"name","schema":{"type":"string"},"style":"form"},{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/runner-paginated"}},"schema":{"properties":{"runners":{"items":{"$ref":"#/components/schemas/runner"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","runners"],"type":"object"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}}}


operation_id: actions/list-runner-applications-for-repo
path: /repos/{owner}/{repo}/actions/runners/downloads
method: GET
summary: List runner applications for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Lists binaries for the runner application that you can download and run.

  Authenticated users must have admin access to the repository to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 116 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/runner-application-items"}},"schema":{"items":{"$ref":"#/components/schemas/runner-application"},"type":"array"}}},"description":"Response"}}


operation_id: actions/generate-runner-jitconfig-for-repo
path: /repos/{owner}/{repo}/actions/runners/generate-jitconfig
method: POST
summary: Create configuration for a just-in-time runner for a repository
auth_scheme_ref: GitHubBearerToken
description:
  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.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"labels":["self-hosted","X64","macOS","no-gpu"],"name":"New runner","runner_group_id":1,"work_folder":"_work"}}},"schema":{"properties":{"labels":{"description":"The names of the custom labels to add to the runner. **Minimum items**: 1. **Maximum items**: 100.","items":{"type":"string"},"maxItems":100,"minItems":1,"type":"array"},"name":{"description":"The name of the new runner.","type":"string"},"runner_group_id":{"description":"The ID of the runner group to register the runner to.","type":"integer"},"work_folder":{"default":"_work","description":"The working directory to be used for job execution, relative to the runner install directory.","type":"string"}},"required":["name","runner_group_id","labels"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"$ref":"#/components/responses/actions_runner_jitconfig"},"404":{"$ref":"#/components/responses/not_found"},"409":{"$ref":"#/components/responses/conflict"},"422":{"$ref":"#/components/responses/validation_failed_simple"}}


operation_id: actions/create-registration-token-for-repo
path: /repos/{owner}/{repo}/actions/runners/registration-token
method: POST
summary: Create a registration token for a repository
auth_scheme_ref: GitHubBearerToken
description:
  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.

input_schema:
[cell repeats an earlier one in this file: 116 characters]

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/authentication-token"}},"schema":{"$ref":"#/components/schemas/authentication-token"}}},"description":"Response"}}


operation_id: actions/create-remove-token-for-repo
path: /repos/{owner}/{repo}/actions/runners/remove-token
method: POST
summary: Create a remove token for a repository
auth_scheme_ref: GitHubBearerToken
description:
  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.

input_schema:
[cell repeats an earlier one in this file: 116 characters]

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/authentication-token-2"}},"schema":{"$ref":"#/components/schemas/authentication-token"}}},"description":"Response"}}


operation_id: actions/get-self-hosted-runner-for-repo
path: /repos/{owner}/{repo}/actions/runners/{runner_id}
method: GET
summary: Get a self-hosted runner for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Gets a specific self-hosted runner configured in a repository.

  Authenticated users must have admin access to the repository to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/runner-id"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/runner"}},"schema":{"$ref":"#/components/schemas/runner"}}},"description":"Response"}}


operation_id: actions/delete-self-hosted-runner-from-repo
path: /repos/{owner}/{repo}/actions/runners/{runner_id}
method: DELETE
summary: Delete a self-hosted runner from a repository
output_schema: {"204":{"description":"Response"},"422":{"$ref":"#/components/responses/validation_failed_simple"}}
auth_scheme_ref: GitHubBearerToken
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.

  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.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/runner-id"}],"requestBody":null}


operation_id: actions/list-labels-for-self-hosted-runner-for-repo
path: /repos/{owner}/{repo}/actions/runners/{runner_id}/labels
method: GET
summary: List labels for a self-hosted runner for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Lists all labels for a self-hosted runner configured in a repository.

  Authenticated users must have admin access to the repository to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/runner-id"}],"requestBody":null}

output_schema:
  {"200":{"$ref":"#/components/responses/actions_runner_labels"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: actions/set-custom-labels-for-self-hosted-runner-for-repo
path: /repos/{owner}/{repo}/actions/runners/{runner_id}/labels
method: PUT
summary: Set custom labels for a self-hosted runner for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Remove all previous custom labels and set the new custom labels for a specific
  self-hosted runner configured in a repository.

  Authenticated users must have admin access to the repository to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/runner-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"labels":["gpu","accelerated"]}}},"schema":{"properties":{"labels":{"description":"The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels.","items":{"type":"string"},"maxItems":100,"minItems":0,"type":"array"}},"required":["labels"],"type":"object"}}},"required":true}}

output_schema:
[cell repeats an earlier one in this file: 178 characters]


operation_id: actions/add-custom-labels-to-self-hosted-runner-for-repo
path: /repos/{owner}/{repo}/actions/runners/{runner_id}/labels
method: POST
summary: Add custom labels to a self-hosted runner for a repository
auth_scheme_ref: GitHubBearerToken
description:
  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.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/runner-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"labels":["gpu","accelerated"]}}},"schema":{"properties":{"labels":{"description":"The names of the custom labels to add to the runner.","items":{"type":"string"},"maxItems":100,"minItems":1,"type":"array"}},"required":["labels"],"type":"object"}}},"required":true}}

output_schema:
[cell repeats an earlier one in this file: 178 characters]


operation_id: actions/remove-all-custom-labels-from-self-hosted-runner-for-repo
path: /repos/{owner}/{repo}/actions/runners/{runner_id}/labels
method: DELETE
summary: Remove all custom labels from a self-hosted runner for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Remove all custom labels from a self-hosted runner configured in a
  repository. Returns the remaining read-only labels from the runner.

  Authenticated users must have admin access to the repository to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 161 characters]

output_schema:
  {"200":{"$ref":"#/components/responses/actions_runner_labels_readonly"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: actions/remove-custom-label-from-self-hosted-runner-for-repo
path: /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}
method: DELETE
summary: Remove a custom label from a self-hosted runner for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Remove a custom label from a self-hosted runner configured
  in a repository. Returns the remaining labels from the runner.

  This endpoint returns a `404 Not Found` status if the custom label is not
  present on the runner.

  Authenticated users must have admin access to the repository to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/runner-id"},{"$ref":"#/components/parameters/runner-label-name"}],"requestBody":null}

output_schema:
[cell repeats an earlier one in this file: 178 characters]


operation_id: actions/list-workflow-runs-for-repo
path: /repos/{owner}/{repo}/actions/runs
method: GET
summary: List workflow runs for a repository
auth_scheme_ref: GitHubBearerToken
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://docs.github.com/rest/guides/getting-started-with-the-rest-api#parameters).

  Anyone with read access to the repository can use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.

  This endpoint will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/actor"},{"$ref":"#/components/parameters/workflow-run-branch"},{"$ref":"#/components/parameters/event"},{"$ref":"#/components/parameters/workflow-run-status"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/created"},{"$ref":"#/components/parameters/exclude-pull-requests"},{"$ref":"#/components/parameters/workflow-run-check-suite-id"},{"$ref":"#/components/parameters/workflow-run-head-sha"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/workflow-run-paginated"}},"schema":{"properties":{"total_count":{"type":"integer"},"workflow_runs":{"items":{"$ref":"#/components/schemas/workflow-run"},"type":"array"}},"required":["total_count","workflow_runs"],"type":"object"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}}}


operation_id: actions/get-workflow-run
path: /repos/{owner}/{repo}/actions/runs/{run_id}
method: GET
summary: Get a workflow run
auth_scheme_ref: GitHubBearerToken
description:
  Gets a specific workflow run.

  Anyone with read access to the repository can use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/run-id"},{"$ref":"#/components/parameters/exclude-pull-requests"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/workflow-run"}},"schema":{"$ref":"#/components/schemas/workflow-run"}}},"description":"Response"}}


operation_id: actions/delete-workflow-run
path: /repos/{owner}/{repo}/actions/runs/{run_id}
method: DELETE
summary: Delete a workflow run
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  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.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/run-id"}],"requestBody":null}


operation_id: actions/get-reviews-for-run
path: /repos/{owner}/{repo}/actions/runs/{run_id}/approvals
method: GET
summary: Get the review history for a workflow run
auth_scheme_ref: GitHubBearerToken
description:
  Anyone with read access to the repository can use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/run-id"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/environment-approvals-items"}},"schema":{"items":{"$ref":"#/components/schemas/environment-approvals"},"type":"array"}}},"description":"Response"}}


operation_id: actions/approve-workflow-run
path: /repos/{owner}/{repo}/actions/runs/{run_id}/approve
method: POST
summary: Approve a workflow run for a fork pull request
auth_scheme_ref: GitHubBearerToken
description:
  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.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/run-id"}],"requestBody":null}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{}},"schema":{"$ref":"#/components/schemas/empty-object"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: actions/list-workflow-run-artifacts
path: /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts
method: GET
summary: List workflow run artifacts
auth_scheme_ref: GitHubBearerToken
description:
  Lists artifacts for a workflow run.

  Anyone with read access to the repository can use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/run-id"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/artifact-name"},{"$ref":"#/components/parameters/direction"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/artifact-paginated"}},"schema":{"properties":{"artifacts":{"items":{"$ref":"#/components/schemas/artifact"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","artifacts"],"type":"object"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}}}


operation_id: actions/get-workflow-run-attempt
path: /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}
method: GET
summary: Get a workflow run attempt
auth_scheme_ref: GitHubBearerToken
description:
  Gets a specific workflow run attempt.

  Anyone with read access to the repository can use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/run-id"},{"$ref":"#/components/parameters/attempt-number"},{"$ref":"#/components/parameters/exclude-pull-requests"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/workflow-run"}},"schema":{"$ref":"#/components/schemas/workflow-run"}}},"description":"Response"}}


operation_id: actions/list-jobs-for-workflow-run-attempt
path: /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs
method: GET
summary: List jobs for a workflow run attempt
auth_scheme_ref: GitHubBearerToken
description:
  Lists jobs for a specific workflow run attempt. You can use parameters to narrow the list of results. For more information
  about using parameters, see [Parameters](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#parameters).

  Anyone with read access to the repository can use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint  with a private repository.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/run-id"},{"$ref":"#/components/parameters/attempt-number"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/job-paginated"}},"schema":{"properties":{"jobs":{"items":{"$ref":"#/components/schemas/job"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","jobs"],"type":"object"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: actions/download-workflow-run-attempt-logs
path: /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs
method: GET
summary: Download workflow run attempt logs
auth_scheme_ref: GitHubBearerToken
description:
  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.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/run-id"},{"$ref":"#/components/parameters/attempt-number"}],"requestBody":null}

output_schema:
  {"302":{"description":"Response","headers":{"Location":{"example":"https://pipelines.actions.githubusercontent.com/ab1f3cCFPB34Nd6imvFxpGZH5hNlDp2wijMwl2gDoO0bcrrlJj/_apis/pipelines/1/runs/19/signedlogcontent?urlExpires=2020-01-22T22%3A44%3A54.1389777Z&urlSigningMethod=HMACV1&urlSignature=2TUDfIg4fm36OJmfPy6km5QD5DLCOkBVzvhWZM8B%2BUY%3D","schema":{"type":"string"},"style":"simple"}}}}


operation_id: actions/cancel-workflow-run
path: /repos/{owner}/{repo}/actions/runs/{run_id}/cancel
method: POST
summary: Cancel a workflow run
auth_scheme_ref: GitHubBearerToken
description:
  Cancels a workflow run using its `id`.

  OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 158 characters]

output_schema:
  {"202":{"content":{"application/json":{"examples":{"default":{}},"schema":{"$ref":"#/components/schemas/empty-object"}}},"description":"Response"},"409":{"$ref":"#/components/responses/conflict"}}


operation_id: actions/list-concurrency-groups-for-workflow-run
path: /repos/{owner}/{repo}/actions/runs/{run_id}/concurrency_groups
method: GET
summary: List concurrency groups for a workflow run
auth_scheme_ref: GitHubBearerToken
description:
  Lists all concurrency groups associated with a workflow run or its jobs.

  The set of groups is derived from the run's configuration, so a group is
  included even when the run no longer has any items currently holding or
  waiting in it. In that case the `group_members` array will be empty.
  `total_count` reflects the number of groups the run participates in by
  configuration, not the number with active items.

  This differs from `GET /repos/{owner}/{repo}/actions/concurrency_groups/{group_name}`,
  which returns 404 when a group has no active items. That endpoint reports
  the live state of a group repo-wide, while this endpoint reports the
  groups associated with a specific run by configuration.

  Results are sorted by group name and support cursor-based pagination via
  `before` and `after`. The `after` cursor paginates forward only and does
  not emit a `rel="prev"` Link; use `before` to page backward from a
  forward page's `next` cursor.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/run-id"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/pagination-before"},{"$ref":"#/components/parameters/pagination-after"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/concurrency-group-run-list"}},"schema":{"$ref":"#/components/schemas/concurrency-group-run-list"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: actions/review-custom-gates-for-run
path: /repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule
method: POST
summary: Review custom deployment protection rules for a workflow run
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Approve or reject custom deployment protection rules provided by a GitHub App for a workflow run. For more information, see "[Using environments for deployment](https://docs.github.com/actions/deployment/targeting-different-environments/using-environments-for-deployment)."

  > [!NOTE]
  > GitHub Apps can only review their own custom deployment protection rules. To approve or reject pending deployments that are waiting for review from a specific person or team, see [`POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments`](/rest/actions/workflow-runs#review-pending-deployments-for-a-workflow-run).

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/run-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"comment":"All health checks passed.","environment_name":"prod-eus","state":"approved"}}},"schema":{"anyOf":[{"$ref":"#/components/schemas/review-custom-gates-comment-required"},{"$ref":"#/components/schemas/review-custom-gates-state-required"}]}}},"required":true}}


operation_id: actions/force-cancel-workflow-run
path: /repos/{owner}/{repo}/actions/runs/{run_id}/force-cancel
method: POST
summary: Force cancel a workflow run
auth_scheme_ref: GitHubBearerToken
description:
  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.

input_schema:
[cell repeats an earlier one in this file: 158 characters]

output_schema:
  {"202":{"content":{"application/json":{"examples":{"default":{}},"schema":{"$ref":"#/components/schemas/empty-object"}}},"description":"Response"},"409":{"$ref":"#/components/responses/conflict"}}


operation_id: actions/list-jobs-for-workflow-run
path: /repos/{owner}/{repo}/actions/runs/{run_id}/jobs
method: GET
summary: List jobs for a workflow run
auth_scheme_ref: GitHubBearerToken
description:
  Lists jobs for a workflow run. You can use parameters to narrow the list of results. For more information
  about using parameters, see [Parameters](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#parameters).

  Anyone with read access to the repository can use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/run-id"},{"description":"Filters jobs by their `completed_at` timestamp. `latest` returns jobs from the most recent execution of the workflow run. `all` returns all jobs for a workflow run, including from old executions of the workflow run.","in":"query","name":"filter","schema":{"default":"latest","enum":["latest","all"],"type":"string"},"style":"form"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/job-paginated"}},"schema":{"properties":{"jobs":{"items":{"$ref":"#/components/schemas/job"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","jobs"],"type":"object"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}}}


operation_id: actions/download-workflow-run-logs
path: /repos/{owner}/{repo}/actions/runs/{run_id}/logs
method: GET
summary: Download workflow run logs
auth_scheme_ref: GitHubBearerToken
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, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 158 characters]

output_schema:
  {"302":{"description":"Response","headers":{"Location":{"example":"https://pipelines.actions.githubusercontent.com/ab1f3cCFPB34Nd6imvFxpGZH5hNlDp2wijMwl2gDoO0bcrrlJj/_apis/pipelines/1/runs/19/signedlogcontent?urlExpires=2020-01-22T22%3A44%3A54.1389777Z&urlSigningMethod=HMACV1&urlSignature=2TUDfIg4fm36OJmfPy6km5QD5DLCOkBVzvhWZM8B%2BUY%3D","schema":{"type":"string"},"style":"simple"}}}}


operation_id: actions/delete-workflow-run-logs
path: /repos/{owner}/{repo}/actions/runs/{run_id}/logs
method: DELETE
summary: Delete workflow run logs
auth_scheme_ref: GitHubBearerToken
description:
  Deletes all logs for a workflow run.

  OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 158 characters]

output_schema:
  {"204":{"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: actions/get-pending-deployments-for-run
path: /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments
method: GET
summary: Get pending deployments for a workflow run
auth_scheme_ref: GitHubBearerToken
description:
  Get all deployment environments for a workflow run that are waiting for protection rules to pass.

  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.

input_schema:
[cell repeats an earlier one in this file: 158 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/pending-deployment-items"}},"schema":{"items":{"$ref":"#/components/schemas/pending-deployment"},"type":"array"}}},"description":"Response"}}


operation_id: actions/review-pending-deployments-for-run
path: /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments
method: POST
summary: Review pending deployments for a workflow run
auth_scheme_ref: GitHubBearerToken
description:
  Approve or reject pending deployments that are waiting on approval by a required reviewer.

  Required reviewers with read access to the repository contents and deployments can use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/run-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"comment":"Ship it!","environment_ids":[161171787],"state":"approved"}}},"schema":{"properties":{"comment":{"description":"A comment to accompany the deployment review","example":"Ship it!","type":"string"},"environment_ids":{"description":"The list of environment ids to approve or reject","example":[161171787,161171795],"items":{"example":161171787,"type":"integer"},"type":"array"},"state":{"description":"Whether to approve or reject deployment to the specified environments.","enum":["approved","rejected"],"example":"approved","type":"string"}},"required":["environment_ids","state","comment"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/deployment-items"}},"schema":{"items":{"$ref":"#/components/schemas/deployment"},"type":"array"}}},"description":"Response"}}


operation_id: actions/re-run-workflow
path: /repos/{owner}/{repo}/actions/runs/{run_id}/rerun
method: POST
summary: Re-run a workflow
auth_scheme_ref: GitHubBearerToken
description:
  Re-runs your workflow run using its `id`.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/run-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{}},"schema":{"nullable":true,"properties":{"enable_debug_logging":{"default":false,"description":"Whether to enable debug logging for the re-run.","type":"boolean"}},"type":"object"}}}}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{}},"schema":{"$ref":"#/components/schemas/empty-object"}}},"description":"Response"}}


operation_id: actions/re-run-workflow-failed-jobs
path: /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs
method: POST
summary: Re-run failed jobs from a workflow run
auth_scheme_ref: GitHubBearerToken
description:
  Re-run all of the failed jobs and their dependent jobs in a workflow run using the `id` of the workflow run.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/run-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{}},"schema":{"nullable":true,"properties":{"enable_debug_logging":{"default":false,"description":"Whether to enable debug logging for the re-run.","type":"boolean"}},"type":"object"}}}}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{}},"schema":{"$ref":"#/components/schemas/empty-object"}}},"description":"Response"}}


operation_id: actions/get-workflow-run-usage
path: /repos/{owner}/{repo}/actions/runs/{run_id}/timing
method: GET
summary: Get workflow run usage
auth_scheme_ref: GitHubBearerToken
description:
  > [!WARNING]  
  > This endpoint is in the process of closing down. Refer to "[Actions Get workflow usage and Get workflow run usage endpoints closing down](https://github.blog/changelog/2025-02-02-actions-get-workflow-usage-and-get-workflow-run-usage-endpoints-closing-down/)" for more information.

  Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".

  Anyone with read access to the repository can use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.

input_schema:
[cell repeats an earlier one in this file: 158 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/workflow-run-usage"}},"schema":{"$ref":"#/components/schemas/workflow-run-usage"}}},"description":"Response"}}


operation_id: actions/list-repo-secrets
path: /repos/{owner}/{repo}/actions/secrets
method: GET
summary: List repository secrets
auth_scheme_ref: GitHubBearerToken
description:
  Lists all secrets available in a repository without revealing their encrypted
  values.

  Authenticated users must have collaborator access to a repository to create, update, or read secrets.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/actions-secret-paginated"}},"schema":{"properties":{"secrets":{"items":{"$ref":"#/components/schemas/actions-secret"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","secrets"],"type":"object"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}}}


operation_id: actions/get-repo-public-key
path: /repos/{owner}/{repo}/actions/secrets/public-key
method: GET
summary: Get a repository public key
auth_scheme_ref: GitHubBearerToken
description:
  Gets your public key, which you need to encrypt 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.

input_schema:
[cell repeats an earlier one in this file: 116 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/actions-public-key"}},"schema":{"$ref":"#/components/schemas/actions-public-key"}}},"description":"Response"}}


operation_id: actions/get-repo-secret
path: /repos/{owner}/{repo}/actions/secrets/{secret_name}
method: GET
summary: Get a repository secret
auth_scheme_ref: GitHubBearerToken
description:
  Gets a single repository secret without revealing its encrypted value.

  The authenticated user must have collaborator access to the repository to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/secret-name"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/actions-secret"}},"schema":{"$ref":"#/components/schemas/actions-secret"}}},"description":"Response"}}


operation_id: actions/create-or-update-repo-secret
path: /repos/{owner}/{repo}/actions/secrets/{secret_name}
method: PUT
summary: Create or update a repository secret
auth_scheme_ref: GitHubBearerToken
description:
  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.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/secret-name"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"encrypted_value":"c2VjcmV0","key_id":"012345678912345678"}}},"schema":{"properties":{"encrypted_value":{"description":"Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/actions/secrets#get-a-repository-public-key) endpoint.","pattern":"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$","type":"string"},"key_id":{"description":"ID of the key you used to encrypt the secret.","type":"string"}},"required":["encrypted_value","key_id"],"type":"object"}}},"required":true}}

output_schema:
[cell repeats an earlier one in this file: 226 characters]


operation_id: actions/delete-repo-secret
path: /repos/{owner}/{repo}/actions/secrets/{secret_name}
method: DELETE
summary: Delete a repository secret
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  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.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/secret-name"}],"requestBody":null}


operation_id: actions/list-repo-variables
path: /repos/{owner}/{repo}/actions/variables
method: GET
summary: List repository variables
auth_scheme_ref: GitHubBearerToken
description:
  Lists all repository variables.

  Authenticated users must have collaborator access to a repository to create, update, or read variables.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/variables-per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/actions-variables-paginated"}},"schema":{"properties":{"total_count":{"type":"integer"},"variables":{"items":{"$ref":"#/components/schemas/actions-variable"},"type":"array"}},"required":["total_count","variables"],"type":"object"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}}}


operation_id: actions/create-repo-variable
path: /repos/{owner}/{repo}/actions/variables
method: POST
summary: Create a repository variable
auth_scheme_ref: GitHubBearerToken
description:
  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.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"name":"USERNAME","value":"octocat"}}},"schema":{"properties":{"name":{"description":"The name of the variable.","type":"string"},"value":{"description":"The value of the variable.","type":"string"}},"required":["name","value"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{}},"schema":{"$ref":"#/components/schemas/empty-object"}}},"description":"Response"}}


operation_id: actions/get-repo-variable
path: /repos/{owner}/{repo}/actions/variables/{name}
method: GET
summary: Get a repository variable
auth_scheme_ref: GitHubBearerToken
description:
  Gets a specific variable in a repository.

  The authenticated user must have collaborator access to the repository to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/variable-name"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/actions-variable"}},"schema":{"$ref":"#/components/schemas/actions-variable"}}},"description":"Response"}}


operation_id: actions/delete-repo-variable
path: /repos/{owner}/{repo}/actions/variables/{name}
method: DELETE
summary: Delete a repository variable
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  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.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/variable-name"}],"requestBody":null}


operation_id: actions/update-repo-variable
path: /repos/{owner}/{repo}/actions/variables/{name}
method: PATCH
summary: Update a repository variable
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Updates 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 app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/variable-name"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"name":"USERNAME","value":"octocat"}}},"schema":{"properties":{"name":{"description":"The name of the variable.","type":"string"},"value":{"description":"The value of the variable.","type":"string"}},"type":"object"}}},"required":true}}


operation_id: actions/list-repo-workflows
path: /repos/{owner}/{repo}/actions/workflows
method: GET
summary: List repository workflows
auth_scheme_ref: GitHubBearerToken
description:
  Lists the workflows in a repository.

  Anyone with read access to the repository can use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.

input_schema:
[cell repeats an earlier one in this file: 200 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/workflow-paginated"}},"schema":{"properties":{"total_count":{"type":"integer"},"workflows":{"items":{"$ref":"#/components/schemas/workflow"},"type":"array"}},"required":["total_count","workflows"],"type":"object"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}}}


operation_id: actions/get-workflow
path: /repos/{owner}/{repo}/actions/workflows/{workflow_id}
method: GET
summary: Get a workflow
auth_scheme_ref: GitHubBearerToken
description:
  Gets a specific workflow. You can replace `workflow_id` with the workflow
  file name. For example, you could use `main.yaml`.

  Anyone with read access to the repository can use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/workflow-id"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/workflow"}},"schema":{"$ref":"#/components/schemas/workflow"}}},"description":"Response"}}


operation_id: actions/disable-workflow
path: /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable
method: PUT
summary: Disable a workflow
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  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.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/workflow-id"}],"requestBody":null}


operation_id: actions/create-workflow-dispatch
path: /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches
method: POST
summary: Create a workflow dispatch event
auth_scheme_ref: GitHubBearerToken
description:
  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.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/workflow-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"inputs":{"home":"San Francisco, CA","name":"Mona the Octocat"},"ref":"topic-branch"}}},"schema":{"properties":{"inputs":{"additionalProperties":true,"description":"Input keys and values configured in the workflow file. The maximum number of properties is 25. Any default properties configured in the workflow file will be used when `inputs` are omitted.","maxProperties":25,"type":"object"},"ref":{"description":"The git reference for the workflow. The reference can be a branch or tag name.","type":"string"}},"required":["ref"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/workflow-dispatch-response"}},"schema":{"$ref":"#/components/schemas/workflow-dispatch-response"}}},"description":"Response including the workflow run ID and URLs."}}


operation_id: actions/enable-workflow
path: /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable
method: PUT
summary: Enable a workflow
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  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.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/workflow-id"}],"requestBody":null}


operation_id: actions/list-workflow-runs
path: /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs
method: GET
summary: List workflow runs for a workflow
auth_scheme_ref: GitHubBearerToken
description:
  List all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#parameters).

  Anyone with read access to the repository can use this endpoint

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.

  This endpoint will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/workflow-id"},{"$ref":"#/components/parameters/actor"},{"$ref":"#/components/parameters/workflow-run-branch"},{"$ref":"#/components/parameters/event"},{"$ref":"#/components/parameters/workflow-run-status"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/created"},{"$ref":"#/components/parameters/exclude-pull-requests"},{"$ref":"#/components/parameters/workflow-run-check-suite-id"},{"$ref":"#/components/parameters/workflow-run-head-sha"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/workflow-run-paginated"}},"schema":{"properties":{"total_count":{"type":"integer"},"workflow_runs":{"items":{"$ref":"#/components/schemas/workflow-run"},"type":"array"}},"required":["total_count","workflow_runs"],"type":"object"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}}}


operation_id: actions/get-workflow-usage
path: /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing
method: GET
summary: Get workflow usage
auth_scheme_ref: GitHubBearerToken
description:
  > [!WARNING]  
  > This endpoint is in the process of closing down. Refer to "[Actions Get workflow usage and Get workflow run usage endpoints closing down](https://github.blog/changelog/2025-02-02-actions-get-workflow-usage-and-get-workflow-run-usage-endpoints-closing-down/)" for more information.

  Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".

  You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`.

  Anyone with read access to the repository can use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.

input_schema:
[cell repeats an earlier one in this file: 163 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/workflow-usage"}},"schema":{"$ref":"#/components/schemas/workflow-usage"}}},"description":"Response"}}


operation_id: repos/list-activities
path: /repos/{owner}/{repo}/activity
method: GET
summary: List repository activities
auth_scheme_ref: GitHubBearerToken
description:
  Lists a detailed history of changes to a repository, such as pushes, merges, force pushes, and branch changes, and associates these changes with commits and users.

  For more information about viewing repository activity,
  see "[Viewing activity and data for your repository](https://docs.github.com/repositories/viewing-activity-and-data-for-your-repository)."

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/direction"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/pagination-before"},{"$ref":"#/components/parameters/pagination-after"},{"description":"The Git reference for the activities you want to list.\n\nThe `ref` for a branch can be formatted either as `refs/heads/BRANCH_NAME` or `BRANCH_NAME`, where `BRANCH_NAME` is the name of your branch.","in":"query","name":"ref","schema":{"type":"string"},"style":"form"},{"description":"The GitHub username to use to filter by the actor who performed the activity.","in":"query","name":"actor","schema":{"type":"string"},"style":"form"},{"description":"The time period to filter by.\n\nFor example, `day` will filter for activity that occurred in the past 24 hours, and `week` will filter for activity that occurred in the past 7 days (168 hours).","in":"query","name":"time_period","schema":{"enum":["day","week","month","quarter","year"],"type":"string"},"style":"form"},{"description":"The activity type to filter by.\n\nFor example, you can choose to filter by \"force_push\", to see all force pushes to the repository.","in":"query","name":"activity_type","schema":{"enum":["push","force_push","branch_creation","branch_deletion","pr_merge","merge_queue_merge"],"type":"string"},"style":"form"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/activity-items"}},"schema":{"items":{"$ref":"#/components/schemas/activity"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"422":{"$ref":"#/components/responses/validation_failed_simple"}}


operation_id: agents/create-or-update-repo-secret
path: /repos/{owner}/{repo}/agents/secrets/{secret_name}
method: PUT
summary: Create or update a repository secret
auth_scheme_ref: GitHubBearerToken
description:
  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.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/secret-name"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"encrypted_value":"c2VjcmV0","key_id":"012345678912345678"}}},"schema":{"properties":{"encrypted_value":{"description":"Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/agents/secrets#get-a-repository-public-key) endpoint.","pattern":"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$","type":"string"},"key_id":{"description":"ID of the key you used to encrypt the secret.","type":"string"}},"required":["encrypted_value","key_id"],"type":"object"}}},"required":true}}

output_schema:
[cell repeats an earlier one in this file: 226 characters]


operation_id: issues/list-assignees
path: /repos/{owner}/{repo}/assignees
method: GET
summary: List assignees
auth_scheme_ref: GitHubBearerToken
description:
  Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository.

input_schema:
[cell repeats an earlier one in this file: 200 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/simple-user-items"}},"schema":{"items":{"$ref":"#/components/schemas/simple-user"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: issues/check-user-can-be-assigned
path: /repos/{owner}/{repo}/assignees/{assignee}
method: GET
summary: Check if a user can be assigned
auth_scheme_ref: GitHubBearerToken
description:
  Checks if a user has permission to be assigned to an issue in this repository.

  If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned.

  Otherwise a `404` status code is returned.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"in":"path","name":"assignee","required":true,"schema":{"type":"string"},"style":"simple"}],"requestBody":null}

output_schema:
  {"204":{"description":"If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/basic-error"}}},"description":"Otherwise a `404` status code is returned."}}


operation_id: repos/create-attestation
path: /repos/{owner}/{repo}/attestations
method: POST
summary: Create an attestation
auth_scheme_ref: GitHubBearerToken
description:
  Store an artifact attestation and associate it with a repository.

  The authenticated user must have write permission to the repository and, if using a fine-grained access token, the `attestations:write` permission is required.

  Artifact attestations are meant to be created using the [attest action](https://github.com/actions/attest). For more information, see our guide on [using artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds).

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/attestation"}},"schema":{"properties":{"bundle":{"description":"The attestation's Sigstore Bundle.\nRefer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information.","properties":{"dsseEnvelope":{"additionalProperties":true,"type":"object"},"mediaType":{"type":"string"},"verificationMaterial":{"additionalProperties":true,"type":"object"}},"type":"object"}},"required":["bundle"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"value":{"id":2}}},"schema":{"properties":{"id":{"description":"The ID of the attestation.","type":"integer"}},"type":"object"}}},"description":"response"},"403":{"$ref":"#/components/responses/forbidden"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: repos/list-attestations
path: /repos/{owner}/{repo}/attestations/{subject_digest}
method: GET
summary: List attestations
auth_scheme_ref: GitHubBearerToken
description:
  List a collection of artifact attestations with a given subject digest that are associated with a repository.

  The authenticated user making the request must have read access to the repository. In addition, when using a fine-grained access token the `attestations:read` permission is required.

  **Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds).

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/pagination-before"},{"$ref":"#/components/parameters/pagination-after"},{"description":"The parameter should be set to the attestation's subject's SHA256 digest, in the form `sha256:HEX_DIGEST`.","in":"path","name":"subject_digest","required":true,"schema":{"type":"string"},"style":"simple","x-multi-segment":true},{"description":"Optional filter for fetching attestations with a given predicate type.\nThis option accepts `provenance`, `sbom`, `release`, or freeform text\nfor custom predicate types.","in":"query","name":"predicate_type","schema":{"type":"string"},"style":"form"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/list-attestations"}},"schema":{"properties":{"attestations":{"items":{"properties":{"bundle_url":{"type":"string"},"initiator":{"type":"string"},"repository_id":{"type":"integer"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"Response"}}


operation_id: repos/list-autolinks
path: /repos/{owner}/{repo}/autolinks
method: GET
summary: Get all autolinks of a repository
auth_scheme_ref: GitHubBearerToken
description:
  Gets all autolinks that are configured for a repository.

  Information about autolinks are only available to repository administrators.

input_schema:
[cell repeats an earlier one in this file: 116 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/autolink-items"}},"schema":{"items":{"$ref":"#/components/schemas/autolink"},"type":"array"}}},"description":"Response"}}


operation_id: repos/create-autolink
path: /repos/{owner}/{repo}/autolinks
method: POST
summary: Create an autolink reference for a repository
description: Users with admin access to the repository can create an autolink.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"is_alphanumeric":true,"key_prefix":"TICKET-","url_template":"https://example.com/TICKET?query=<num>"}}},"schema":{"properties":{"is_alphanumeric":{"default":true,"description":"Whether this autolink reference matches alphanumeric characters. If true, the `<num>` parameter of the `url_template` matches alphanumeric characters `A-Z` (case insensitive), `0-9`, and `-`. If false, this autolink reference only matches numeric characters.","type":"boolean"},"key_prefix":{"description":"This prefix appended by certain characters will generate a link any time it is found in an issue, pull request, or commit.","type":"string"},"url_template":{"description":"The URL must contain `<num>` for the reference number. `<num>` matches different characters depending on the value of `is_alphanumeric`.","type":"string"}},"required":["key_prefix","url_template"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/autolink"}},"schema":{"$ref":"#/components/schemas/autolink"}}},"description":"response","headers":{"Location":{"example":"https://api.github.com/repos/octocat/Hello-World/autolinks/1","schema":{"type":"string"},"style":"simple"}}},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: repos/get-autolink
path: /repos/{owner}/{repo}/autolinks/{autolink_id}
method: GET
summary: Get an autolink reference of a repository
auth_scheme_ref: GitHubBearerToken
description:
  This returns a single autolink reference by ID that was configured for the given repository.

  Information about autolinks are only available to repository administrators.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/autolink-id"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/autolink"}},"schema":{"$ref":"#/components/schemas/autolink"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: repos/delete-autolink
path: /repos/{owner}/{repo}/autolinks/{autolink_id}
method: DELETE
summary: Delete an autolink reference from a repository
output_schema: {"204":{"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}
auth_scheme_ref: GitHubBearerToken
description:
  This deletes a single autolink reference by ID that was configured for the given repository.

  Information about autolinks are only available to repository administrators.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/autolink-id"}],"requestBody":null}


operation_id: repos/check-automated-security-fixes
path: /repos/{owner}/{repo}/automated-security-fixes
method: GET
summary: Check if Dependabot security updates are enabled for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Shows whether Dependabot security updates are enabled, disabled or paused for a repository. The authenticated user must have admin read access to the repository. For more information, see "[Configuring Dependabot security updates](https://docs.github.com/articles/configuring-automated-security-fixes)".

input_schema:
[cell repeats an earlier one in this file: 116 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"value":{"enabled":true,"paused":false}}},"schema":{"$ref":"#/components/schemas/check-automated-security-fixes"}}},"description":"Response if Dependabot is enabled"},"404":{"description":"Not Found if Dependabot is not enabled for the repository"}}


operation_id: repos/enable-automated-security-fixes
path: /repos/{owner}/{repo}/automated-security-fixes
method: PUT
summary: Enable Dependabot security updates
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Enables Dependabot security updates for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring Dependabot security updates](https://docs.github.com/articles/configuring-automated-security-fixes)".

input_schema:
[cell repeats an earlier one in this file: 116 characters]


operation_id: repos/disable-automated-security-fixes
path: /repos/{owner}/{repo}/automated-security-fixes
method: DELETE
summary: Disable Dependabot security updates
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Disables Dependabot security updates for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring Dependabot security updates](https://docs.github.com/articles/configuring-automated-security-fixes)".

input_schema:
[cell repeats an earlier one in this file: 116 characters]


operation_id: repos/list-branches
path: /repos/{owner}/{repo}/branches
method: GET
summary: List branches
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"description":"Setting to `true` returns only branches protected by branch protections or rulesets. When set to `false`, only unprotected branches are returned. Omitting this parameter returns all branches.","in":"query","name":"protected","schema":{"type":"boolean"},"style":"form"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/short-branch-with-protection-items"}},"schema":{"items":{"$ref":"#/components/schemas/short-branch"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: repos/get-branch
path: /repos/{owner}/{repo}/branches/{branch}
method: GET
summary: Get a branch
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/branch"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/branch-get"}},"schema":{"$ref":"#/components/schemas/branch-with-protection"}}},"description":"Response"},"301":{"$ref":"#/components/responses/moved_permanently"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: repos/get-branch-protection
path: /repos/{owner}/{repo}/branches/{branch}/protection
method: GET
summary: Get branch protection
auth_scheme_ref: GitHubBearerToken
description:
  Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/branch"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/branch-protection"}},"schema":{"$ref":"#/components/schemas/branch-protection"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: repos/update-branch-protection
path: /repos/{owner}/{repo}/branches/{branch}/protection
method: PUT
summary: Update branch protection
auth_scheme_ref: GitHubBearerToken
description:
  Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

  Protecting a branch requires admin or owner permissions to the repository.

  > [!NOTE]
  > Passing new arrays of `users` and `teams` replaces their previous values.

  > [!NOTE]
  > The list of users, apps, and teams in total is limited to 100 items.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/branch"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"allow_deletions":true,"allow_force_pushes":true,"allow_fork_syncing":true,"block_creations":true,"enforce_admins":true,"lock_branch":true,"required_conversation_resolution":true,"required_linear_history":true,"required_pull_request_reviews":{"bypass_pull_request_allowances":{"teams":["justice-league"],"users":["octocat"]},"dismiss_stale_reviews":true,"dismissal_restrictions":{"teams":["justice-league"],"users":["octocat"]},"require_code_owner_reviews":true,"require_last_push_approval":true,"required_approving_review_count":2},"required_status_checks":{"contexts":["continuous-integration/travis-ci"],"strict":true},"restrictions":{"apps":["super-ci"],"teams":["justice-league"],"users":["octocat"]}}}},"schema":{"properties":{"allow_deletions":{"description":"Allows deletion of the protected branch by anyone with write access to the repository. Set to `false` to prevent deletion of the protected branch. Default: `false`. For more information, see \"[Enabling force pushes to a protected branch](https://docs.github.com/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)\" in the GitHub Help documentation.","type":"boolean"},"allow_force_pushes":{"description":"Permits force pushes to the protected branch by anyone with write access to the repository. Set to `true` to allow force pushes. Set to `false` or `null` to block force pushes. Default: `false`. For more information, see \"[Enabling force pushes to a protected branch](https://docs.github.com/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)\" in the GitHub Help documentation.\"","nullable":true,"type":"boolean"},"allow_fork_syncing":{"default":false,"description":"Whether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing. Default: `false`.","type":"boolean"},"block_creations":{"description":"If set to `true`, the `restrictions` branch protection settings which limits who can push will also block pushes which create new branches, unless the push is initiated by a user, team, or app which has the ability to push. Set to `true` to restrict new branch creation. Default: `false`.","type":"boolean"},"enforce_admins":{"description":"Enforce all configured restrictions for administrators. Set to `true` to enforce required status checks for repository administrators. Set to `null` to disable.","nullable":true,"type":"boolean"},"lock_branch":{"default":false,"description":"Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. Default: `false`.","type":"boolean"},"required_conversation_resolution":{"description":"Requires all conversations on code to be resolved before a pull request can be merged into a branch that matches this rule. Set to `false` to disable. Default: `false`.","type":"boolean"},"required_linear_history":{"description":"Enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch. Set to `true` to enforce a linear commit history. Set to `false` to disable a linear commit Git history. Your repository must allow squash merging or rebase merging before you can enable a linear commit history. Default: `false`. For more information, see \"[Requiring a linear commit history](https://docs.github.com/github/administering-a-repository/requiring-a-linear-commit-history)\" in the GitHub Help documentation.","type":"boolean"},"required_pull_request_reviews":{"description":"Require at least one approving review on a pull request, before merging. Set to `null` to disable.","nullable":true,"properties":{"bypass_pull_request_allowances":{"description":"Allow specific users, teams, or apps to bypass pull request requirements.","properties":{"apps":{"description":"The list of app `slug`s allowed to bypass pull request requirements.","items":{"type":"string"},"type":"array"},"teams":{"description":"The list of team `slug`s allowed to bypass pull request requirements.","items":{"type":"string"},"type":"array"},"users":{"description":"The list of user `login`s allowed to bypass pull request requirements.","items":{"type":"string"},"type":"array"}},"type":"object"},"dismiss_stale_reviews":{"description":"Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit.","type":"boolean"},"dismissal_restrictions":{"description":"Specify which users, teams, and apps can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories.","properties":{"apps":{"description":"The list of app `slug`s with dismissal access","items":{"type":"string"},"type":"array"},"teams":{"description":"The list of team `slug`s with dismissal access","items":{"type":"string"},"type":"array"},"users":{"description":"The list of user `login`s with dismissal access","items":{"type":"string"},"type":"array"}},"type":"object"},"require_code_owner_reviews":{"description":"Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) review them.","type":"boolean"},"require_last_push_approval":{"default":false,"description":"Whether the most recent push must be approved by someone other than the person who pushed it. Default: `false`.","type":"boolean"},"required_approving_review_count":{"description":"Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers.","type":"integer"}},"type":"object"},"required_status_checks":{"description":"Require status checks to pass before merging. Set to `null` to disable.","nullable":true,"properties":{"checks":{"description":"The list of status checks to require in order to merge into this branch.","items":{"properties":{"app_id":{"description":"The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.","type":"integer"},"context":{"description":"The name of the required check","type":"string"}},"required":["context"],"type":"object"},"type":"array"},"contexts":{"deprecated":true,"description":"**Closing down notice**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.","items":{"type":"string"},"type":"array"},"strict":{"description":"Require branches to be up to date before merging.","type":"boolean"}},"required":["strict","contexts"],"type":"object"},"restrictions":{"description":"Restrict who can push to the protected branch. User, app, and team `restrictions` are only available for organization-owned repositories. Set to `null` to disable.","nullable":true,"properties":{"apps":{"description":"The list of app `slug`s with push access","items":{"type":"string"},"type":"array"},"teams":{"description":"The list of team `slug`s with push access","items":{"type":"string"},"type":"array"},"users":{"description":"The list of user `login`s with push access","items":{"type":"string"},"type":"array"}},"required":["users","teams"],"type":"object"}},"required":["required_status_checks","enforce_admins","required_pull_request_reviews","restrictions"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/branch-protection-update"}},"schema":{"$ref":"#/components/schemas/protected-branch"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed_simple"}}


operation_id: repos/get-admin-branch-protection
path: /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins
method: GET
summary: Get admin branch protection
auth_scheme_ref: GitHubBearerToken
description:
  Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

input_schema:
[cell repeats an earlier one in this file: 158 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/protected-branch-admin-enforced-2"}},"schema":{"$ref":"#/components/schemas/protected-branch-admin-enforced"}}},"description":"Response"}}


operation_id: repos/set-admin-branch-protection
path: /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins
method: POST
summary: Set admin branch protection
auth_scheme_ref: GitHubBearerToken
description:
  Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

  Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled.

input_schema:
[cell repeats an earlier one in this file: 158 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/protected-branch-admin-enforced-2"}},"schema":{"$ref":"#/components/schemas/protected-branch-admin-enforced"}}},"description":"Response"}}


operation_id: repos/delete-admin-branch-protection
path: /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins
method: DELETE
summary: Delete admin branch protection
output_schema: {"204":{"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}
auth_scheme_ref: GitHubBearerToken
description:
  Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

  Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled.

input_schema:
[cell repeats an earlier one in this file: 158 characters]


operation_id: repos/get-pull-request-review-protection
path: /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews
method: GET
summary: Get pull request review protection
auth_scheme_ref: GitHubBearerToken
description:
[cell repeats an earlier one in this file: 388 characters]

input_schema:
[cell repeats an earlier one in this file: 158 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/protected-branch-pull-request-review"}},"schema":{"$ref":"#/components/schemas/protected-branch-pull-request-review"}}},"description":"Response"}}


operation_id: repos/update-pull-request-review-protection
path: /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews
method: PATCH
summary: Update pull request review protection
auth_scheme_ref: GitHubBearerToken
description:
  Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

  Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled.

  > [!NOTE]
  > Passing new arrays of `users` and `teams` replaces their previous values.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/branch"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"bypass_pull_request_allowances":{"apps":["octoapp"],"teams":["justice-league"],"users":["octocat"]},"dismiss_stale_reviews":true,"dismissal_restrictions":{"apps":["octoapp"],"teams":["justice-league"],"users":["octocat"]},"require_code_owner_reviews":true,"require_last_push_approval":true,"required_approving_review_count":2}}},"schema":{"properties":{"bypass_pull_request_allowances":{"description":"Allow specific users, teams, or apps to bypass pull request requirements.","properties":{"apps":{"description":"The list of app `slug`s allowed to bypass pull request requirements.","items":{"type":"string"},"type":"array"},"teams":{"description":"The list of team `slug`s allowed to bypass pull request requirements.","items":{"type":"string"},"type":"array"},"users":{"description":"The list of user `login`s allowed to bypass pull request requirements.","items":{"type":"string"},"type":"array"}},"type":"object"},"dismiss_stale_reviews":{"description":"Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit.","type":"boolean"},"dismissal_restrictions":{"description":"Specify which users, teams, and apps can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories.","properties":{"apps":{"description":"The list of app `slug`s with dismissal access","items":{"type":"string"},"type":"array"},"teams":{"description":"The list of team `slug`s with dismissal access","items":{"type":"string"},"type":"array"},"users":{"description":"The list of user `login`s with dismissal access","items":{"type":"string"},"type":"array"}},"type":"object"},"require_code_owner_reviews":{"description":"Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) have reviewed.","type":"boolean"},"require_last_push_approval":{"default":false,"description":"Whether the most recent push must be approved by someone other than the person who pushed it. Default: `false`","type":"boolean"},"required_approving_review_count":{"description":"Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers.","type":"integer"}},"type":"object"}}}}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/protected-branch-pull-request-review"}},"schema":{"$ref":"#/components/schemas/protected-branch-pull-request-review"}}},"description":"Response"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: repos/get-commit-signature-protection
path: /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures
method: GET
summary: Get commit signature protection
auth_scheme_ref: GitHubBearerToken
description:
  Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

  When authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of `true` indicates you must sign commits on this branch. For more information, see [Signing commits with GPG](https://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help.

  > [!NOTE]
  > You must enable branch protection to require signed commits.

input_schema:
[cell repeats an earlier one in this file: 158 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/protected-branch-admin-enforced"}},"schema":{"$ref":"#/components/schemas/protected-branch-admin-enforced"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: repos/create-commit-signature-protection
path: /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures
method: POST
summary: Create commit signature protection
auth_scheme_ref: GitHubBearerToken
description:
  Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

  When authenticated with admin or owner permissions to the repository, you can use this endpoint to require signed commits on a branch. You must enable branch protection to require signed commits.

input_schema:
[cell repeats an earlier one in this file: 158 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/protected-branch-admin-enforced"}},"schema":{"$ref":"#/components/schemas/protected-branch-admin-enforced"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: repos/delete-commit-signature-protection
path: /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures
method: DELETE
summary: Delete commit signature protection
output_schema: {"204":{"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}
auth_scheme_ref: GitHubBearerToken
description:
  Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

  When authenticated with admin or owner permissions to the repository, you can use this endpoint to disable required signed commits on a branch. You must enable branch protection to require signed commits.

input_schema:
[cell repeats an earlier one in this file: 158 characters]


operation_id: repos/get-status-checks-protection
path: /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks
method: GET
summary: Get status checks protection
auth_scheme_ref: GitHubBearerToken
description:
[cell repeats an earlier one in this file: 388 characters]

input_schema:
[cell repeats an earlier one in this file: 158 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/status-check-policy"}},"schema":{"$ref":"#/components/schemas/status-check-policy"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: repos/update-status-check-protection
path: /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks
method: PATCH
summary: Update status check protection
auth_scheme_ref: GitHubBearerToken
description:
  Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

  Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/branch"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"contexts":["continuous-integration/travis-ci"],"strict":true}}},"schema":{"properties":{"checks":{"description":"The list of status checks to require in order to merge into this branch.","items":{"properties":{"app_id":{"description":"The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.","type":"integer"},"context":{"description":"The name of the required check","type":"string"}},"required":["context"],"type":"object"},"type":"array"},"contexts":{"deprecated":true,"description":"**Closing down notice**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.","items":{"type":"string"},"type":"array"},"strict":{"description":"Require branches to be up to date before merging.","type":"boolean"}},"type":"object"}}}}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/status-check-policy"}},"schema":{"$ref":"#/components/schemas/status-check-policy"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: repos/get-all-status-check-contexts
path: /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts
method: GET
summary: Get all status check contexts
auth_scheme_ref: GitHubBearerToken
description:
[cell repeats an earlier one in this file: 388 characters]

input_schema:
[cell repeats an earlier one in this file: 158 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"value":["continuous-integration/travis-ci"]}},"schema":{"items":{"type":"string"},"type":"array"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: repos/set-status-check-contexts
path: /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts
method: PUT
summary: Set status check contexts
auth_scheme_ref: GitHubBearerToken
description:
[cell repeats an earlier one in this file: 388 characters]

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/branch"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Example updating status checks for a branch protection rule","value":{"contexts":["continuous-integration/travis-ci"]}}},"schema":{"oneOf":[{"example":{"contexts":["contexts"]},"properties":{"contexts":{"description":"The name of the status checks","items":{"type":"string"},"type":"array"}},"required":["contexts"],"type":"object"},{"description":"The name of the status checks","items":{"type":"string"},"type":"array"}]}}}}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"value":["continuous-integration/travis-ci"]}},"schema":{"items":{"type":"string"},"type":"array"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: repos/add-status-check-contexts
path: /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts
method: POST
summary: Add status check contexts
auth_scheme_ref: GitHubBearerToken
description:
[cell repeats an earlier one in this file: 388 characters]

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/branch"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Example adding status checks to a branch protection rule","value":{"contexts":["continuous-integration/travis-ci","continuous-integration/jenkins"]}}},"schema":{"oneOf":[{"example":{"contexts":["contexts"]},"properties":{"contexts":{"description":"The name of the status checks","items":{"type":"string"},"type":"array"}},"required":["contexts"],"type":"object"},{"description":"The name of the status checks","items":{"type":"string"},"type":"array"}]}}}}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"value":["continuous-integration/travis-ci","continuous-integration/jenkins"]}},"schema":{"items":{"type":"string"},"type":"array"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: repos/remove-status-check-contexts
path: /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts
method: DELETE
summary: Remove status check contexts
auth_scheme_ref: GitHubBearerToken
description:
[cell repeats an earlier one in this file: 388 characters]

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/branch"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Example removing status checks from a branch protection rule","value":{"contexts":["continuous-integration/jenkins"]}}},"schema":{"oneOf":[{"example":{"contexts":["contexts"]},"properties":{"contexts":{"description":"The name of the status checks","items":{"type":"string"},"type":"array"}},"required":["contexts"],"type":"object"},{"description":"The name of the status checks","items":{"type":"string"},"type":"array"}]}}}}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"value":["continuous-integration/travis-ci"]}},"schema":{"items":{"type":"string"},"type":"array"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: repos/get-access-restrictions
path: /repos/{owner}/{repo}/branches/{branch}/protection/restrictions
method: GET
summary: Get access restrictions
auth_scheme_ref: GitHubBearerToken
description:
  Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

  Lists who has access to this protected branch.

  > [!NOTE]
  > Users, apps, and teams `restrictions` are only available for organization-owned repositories.

input_schema:
[cell repeats an earlier one in this file: 158 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/branch-restriction-policy"}},"schema":{"$ref":"#/components/schemas/branch-restriction-policy"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: repos/delete-access-restrictions
path: /repos/{owner}/{repo}/branches/{branch}/protection/restrictions
method: DELETE
summary: Delete access restrictions
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

  Disables the ability to restrict who can push to this branch.

input_schema:
[cell repeats an earlier one in this file: 158 characters]


operation_id: repos/get-apps-with-access-to-protected-branch
path: /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps
method: GET
summary: Get apps with access to the protected branch
auth_scheme_ref: GitHubBearerToken
description:
  Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

  Lists the GitHub Apps that have push access to this branch. Only GitHub Apps that are installed on the repository and that have been granted write access to the repository contents can be added as authorized actors on a protected branch.

input_schema:
[cell repeats an earlier one in this file: 158 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/integration-items"}},"schema":{"items":{"$ref":"#/components/schemas/integration"},"type":"array"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: repos/set-app-access-restrictions
path: /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps
method: PUT
summary: Set app access restrictions
auth_scheme_ref: GitHubBearerToken
description:
  Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

  Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only GitHub Apps that are installed on the repository and that have been granted write access to the repository contents can be added as authorized actors on a protected branch.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/branch"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"apps":["octoapp"]}}},"schema":{"example":{"apps":["my-app"]},"properties":{"apps":{"description":"The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items.","items":{"type":"string"},"type":"array"}},"required":["apps"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/integration-items"}},"schema":{"items":{"$ref":"#/components/schemas/integration"},"type":"array"}}},"description":"Response"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: repos/add-app-access-restrictions
path: /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps
method: POST
summary: Add app access restrictions
auth_scheme_ref: GitHubBearerToken
description:
  Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

  Grants the specified apps push access for this branch. Only GitHub Apps that are installed on the repository and that have been granted write access to the repository contents can be added as authorized actors on a protected branch.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/branch"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"apps":["octoapp"]}}},"schema":{"example":{"apps":["my-app"]},"properties":{"apps":{"description":"The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items.","items":{"type":"string"},"type":"array"}},"required":["apps"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/integration-items"}},"schema":{"items":{"$ref":"#/components/schemas/integration"},"type":"array"}}},"description":"Response"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: repos/remove-app-access-restrictions
path: /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps
method: DELETE
summary: Remove app access restrictions
auth_scheme_ref: GitHubBearerToken
description:
  Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

  Removes the ability of an app to push to this branch. Only GitHub Apps that are installed on the repository and that have been granted write access to the repository contents can be added as authorized actors on a protected branch.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/branch"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"apps":["my-app"]}}},"schema":{"example":{"apps":["my-app"]},"properties":{"apps":{"description":"The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items.","items":{"type":"string"},"type":"array"}},"required":["apps"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/integration-items"}},"schema":{"items":{"$ref":"#/components/schemas/integration"},"type":"array"}}},"description":"Response"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: repos/get-teams-with-access-to-protected-branch
path: /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams
method: GET
summary: Get teams with access to the protected branch
auth_scheme_ref: GitHubBearerToken
description:
  Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

  Lists the teams who have push access to this branch. The list includes child teams.

input_schema:
[cell repeats an earlier one in this file: 158 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/team-items"}},"schema":{"items":{"$ref":"#/components/schemas/team"},"type":"array"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: repos/set-team-access-restrictions
path: /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams
method: PUT
summary: Set team access restrictions
auth_scheme_ref: GitHubBearerToken
description:
  Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

  Replaces the list of teams that have push access to this branch. This removes all teams that previously had push access and grants push access to the new list of teams. Team restrictions include child teams.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/branch"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Example replacing a team in a branch protection rule","value":{"teams":["justice-league"]}}},"schema":{"oneOf":[{"example":{"teams":["justice-league"]},"properties":{"teams":{"description":"The slug values for teams","items":{"type":"string"},"type":"array"}},"required":["teams"],"type":"object"},{"description":"The slug values for teams","items":{"type":"string"},"type":"array"}]}}}}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/team-items"}},"schema":{"items":{"$ref":"#/components/schemas/team"},"type":"array"}}},"description":"Response"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: repos/add-team-access-restrictions
path: /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams
method: POST
summary: Add team access restrictions
auth_scheme_ref: GitHubBearerToken
description:
  Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

  Grants the specified teams push access for this branch. You can also give push access to child teams.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/branch"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Example adding a team in a branch protection rule","value":{"teams":["justice-league"]}}},"schema":{"oneOf":[{"example":{"teams":["my-team"]},"properties":{"teams":{"description":"The slug values for teams","items":{"type":"string"},"type":"array"}},"required":["teams"],"type":"object"},{"description":"The slug values for teams","items":{"type":"string"},"type":"array"}]}}}}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/team-items"}},"schema":{"items":{"$ref":"#/components/schemas/team"},"type":"array"}}},"description":"Response"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: repos/remove-team-access-restrictions
path: /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams
method: DELETE
summary: Remove team access restrictions
auth_scheme_ref: GitHubBearerToken
description:
  Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

  Removes the ability of a team to push to this branch. You can also remove push access for child teams.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/branch"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Example removing a team in a branch protection rule","value":{"teams":["octocats"]}}},"schema":{"oneOf":[{"example":{"teams":["my-team"]},"properties":{"teams":{"description":"The slug values for teams","items":{"type":"string"},"type":"array"}},"required":["teams"],"type":"object"},{"description":"The slug values for teams","items":{"type":"string"},"type":"array"}]}}}}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/team-items"}},"schema":{"items":{"$ref":"#/components/schemas/team"},"type":"array"}}},"description":"Response"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: repos/get-users-with-access-to-protected-branch
path: /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users
method: GET
summary: Get users with access to the protected branch
auth_scheme_ref: GitHubBearerToken
description:
  Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

  Lists the people who have push access to this branch.

input_schema:
[cell repeats an earlier one in this file: 158 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/simple-user-items"}},"schema":{"items":{"$ref":"#/components/schemas/simple-user"},"type":"array"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: repos/set-user-access-restrictions
path: /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users
method: PUT
summary: Set user access restrictions
auth_scheme_ref: GitHubBearerToken
description:
  Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

  Replaces the list of people that have push access to this branch. This removes all people that previously had push access and grants push access to the new list of people.

  | Type    | Description                                                                                                                   |
  | ------- | ----------------------------------------------------------------------------------------------------------------------------- |
  | `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. |

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/branch"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Example replacing a user in a branch protection rule","value":{"users":["octocat"]}}},"schema":{"example":{"users":["mona"]},"properties":{"users":{"description":"The username for users","items":{"type":"string"},"type":"array"}},"required":["users"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/simple-user-items"}},"schema":{"items":{"$ref":"#/components/schemas/simple-user"},"type":"array"}}},"description":"Response"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: repos/add-user-access-restrictions
path: /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users
method: POST
summary: Add user access restrictions
auth_scheme_ref: GitHubBearerToken
description:
  Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

  Grants the specified people push access for this branch.

  | Type    | Description                                                                                                                   |
  | ------- | ----------------------------------------------------------------------------------------------------------------------------- |
  | `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. |

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/branch"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Example adding a user in a branch protection rule","value":{"users":["octocat"]}}},"schema":{"example":{"users":["mona"]},"properties":{"users":{"description":"The username for users","items":{"type":"string"},"type":"array"}},"required":["users"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/simple-user-items"}},"schema":{"items":{"$ref":"#/components/schemas/simple-user"},"type":"array"}}},"description":"Response"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: repos/remove-user-access-restrictions
path: /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users
method: DELETE
summary: Remove user access restrictions
auth_scheme_ref: GitHubBearerToken
description:
  Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

  Removes the ability of a user to push to this branch.

  | Type    | Description                                                                                                                                   |
  | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
  | `array` | Usernames of the people who should no longer have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. |

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/branch"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Example removing a user in a branch protection rule","value":{"users":["octocat"]}}},"schema":{"example":{"users":["mona"]},"properties":{"users":{"description":"The username for users","items":{"type":"string"},"type":"array"}},"required":["users"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/simple-user-items"}},"schema":{"items":{"$ref":"#/components/schemas/simple-user"},"type":"array"}}},"description":"Response"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: repos/rename-branch
path: /repos/{owner}/{repo}/branches/{branch}/rename
method: POST
summary: Rename a branch
auth_scheme_ref: GitHubBearerToken
description:
  Renames a branch in a repository.

  > [!NOTE]
  > Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)".

  The authenticated user must have push access to the branch. If the branch is the default branch, the authenticated user must also have admin or owner permissions.

  In order to rename the default branch, fine-grained access tokens also need the `administration:write` repository permission.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/branch"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"new_name":"my_renamed_branch"}}},"schema":{"properties":{"new_name":{"description":"The new name of the branch.","type":"string"}},"required":["new_name"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/branch-with-protection"}},"schema":{"$ref":"#/components/schemas/branch-with-protection"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: checks/create
path: /repos/{owner}/{repo}/check-runs
method: POST
summary: Create a check run
auth_scheme_ref: GitHubBearerToken
description:
  Creates a new check run for a specific commit in a repository.

  To create a check run, you must use a GitHub App. OAuth apps and authenticated users are not able to create a check suite.

  In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs.

  > [!NOTE]
  > The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"example-of-completed-conclusion":{"summary":"Example of a completed conclusion","value":{"actions":[{"description":"Allow us to fix these errors for you","identifier":"fix_errors","label":"Fix"}],"completed_at":"2017-11-30T19:49:10Z","conclusion":"success","head_sha":"ce587453ced02b1526dfb4cb910479d431683101","name":"mighty_readme","output":{"annotations":[{"annotation_level":"warning","end_line":2,"message":"Check your spelling for 'banaas'.","path":"README.md","raw_details":"Do you mean 'bananas' or 'banana'?","start_line":2,"title":"Spell Checker"},{"annotation_level":"warning","end_line":4,"message":"Check your spelling for 'aples'","path":"README.md","raw_details":"Do you mean 'apples' or 'Naples'","start_line":4,"title":"Spell Checker"}],"images":[{"alt":"Super bananas","image_url":"http://example.com/images/42"}],"summary":"There are 0 failures, 2 warnings, and 1 notices.","text":"You may have some misspelled words on lines 2 and 4. You also may want to add a section in your README about how to install your app.","title":"Mighty Readme report"},"started_at":"2017-11-30T19:39:10Z","status":"completed"}},"example-of-in-progress-conclusion":{"summary":"Example of an in_progress conclusion","value":{"external_id":"42","head_sha":"ce587453ced02b1526dfb4cb910479d431683101","name":"mighty_readme","output":{"summary":"","text":"","title":"Mighty Readme report"},"started_at":"2018-05-04T01:14:52Z","status":"in_progress"}}},"schema":{"discriminator":{"propertyName":"status"},"oneOf":[{"additionalProperties":true,"properties":{"status":{"enum":["completed"]}},"required":["status","conclusion"]},{"additionalProperties":true,"properties":{"status":{"enum":["queued","in_progress"]}}}],"properties":{"actions":{"description":"Displays a button on GitHub that can be clicked to alert your app to do additional tasks. For example, a code linting app can display a button that automatically fixes detected errors. The button created in this object is displayed after the check run completes. When a user clicks the button, GitHub sends the [`check_run.requested_action` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) to your app. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. To learn more about check runs and requested actions, see \"[Check runs and requested actions](https://docs.github.com/rest/guides/using-the-rest-api-to-interact-with-checks#check-runs-and-requested-actions).\"","items":{"properties":{"description":{"description":"A short explanation of what this action would do. The maximum size is 40 characters.","maxLength":40,"type":"string"},"identifier":{"description":"A reference for the action on the integrator's system. The maximum size is 20 characters.","maxLength":20,"type":"string"},"label":{"description":"The text to be displayed on a button in the web UI. The maximum size is 20 characters.","maxLength":20,"type":"string"}},"required":["label","description","identifier"],"type":"object"},"maxItems":3,"type":"array"},"completed_at":{"description":"The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.","format":"date-time","type":"string"},"conclusion":{"description":"**Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. \n**Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this.","enum":["action_required","cancelled","failure","neutral","success","skipped","stale","timed_out"],"type":"string"},"details_url":{"description":"The URL of the integrator's site that has the full details of the check. If the integrator does not provide this, then the homepage of the GitHub app is used.","type":"string"},"external_id":{"description":"A reference for the run on the integrator's system.","type":"string"},"head_sha":{"description":"The SHA of the commit.","type":"string"},"name":{"description":"The name of the check. For example, \"code-coverage\".","type":"string"},"output":{"description":"Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run.","properties":{"annotations":{"description":"Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the **Checks** and **Files changed** tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/checks/runs#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. GitHub Actions are limited to 10 warning annotations and 10 error annotations per step. For details about how you can view annotations on GitHub, see \"[About status checks](https://docs.github.com/articles/about-status-checks#checks)\".","items":{"properties":{"annotation_level":{"description":"The level of the annotation.","enum":["notice","warning","failure"],"type":"string"},"end_column":{"description":"The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values.","type":"integer"},"end_line":{"description":"The end line of the annotation.","type":"integer"},"message":{"description":"A short description of the feedback for these lines of code. The maximum size is 64 KB.","type":"string"},"path":{"description":"The path of the file to add an annotation to. For example, `assets/css/main.css`.","type":"string"},"raw_details":{"description":"Details about this annotation. The maximum size is 64 KB.","type":"string"},"start_column":{"description":"The start column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. Column numbers start at 1.","type":"integer"},"start_line":{"description":"The start line of the annotation. Line numbers start at 1.","type":"integer"},"title":{"description":"The title that represents the annotation. The maximum size is 255 characters.","type":"string"}},"required":["path","start_line","end_line","annotation_level","message"],"type":"object"},"maxItems":50,"type":"array"},"images":{"description":"Adds images to the output displayed in the GitHub pull request UI.","items":{"properties":{"alt":{"description":"The alternative text for the image.","type":"string"},"caption":{"description":"A short image description.","type":"string"},"image_url":{"description":"The full URL of the image.","type":"string"}},"required":["alt","image_url"],"type":"object"},"type":"array"},"summary":{"description":"The summary of the check run. This parameter supports Markdown. **Maximum length**: 65535 characters.","maxLength":65535,"type":"string"},"text":{"description":"The details of the check run. This parameter supports Markdown. **Maximum length**: 65535 characters.","maxLength":65535,"type":"string"},"title":{"description":"The title of the check run.","type":"string"}},"required":["title","summary"],"type":"object"},"started_at":{"description":"The time that the check run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.","format":"date-time","type":"string"},"status":{"default":"queued","description":"The current status of the check run. Only GitHub Actions can set a status of `waiting`, `pending`, or `requested`.","enum":["queued","in_progress","completed","waiting","requested","pending"],"type":"string"}},"required":["name","head_sha"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"example-of-completed-conclusion":{"$ref":"#/components/examples/check-run-example-of-completed-conclusion"},"example-of-in-progress-conclusion":{"$ref":"#/components/examples/check-run-example-of-in-progress-conclusion"}},"schema":{"$ref":"#/components/schemas/check-run"}}},"description":"Response"}}


operation_id: checks/get
path: /repos/{owner}/{repo}/check-runs/{check_run_id}
method: GET
summary: Get a check run
auth_scheme_ref: GitHubBearerToken
description:
  Gets a single check run using its `id`.

  > [!NOTE]
  > The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/check-run-id"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/check-run"}},"schema":{"$ref":"#/components/schemas/check-run"}}},"description":"Response"}}


operation_id: checks/update
path: /repos/{owner}/{repo}/check-runs/{check_run_id}
method: PATCH
summary: Update a check run
auth_scheme_ref: GitHubBearerToken
description:
  Updates a check run for a specific commit in a repository.

  > [!NOTE]
  > The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.

  OAuth apps and personal access tokens (classic) cannot use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/check-run-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"completed_at":"2018-05-04T01:14:52Z","conclusion":"success","name":"mighty_readme","output":{"annotations":[{"annotation_level":"warning","end_line":2,"message":"Check your spelling for 'banaas'.","path":"README.md","raw_details":"Do you mean 'bananas' or 'banana'?","start_line":2,"title":"Spell Checker"},{"annotation_level":"warning","end_line":4,"message":"Check your spelling for 'aples'","path":"README.md","raw_details":"Do you mean 'apples' or 'Naples'","start_line":4,"title":"Spell Checker"}],"images":[{"alt":"Super bananas","image_url":"http://example.com/images/42"}],"summary":"There are 0 failures, 2 warnings, and 1 notices.","text":"You may have some misspelled words on lines 2 and 4. You also may want to add a section in your README about how to install your app.","title":"Mighty Readme report"},"started_at":"2018-05-04T01:14:52Z","status":"completed"}}},"schema":{"anyOf":[{"additionalProperties":true,"properties":{"status":{"enum":["completed"]}},"required":["conclusion"]},{"additionalProperties":true,"properties":{"status":{"enum":["queued","in_progress"]}}}],"properties":{"actions":{"description":"Possible further actions the integrator can perform, which a user may trigger. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. To learn more about check runs and requested actions, see \"[Check runs and requested actions](https://docs.github.com/rest/guides/using-the-rest-api-to-interact-with-checks#check-runs-and-requested-actions).\"","items":{"properties":{"description":{"description":"A short explanation of what this action would do. The maximum size is 40 characters.","maxLength":40,"type":"string"},"identifier":{"description":"A reference for the action on the integrator's system. The maximum size is 20 characters.","maxLength":20,"type":"string"},"label":{"description":"The text to be displayed on a button in the web UI. The maximum size is 20 characters.","maxLength":20,"type":"string"}},"required":["label","description","identifier"],"type":"object"},"maxItems":3,"type":"array"},"completed_at":{"description":"The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.","format":"date-time","type":"string"},"conclusion":{"description":"**Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. \n**Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this.","enum":["action_required","cancelled","failure","neutral","success","skipped","stale","timed_out"],"type":"string"},"details_url":{"description":"The URL of the integrator's site that has the full details of the check.","type":"string"},"external_id":{"description":"A reference for the run on the integrator's system.","type":"string"},"name":{"description":"The name of the check. For example, \"code-coverage\".","type":"string"},"output":{"description":"Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run.","properties":{"annotations":{"description":"Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/checks/runs#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. GitHub Actions are limited to 10 warning annotations and 10 error annotations per step. For details about annotations in the UI, see \"[About status checks](https://docs.github.com/articles/about-status-checks#checks)\".","items":{"properties":{"annotation_level":{"description":"The level of the annotation.","enum":["notice","warning","failure"],"type":"string"},"end_column":{"description":"The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values.","type":"integer"},"end_line":{"description":"The end line of the annotation.","type":"integer"},"message":{"description":"A short description of the feedback for these lines of code. The maximum size is 64 KB.","type":"string"},"path":{"description":"The path of the file to add an annotation to. For example, `assets/css/main.css`.","type":"string"},"raw_details":{"description":"Details about this annotation. The maximum size is 64 KB.","type":"string"},"start_column":{"description":"The start column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. Column numbers start at 1.","type":"integer"},"start_line":{"description":"The start line of the annotation. Line numbers start at 1.","type":"integer"},"title":{"description":"The title that represents the annotation. The maximum size is 255 characters.","type":"string"}},"required":["path","start_line","end_line","annotation_level","message"],"type":"object"},"maxItems":50,"type":"array"},"images":{"description":"Adds images to the output displayed in the GitHub pull request UI.","items":{"properties":{"alt":{"description":"The alternative text for the image.","type":"string"},"caption":{"description":"A short image description.","type":"string"},"image_url":{"description":"The full URL of the image.","type":"string"}},"required":["alt","image_url"],"type":"object"},"type":"array"},"summary":{"description":"Can contain Markdown.","maxLength":65535,"type":"string"},"text":{"description":"Can contain Markdown.","maxLength":65535,"type":"string"},"title":{"description":"**Required**.","type":"string"}},"required":["summary"],"type":"object"},"started_at":{"description":"This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.","format":"date-time","type":"string"},"status":{"description":"The current status of the check run. Only GitHub Actions can set a status of `waiting`, `pending`, or `requested`.","enum":["queued","in_progress","completed","waiting","requested","pending"],"type":"string"}},"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/check-run"}},"schema":{"$ref":"#/components/schemas/check-run"}}},"description":"Response"}}


operation_id: checks/list-annotations
path: /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations
method: GET
summary: List check run annotations
auth_scheme_ref: GitHubBearerToken
description:
  Lists annotations for a check run using the annotation `id`.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/check-run-id"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/check-annotation-items"}},"schema":{"items":{"$ref":"#/components/schemas/check-annotation"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}}}


operation_id: checks/rerequest-run
path: /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest
method: POST
summary: Rerequest a check run
auth_scheme_ref: GitHubBearerToken
description:
  Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, the `status` of the check suite it belongs to is reset to `queued` and the `conclusion` is cleared. The check run itself is not updated. GitHub apps recieving the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) with the `rerequested` action should then decide if the check run should be reset or updated and call the [update `check_run` endpoint](https://docs.github.com/rest/checks/runs#update-a-check-run) to update the check_run if desired.

  For more information about how to re-run GitHub Actions jobs, see "[Re-run a job from a workflow run](https://docs.github.com/rest/actions/workflow-runs#re-run-a-job-from-a-workflow-run)".

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/check-run-id"}],"requestBody":null}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{}},"schema":{"$ref":"#/components/schemas/empty-object"}}},"description":"Response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/basic-error"}}},"description":"Forbidden if the check run is not rerequestable or doesn't belong to the authenticated GitHub App"},"404":{"$ref":"#/components/responses/not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/basic-error"}}},"description":"Validation error if the check run is not rerequestable"}}


operation_id: checks/create-suite
path: /repos/{owner}/{repo}/check-suites
method: POST
summary: Create a check suite
auth_scheme_ref: GitHubBearerToken
description:
  Creates a check suite manually. By default, check suites are automatically created when you create a [check run](https://docs.github.com/rest/checks/runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/checks/suites#update-repository-preferences-for-check-suites)".

  > [!NOTE]
  > The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`.

  OAuth apps and personal access tokens (classic) cannot use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"head_sha":"d6fde92930d4715a2b49857d24b940956b26d2d3"}}},"schema":{"properties":{"head_sha":{"description":"The sha of the head commit.","type":"string"}},"required":["head_sha"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/check-suite"}},"schema":{"$ref":"#/components/schemas/check-suite"}}},"description":"Response when the suite already exists"},"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/check-suite"}},"schema":{"$ref":"#/components/schemas/check-suite"}}},"description":"Response when the suite was created"}}


operation_id: checks/set-suites-preferences
path: /repos/{owner}/{repo}/check-suites/preferences
method: PATCH
summary: Update repository preferences for check suites
auth_scheme_ref: GitHubBearerToken
description:
  Changes the default automatic flow when creating check suites. By default, a check suite is automatically created each time code is pushed to a repository. When you disable the automatic creation of check suites, you can manually [Create a check suite](https://docs.github.com/rest/checks/suites#create-a-check-suite).
  You must have admin permissions in the repository to set preferences for check suites.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"auto_trigger_checks":[{"app_id":4,"setting":false}]}}},"schema":{"properties":{"auto_trigger_checks":{"description":"Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default.","items":{"properties":{"app_id":{"description":"The `id` of the GitHub App.","type":"integer"},"setting":{"default":true,"description":"Set to `true` to enable automatic creation of CheckSuite events upon pushes to the repository, or `false` to disable them.","type":"boolean"}},"required":["app_id","setting"],"type":"object"},"type":"array"}},"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/check-suite-preference"}},"schema":{"$ref":"#/components/schemas/check-suite-preference"}}},"description":"Response"}}


operation_id: checks/get-suite
path: /repos/{owner}/{repo}/check-suites/{check_suite_id}
method: GET
summary: Get a check suite
auth_scheme_ref: GitHubBearerToken
description:
  Gets a single check suite using its `id`.

  > [!NOTE]
  > The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/check-suite-id"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/check-suite"}},"schema":{"$ref":"#/components/schemas/check-suite"}}},"description":"Response"}}


operation_id: checks/list-for-suite
path: /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs
method: GET
summary: List check runs in a check suite
auth_scheme_ref: GitHubBearerToken
description:
  Lists check runs for a check suite using its `id`.

  > [!NOTE]
  > The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/check-suite-id"},{"$ref":"#/components/parameters/check-name"},{"$ref":"#/components/parameters/status"},{"description":"Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs.","in":"query","name":"filter","schema":{"default":"latest","enum":["latest","all"],"type":"string"},"style":"form"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/check-run-paginated"}},"schema":{"properties":{"check_runs":{"items":{"$ref":"#/components/schemas/check-run"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","check_runs"],"type":"object"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}}}


operation_id: checks/rerequest-suite
path: /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest
method: POST
summary: Rerequest a check suite
auth_scheme_ref: GitHubBearerToken
description:
  Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) event with the action `rerequested`. When a check suite is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/check-suite-id"}],"requestBody":null}

output_schema:
[cell repeats an earlier one in this file: 147 characters]


operation_id: code-quality/list-findings-for-repo
path: /repos/{owner}/{repo}/code-quality/findings
method: GET
summary: List code quality findings for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Lists code quality findings for a repository.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/direction"},{"$ref":"#/components/parameters/pagination-before"},{"$ref":"#/components/parameters/pagination-after"},{"description":"If specified, only code quality findings with this state will be returned.","in":"query","name":"state","schema":{"enum":["open","dismissed"],"type":"string"},"style":"form"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/code-quality-finding-items"}},"schema":{"items":{"$ref":"#/components/schemas/code-quality-finding"},"type":"array"}}},"description":"Response"},"403":{"$ref":"#/components/responses/code_quality_forbidden_read"},"404":{"$ref":"#/components/responses/not_found"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: code-quality/get-finding
path: /repos/{owner}/{repo}/code-quality/findings/{finding_number}
method: GET
summary: Get a code quality finding
auth_scheme_ref: GitHubBearerToken
description:
  Gets a single code quality finding.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/code-quality-finding-number"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/code-quality-finding"}},"schema":{"$ref":"#/components/schemas/code-quality-finding"}}},"description":"Response"},"403":{"$ref":"#/components/responses/code_quality_forbidden_read"},"404":{"$ref":"#/components/responses/not_found"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: code-quality/get-setup
path: /repos/{owner}/{repo}/code-quality/setup
method: GET
summary: Get a code quality setup configuration
auth_scheme_ref: GitHubBearerToken
description:
  Gets a code quality setup configuration.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.

input_schema:
[cell repeats an earlier one in this file: 116 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/code-quality-setup"}},"schema":{"$ref":"#/components/schemas/code-quality-setup"}}},"description":"Response"},"403":{"$ref":"#/components/responses/code_quality_forbidden_read"},"404":{"$ref":"#/components/responses/not_found"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: code-quality/update-setup
path: /repos/{owner}/{repo}/code-quality/setup
method: PATCH
summary: Update a code quality setup configuration
auth_scheme_ref: GitHubBearerToken
description:
  Updates a code quality setup configuration.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/code-quality-setup-update"}},"schema":{"$ref":"#/components/schemas/code-quality-setup-update"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{}},"schema":{"$ref":"#/components/schemas/empty-object"}}},"description":"Response"},"202":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/code-quality-setup-update-response"}},"schema":{"$ref":"#/components/schemas/code-quality-setup-update-response"}}},"description":"Response"},"403":{"$ref":"#/components/responses/code_quality_forbidden_write"},"404":{"$ref":"#/components/responses/not_found"},"409":{"$ref":"#/components/responses/code_quality_conflict"},"422":{"$ref":"#/components/responses/code_quality_invalid_state"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: code-scanning/list-alerts-for-repo
path: /repos/{owner}/{repo}/code-scanning/alerts
method: GET
summary: List code scanning alerts for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Lists code scanning alerts.

  The response includes a `most_recent_instance` object.
  This provides details of the most recent instance of this alert
  for the default branch (or for the specified Git reference if you used `ref` in the request).

  OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/tool-name"},{"$ref":"#/components/parameters/tool-guid"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/git-ref"},{"$ref":"#/components/parameters/pr-alias"},{"$ref":"#/components/parameters/direction"},{"$ref":"#/components/parameters/pagination-before"},{"$ref":"#/components/parameters/pagination-after"},{"description":"The property by which to sort the results.","in":"query","name":"sort","schema":{"default":"created","enum":["created","updated"],"type":"string"},"style":"form"},{"description":"If specified, only code scanning alerts with this state will be returned.","in":"query","name":"state","schema":{"$ref":"#/components/schemas/code-scanning-alert-state-query"},"style":"form"},{"description":"If specified, only code scanning alerts with this severity will be returned.","in":"query","name":"severity","schema":{"$ref":"#/components/schemas/code-scanning-alert-severity"},"style":"form"},{"description":"Filter alerts by assignees. Provide a comma-separated list of user handles (e.g., `octocat` or `octocat,hubot`).\nUse `*` to list alerts with at least one assignee or `none` to list alerts with no assignees.\n","in":"query","name":"assignees","schema":{"type":"string"},"style":"form"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/code-scanning-alert-items"}},"schema":{"items":{"$ref":"#/components/schemas/code-scanning-alert-items"},"type":"array"}}},"description":"Response"},"304":{"$ref":"#/components/responses/not_modified"},"403":{"$ref":"#/components/responses/code_scanning_forbidden_read"},"404":{"$ref":"#/components/responses/not_found"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: code-scanning/get-alert
path: /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}
method: GET
summary: Get a code scanning alert
auth_scheme_ref: GitHubBearerToken
description:
  Gets a single code scanning alert.

  OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/alert-number"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/code-scanning-alert"}},"schema":{"$ref":"#/components/schemas/code-scanning-alert"}}},"description":"Response"},"304":{"$ref":"#/components/responses/not_modified"},"403":{"$ref":"#/components/responses/code_scanning_forbidden_read"},"404":{"$ref":"#/components/responses/not_found"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: code-scanning/update-alert
path: /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}
method: PATCH
summary: Update a code scanning alert
auth_scheme_ref: GitHubBearerToken
description:
  Updates the status of a single code scanning alert.
  OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/alert-number"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"create_request":true,"dismissed_comment":"This alert is not actually correct, because there's a sanitizer included in the library.","dismissed_reason":"false positive","state":"dismissed"}}},"schema":{"anyOf":[{"required":["state"]},{"required":["assignees"]}],"properties":{"assignees":{"$ref":"#/components/schemas/code-scanning-alert-assignees"},"create_request":{"$ref":"#/components/schemas/code-scanning-alert-create-request"},"dismissed_comment":{"$ref":"#/components/schemas/code-scanning-alert-dismissed-comment"},"dismissed_reason":{"$ref":"#/components/schemas/code-scanning-alert-dismissed-reason"},"state":{"$ref":"#/components/schemas/code-scanning-alert-set-state"}},"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/code-scanning-alert-dismissed"}},"schema":{"$ref":"#/components/schemas/code-scanning-alert"}}},"description":"Response"},"400":{"$ref":"#/components/responses/bad_request"},"403":{"$ref":"#/components/responses/code_scanning_forbidden_write"},"404":{"$ref":"#/components/responses/not_found"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: code-scanning/get-autofix
path: /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix
method: GET
summary: Get the status of an autofix for a code scanning alert
auth_scheme_ref: GitHubBearerToken
description:
  Gets the status and description of an autofix for a code scanning alert on the repository's default branch.

  OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/alert-number"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/code-scanning-autofix"}},"schema":{"$ref":"#/components/schemas/code-scanning-autofix"}}},"description":"Response"},"400":{"$ref":"#/components/responses/code_scanning_bad_request"},"403":{"$ref":"#/components/responses/code_scanning_forbidden_read"},"404":{"$ref":"#/components/responses/not_found"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: code-scanning/create-autofix
path: /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix
method: POST
summary: Create an autofix for a code scanning alert
auth_scheme_ref: GitHubBearerToken
description:
  Creates an autofix for a code scanning alert from the repository's default branch.

  If a new autofix is to be created as a result of this request or is currently being generated, then this endpoint will return a 202 Accepted response.

  If an autofix already exists for a given alert, then this endpoint will return a 200 OK response.

  OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/alert-number"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/code-scanning-autofix"}},"schema":{"$ref":"#/components/schemas/code-scanning-autofix"}}},"description":"OK"},"202":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/code-scanning-autofix-pending"}},"schema":{"$ref":"#/components/schemas/code-scanning-autofix"}}},"description":"Accepted"},"400":{"$ref":"#/components/responses/code_scanning_bad_request"},"403":{"$ref":"#/components/responses/code_scanning_autofix_create_forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"description":"Unprocessable Entity"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: code-scanning/commit-autofix
path: /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix/commits
method: POST
summary: Commit an autofix for a code scanning alert
auth_scheme_ref: GitHubBearerToken
description:
  Commits an autofix for a code scanning alert from the repository's default branch.

  If an autofix is committed as a result of this request, then this endpoint will return a 201 Created response.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/alert-number"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/code-scanning-autofix-commits"}},"schema":{"$ref":"#/components/schemas/code-scanning-autofix-commits"}}}}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/code-scanning-autofix-commits-response"}},"schema":{"$ref":"#/components/schemas/code-scanning-autofix-commits-response"}}},"description":"Created"},"400":{"$ref":"#/components/responses/code_scanning_bad_request"},"403":{"$ref":"#/components/responses/code_scanning_forbidden_write"},"404":{"$ref":"#/components/responses/not_found"},"422":{"description":"Unprocessable Entity"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: code-scanning/list-alert-instances
path: /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances
method: GET
summary: List instances of a code scanning alert
auth_scheme_ref: GitHubBearerToken
description:
  Lists all instances of the specified code scanning alert.

  OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/alert-number"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/git-ref"},{"$ref":"#/components/parameters/pr-alias"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/code-scanning-alert-instances"}},"schema":{"items":{"$ref":"#/components/schemas/code-scanning-alert-instance-list"},"type":"array"}}},"description":"Response"},"403":{"$ref":"#/components/responses/code_scanning_forbidden_read"},"404":{"$ref":"#/components/responses/not_found"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: code-scanning/list-recent-analyses
path: /repos/{owner}/{repo}/code-scanning/analyses
method: GET
summary: List code scanning analyses for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Lists the details of all code scanning analyses for a repository,
  starting with the most recent.
  The response is paginated and you can use the `page` and `per_page` parameters
  to list the analyses you're interested in.
  By default 30 analyses are listed per page.

  The `rules_count` field in the response give the number of rules
  that were run in the analysis.
  For very old analyses this data is not available,
  and `0` is returned in this field.

  > [!WARNING]
  > **Closing down notice:** The `tool_name` field is closing down and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field.

  OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/tool-name"},{"$ref":"#/components/parameters/tool-guid"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/pr-alias"},{"description":"The Git reference for the analyses you want to list. The `ref` for a branch can be formatted either as `refs/heads/<branch name>` or simply `<branch name>`. To reference a pull request use `refs/pull/<number>/merge`.","in":"query","name":"ref","schema":{"$ref":"#/components/schemas/code-scanning-ref"},"style":"form"},{"description":"Filter analyses belonging to the same SARIF upload.","in":"query","name":"sarif_id","schema":{"$ref":"#/components/schemas/code-scanning-analysis-sarif-id"},"style":"form"},{"$ref":"#/components/parameters/direction"},{"description":"The property by which to sort the results.","in":"query","name":"sort","schema":{"default":"created","enum":["created"],"type":"string"},"style":"form"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/code-scanning-analysis-items"}},"schema":{"items":{"$ref":"#/components/schemas/code-scanning-analysis"},"type":"array"}}},"description":"Response"},"403":{"$ref":"#/components/responses/code_scanning_forbidden_read"},"404":{"$ref":"#/components/responses/not_found"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: code-scanning/get-analysis
path: /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}
method: GET
summary: Get a code scanning analysis for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Gets a specified code scanning analysis for a repository.

  The default JSON response contains fields that describe the analysis.
  This includes the Git reference and commit SHA to which the analysis relates,
  the datetime of the analysis, the name of the code scanning tool,
  and the number of alerts.

  The `rules_count` field in the default response give the number of rules
  that were run in the analysis.
  For very old analyses this data is not available,
  and `0` is returned in this field.

  This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."

  - **`application/sarif+json`**: Instead of returning a summary of the analysis, this endpoint returns a subset of the analysis data that was uploaded. The data is formatted as [SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html). It also returns additional data such as the `github/alertNumber` and `github/alertUrl` properties.

  OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"description":"The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation.","in":"path","name":"analysis_id","required":true,"schema":{"type":"integer"},"style":"simple"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"response":{"$ref":"#/components/examples/code-scanning-analysis-default"}},"schema":{"$ref":"#/components/schemas/code-scanning-analysis"}},"application/sarif+json":{"examples":{"response":{"$ref":"#/components/examples/code-scanning-analysis-sarif"}},"schema":{"additionalProperties":true,"type":"object"}}},"description":"Response"},"403":{"$ref":"#/components/responses/code_scanning_forbidden_read"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/unprocessable_analysis"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: code-scanning/delete-analysis
path: /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}
method: DELETE
summary: Delete a code scanning analysis from a repository
auth_scheme_ref: GitHubBearerToken
description:
  Deletes a specified code scanning analysis from a repository.

  You can delete one analysis at a time.
  To delete a series of analyses, start with the most recent analysis and work backwards.
  Conceptually, the process is similar to the undo function in a text editor.

  When you list the analyses for a repository,
  one or more will be identified as deletable in the response:

  ```
  "deletable": true
  ```

  An analysis is deletable when it's the most recent in a set of analyses.
  Typically, a repository will have multiple sets of analyses
  for each enabled code scanning tool,
  where a set is determined by a unique combination of analysis values:

  * `ref`
  * `tool`
  * `category`

  If you attempt to delete an analysis that is not the most recent in a set,
  you'll get a 400 response with the message:

  ```
  Analysis specified is not deletable.
  ```

  The response from a successful `DELETE` operation provides you with
  two alternative URLs for deleting the next analysis in the set:
  `next_analysis_url` and `confirm_delete_url`.
  Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis
  in a set. This is a useful option if you want to preserve at least one analysis
  for the specified tool in your repository.
  Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool.
  When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url`
  in the 200 response is `null`.

  As an example of the deletion process,
  let's imagine that you added a workflow that configured a particular code scanning tool
  to analyze the code in a repository. This tool has added 15 analyses:
  10 on the default branch, and another 5 on a topic branch.
  You therefore have two separate sets of analyses for this tool.
  You've now decided that you want to remove all of the analyses for the tool.
  To do this you must make 15 separate deletion requests.
  To start, you must find an analysis that's identified as deletable.
  Each set of analyses always has one that's identified as deletable.
  Having found the deletable analysis for one of the two sets,
  delete this analysis and then continue deleting the next analysis in the set until they're all deleted.
  Then repeat the process for the second set.
  The procedure therefore consists of a nested loop:

  **Outer loop**:
  * List the analyses for the repository, filtered by tool.
  * Parse this list to find a deletable analysis. If found:

    **Inner loop**:
    * Delete the identified analysis.
    * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration.

  The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"description":"The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation.","in":"path","name":"analysis_id","required":true,"schema":{"type":"integer"},"style":"simple"},{"description":"Allow deletion if the specified analysis is the last in a set. If you attempt to delete the final analysis in a set without setting this parameter to `true`, you'll get a 400 response with the message: `Analysis is last of its type and deletion may result in the loss of historical alert data. Please specify confirm_delete.`","in":"query","name":"confirm_delete","schema":{"nullable":true,"type":"string"},"style":"form"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default-response":{"$ref":"#/components/examples/code-scanning-analysis-deletion"}},"schema":{"$ref":"#/components/schemas/code-scanning-analysis-deletion"}}},"description":"Response"},"400":{"$ref":"#/components/responses/bad_request"},"403":{"$ref":"#/components/responses/code_scanning_forbidden_write"},"404":{"$ref":"#/components/responses/not_found"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: code-scanning/list-codeql-databases
path: /repos/{owner}/{repo}/code-scanning/codeql/databases
method: GET
summary: List CodeQL databases for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Lists the CodeQL databases that are available in a repository.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.

input_schema:
[cell repeats an earlier one in this file: 116 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/code-scanning-codeql-databases"}},"schema":{"items":{"$ref":"#/components/schemas/code-scanning-codeql-database"},"type":"array"}}},"description":"Response"},"403":{"$ref":"#/components/responses/code_scanning_forbidden_read"},"404":{"$ref":"#/components/responses/not_found"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: code-scanning/get-codeql-database
path: /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}
method: GET
summary: Get a CodeQL database for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Gets a CodeQL database for a language in a repository.

  By default this endpoint returns JSON metadata about the CodeQL database. To
  download the CodeQL database binary content, set the `Accept` header of the request
  to [`application/zip`](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types), and make sure
  your HTTP client is configured to follow redirects or use the `Location` header
  to make a second request to get the redirect URL.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"description":"The language of the CodeQL database.","in":"path","name":"language","required":true,"schema":{"type":"string"},"style":"simple"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/code-scanning-codeql-database"}},"schema":{"$ref":"#/components/schemas/code-scanning-codeql-database"}}},"description":"Response"},"302":{"$ref":"#/components/responses/found"},"403":{"$ref":"#/components/responses/code_scanning_forbidden_read"},"404":{"$ref":"#/components/responses/not_found"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: code-scanning/delete-codeql-database
path: /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}
method: DELETE
summary: Delete a CodeQL database
auth_scheme_ref: GitHubBearerToken
description:
  Deletes a CodeQL database for a language in a repository.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"description":"The language of the CodeQL database.","in":"path","name":"language","required":true,"schema":{"type":"string"},"style":"simple"}],"requestBody":null}

output_schema:
  {"204":{"description":"Response"},"403":{"$ref":"#/components/responses/code_scanning_forbidden_write"},"404":{"$ref":"#/components/responses/not_found"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: code-scanning/create-variant-analysis
path: /repos/{owner}/{repo}/code-scanning/codeql/variant-analyses
method: POST
summary: Create a CodeQL variant analysis
auth_scheme_ref: GitHubBearerToken
description:
  Creates a new CodeQL variant analysis, which will run a CodeQL query against one or more repositories.

  Get started by learning more about [running CodeQL queries at scale with Multi-Repository Variant Analysis](https://docs.github.com/code-security/codeql-for-vs-code/getting-started-with-codeql-for-vs-code/running-codeql-queries-at-scale-with-multi-repository-variant-analysis).

  Use the `owner` and `repo` parameters in the URL to specify the controller repository that
  will be used for running GitHub Actions workflows and storing the results of the CodeQL variant analysis.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"repositories_parameter":{"summary":"Using the \"repositories\" field. \"query_pack\" is abridged for brevity.","value":{"language":"csharp","query_pack":"aGVsbG8=","repositories":["octocat/Hello-World","octocat/example"]}},"repository_lists":{"summary":"Using the \"repository_lists\" field. \"query_pack\" is abridged.","value":{"language":"csharp","query_pack":"aGVsbG8=","repository_lists":["top-100-csharp"]}},"repository_owners":{"summary":"Using the \"repository_owners\" field. \"query_pack\" is abridged.","value":{"language":"csharp","query_pack":"aGVsbG8=","repository_owners":["octocat"]}}},"schema":{"additionalProperties":false,"oneOf":[{"required":["repositories"]},{"required":["repository_lists"]},{"required":["repository_owners"]}],"properties":{"language":{"$ref":"#/components/schemas/code-scanning-variant-analysis-language"},"query_pack":{"description":"A Base64-encoded tarball containing a CodeQL query and all its dependencies","type":"string"},"repositories":{"description":"List of repository names (in the form `owner/repo-name`) to run the query against. Precisely one property from `repositories`, `repository_lists` and `repository_owners` is required.","items":{"type":"string"},"type":"array"},"repository_lists":{"description":"List of repository lists to run the query against. Precisely one property from `repositories`, `repository_lists` and `repository_owners` is required.","items":{"type":"string"},"maxItems":1,"type":"array"},"repository_owners":{"description":"List of organization or user names whose repositories the query should be run against. Precisely one property from `repositories`, `repository_lists` and `repository_owners` is required.","items":{"type":"string"},"maxItems":1,"type":"array"}},"required":["language","query_pack"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"repositories_parameter":{"summary":"Response for a successful variant analysis submission","value":{"$ref":"#/components/examples/code-scanning-variant-analysis"}},"repository_lists":{"summary":"Response for a successful variant analysis submission","value":{"$ref":"#/components/examples/code-scanning-variant-analysis"}},"repository_owners":{"summary":"Response for a successful variant analysis submission","value":{"$ref":"#/components/examples/code-scanning-variant-analysis"}}},"schema":{"$ref":"#/components/schemas/code-scanning-variant-analysis"}}},"description":"Variant analysis submitted for processing"},"404":{"$ref":"#/components/responses/not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/basic-error"}}},"description":"Unable to process variant analysis submission"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: code-scanning/get-variant-analysis
path: /repos/{owner}/{repo}/code-scanning/codeql/variant-analyses/{codeql_variant_analysis_id}
method: GET
summary: Get the summary of a CodeQL variant analysis
auth_scheme_ref: GitHubBearerToken
description:
  Gets the summary of a CodeQL variant analysis.

  OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"description":"The unique identifier of the variant analysis.","in":"path","name":"codeql_variant_analysis_id","required":true,"schema":{"type":"integer"},"style":"simple"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/code-scanning-variant-analysis"}},"schema":{"$ref":"#/components/schemas/code-scanning-variant-analysis"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: code-scanning/get-variant-analysis-repo-task
method: GET
summary: Get the analysis status of a repository in a CodeQL variant analysis
auth_scheme_ref: GitHubBearerToken
path:
  /repos/{owner}/{repo}/code-scanning/codeql/variant-analyses/{codeql_variant_analysis_id}/repos/{repo_owner}/{repo_name}

description:
  Gets the analysis status of a repository in a CodeQL variant analysis.

  OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"description":"The name of the controller repository.","in":"path","name":"repo","required":true,"schema":{"type":"string"},"style":"simple"},{"description":"The ID of the variant analysis.","in":"path","name":"codeql_variant_analysis_id","required":true,"schema":{"type":"integer"},"style":"simple"},{"description":"The account owner of the variant analysis repository. The name is not case sensitive.","in":"path","name":"repo_owner","required":true,"schema":{"type":"string"},"style":"simple"},{"description":"The name of the variant analysis repository.","in":"path","name":"repo_name","required":true,"schema":{"type":"string"},"style":"simple"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/code-scanning-variant-analysis-repo-task"}},"schema":{"$ref":"#/components/schemas/code-scanning-variant-analysis-repo-task"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: code-scanning/get-default-setup
path: /repos/{owner}/{repo}/code-scanning/default-setup
method: GET
summary: Get a code scanning default setup configuration
auth_scheme_ref: GitHubBearerToken
description:
  Gets a code scanning default setup configuration.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.

input_schema:
[cell repeats an earlier one in this file: 116 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/code-scanning-default-setup"}},"schema":{"$ref":"#/components/schemas/code-scanning-default-setup"}}},"description":"Response"},"403":{"$ref":"#/components/responses/code_scanning_forbidden_read"},"404":{"$ref":"#/components/responses/not_found"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: code-scanning/update-default-setup
path: /repos/{owner}/{repo}/code-scanning/default-setup
method: PATCH
summary: Update a code scanning default setup configuration
auth_scheme_ref: GitHubBearerToken
description:
  Updates a code scanning default setup configuration.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/code-scanning-default-setup-update"}},"schema":{"$ref":"#/components/schemas/code-scanning-default-setup-update"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{}},"schema":{"$ref":"#/components/schemas/empty-object"}}},"description":"Response"},"202":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/code-scanning-default-setup-update-response"}},"schema":{"$ref":"#/components/schemas/code-scanning-default-setup-update-response"}}},"description":"Response"},"403":{"$ref":"#/components/responses/code_scanning_forbidden_write"},"404":{"$ref":"#/components/responses/not_found"},"409":{"$ref":"#/components/responses/code_scanning_conflict"},"422":{"$ref":"#/components/responses/code_scanning_invalid_state"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: code-scanning/upload-sarif
path: /repos/{owner}/{repo}/code-scanning/sarifs
method: POST
summary: Upload an analysis as SARIF data
auth_scheme_ref: GitHubBearerToken
description:
  Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. For troubleshooting information, see "[Troubleshooting SARIF uploads](https://docs.github.com/code-security/code-scanning/troubleshooting-sarif)."

  There are two places where you can upload code scanning results.
   - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)."
   - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)."

  You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example:

  ```
  gzip -c analysis-data.sarif | base64 -w0
  ```

  SARIF upload supports a maximum number of entries per the following data objects, and an analysis will be rejected if any of these objects is above its maximum value. For some objects, there are additional values over which the entries will be ignored while keeping the most important entries whenever applicable.
  To get the most out of your analysis when it includes data above the supported limits, try to optimize the analysis configuration. For example, for the CodeQL tool, identify and remove the most noisy queries. For more information, see "[SARIF results exceed one or more limits](https://docs.github.com/code-security/code-scanning/troubleshooting-sarif/results-exceed-limit)."


  | **SARIF data**                   | **Maximum values** | **Additional limits**                                                            |
  |----------------------------------|:------------------:|----------------------------------------------------------------------------------|
  | Runs per file                    |         20         |                                                                                  |
  | Results per run                  |       25,000       | Only the top 5,000 results will be included, prioritized by severity.            |
  | Rules per run                    |       25,000       |                                                                                  |
  | Tool extensions per run          |        100         |                                                                                  |
  | Thread Flow Locations per result |       10,000       | Only the top 1,000 Thread Flow Locations will be included, using prioritization. |
  | Location per result	             |       1,000        | Only 100 locations will be included.                                             |
  | Tags per rule	                   |         20         | Only 10 tags will be included.                                                   |


  The `202 Accepted` response includes an `id` value.
  You can use this ID to check the status of the upload by using it in the `/sarifs/{sarif_id}` endpoint.
  For more information, see "[Get information about a SARIF upload](/rest/code-scanning/code-scanning#get-information-about-a-sarif-upload)."

  OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.

  This endpoint is limited to 1,000 requests per hour for each user or app installation calling it.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"commit_sha":"4b6472266afd7b471e86085a6659e8c7f2b119da","ref":"refs/heads/master","sarif":"H4sICMLGdF4AA2V4YW1wbGUuc2FyaWYAvVjdbts2FL7PUxDCijaA/CM7iRNfLkPXYgHSNstumlzQ0pHFVCI1korjFgH2ONtr7Ul2KFmy/mOn6QIkjsjDw0/nfN85NL8dEGL9pNwAImqRObECrWM1H40kXQ2XTAfJIlEgXcE1cD10RTQSVDE10K4aKSqZP1AxuKOIKg1ydJU60jSfSh8Hk6EzHA/vlOCWbfa7B6kYPpj90rlsWCZcmbHP5Bs+4oAWIjQD2SMOeJLh2vIQDnIaQerqXHjw8YIgxohybxAyDsS4cAPKsp03K4RcUs6+Up2D+JXpd8mibKIQN9fM/aMCdbyBujGSSQgVxJtx5qX2d2qUcIweQhEuDQf3GBO6CKHkogx/N3MVCKl/AeVKFuf4y5ubsMGDTj1ep+5I7sgmLIpxtU38hLtmMRGSuCFVyip5eKzs5ydh+LztVL6f2m6oih1BkYiuyQIIJWodxVpERPj4sEiWBNNH8EWT0DMG8EAjzKVHXCrB4FkPu/F64NMk1OeC+2yZSNoBOoR7CC0EzYWGbm+xFDFIzbI011+cLjfZtyJkmMZfumAh02uL3NpV2y+MZ6RAjxibyKrNxxJcVjANSb4eBGwZ1M0KsuyR2poLr5rMl8vaDSeVn6eTWEO2j2xIEcmhwlTKNOi4GMOI8gfuZYkvJ7b4v5Tiumyz7RnHeodFzpS8ASIZCH/AYdWi2z3sG8JtFxJ6fF9yR9CdifBr9Pd6d5V2+zbJKjjCFGGmsHuYFy2ytJq9tUxcLSRSQecppOGKrpUxYfxefMEFK+wOGa4hudQByBVT0L+EKtyACxnRsABhEx1QjVDs1KNI9MbpnhqfE45B6FJvu3hRu5VRU9MhZLmK7fqkKyQSTHNoyMqUFMqXCV3CwAeqEwmVokraK8IuBaGvHjQ0gMYrKjnjyw7uk9uD8tgmsBbFMPnU1bV2ZhkJNkuolUiWys3UPWzs5aaIUz9TBe8zMb+6+nT+6fLy91dlE3xzeDDT4zYszb0bW6NjJd0Rvn2EnLvWLFSdKPpBzInzfRgu8ETyMcH8nIfMnJCeC2PyfTA+UKngcnGH7Hw2hGkVQs5YlIRCtdWZYQ4/73es2JlxkfViOEIhoWJq5Oo6UBBfiKIqFBWhiE3jJGbFwVoxBHTRSuIS67sMeplei24X20shLjG+8gqbKC/bESiNMC+wd5q5id0yeS7CJEqXzmrTWNq3k05l84P6f4/bEmXFJjI0fIt1BGQssUnUDkBYeVhE5TqPnMH3jqogDcP0zKcTgLPTMSzOjhbjuVOmW23l1fYNStulfo6sXlFsGLhbDy5RECPRYGCTgOj2bd4nUQEivEd0H7KKYxqnEhFohuur3a3UPskbH/+Yg0+M5P2MHRJu3ziHh3Z2NCrWt3XF1rWTw8Ne/pfbWYXnDSE0SNZQQt1i18q7te2vOhu7ehWuvVyeu0wbLZi24mhoo6aOOTltzG/lgdVvVoXQq5V+pewkFIzL8fjEcadT55jOjpzFzHuOTtDNrMkJPMVQDd7F09RID72O/UPZ0tmctqZ7kWX6EmSZnDpP8GU67SXM8XE3YSrxbKsx6UReZ4y6n/FVZfJjs9Z7stma75W5yQtkzjk5eSJxk1lv4o7+j8TlhaJ2lsKWZO6lruDPBLib3x5ZN/KGWzZ+pn///evv7OOf4iIBv3oY9L/l1wiJ9p0Tc+F1zZnOE9NxXWEus6IQhr5pMfoqxi8WPsuu0azsns4UC6WzNzHIzbeEx4P/AJ3SefgcFAAA"}}},"schema":{"additionalProperties":false,"properties":{"checkout_uri":{"description":"The base directory used in the analysis, as it appears in the SARIF file.\nThis property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository.","example":"file:///github/workspace/","format":"uri","type":"string"},"commit_sha":{"$ref":"#/components/schemas/code-scanning-analysis-commit-sha"},"ref":{"$ref":"#/components/schemas/code-scanning-ref-full"},"sarif":{"$ref":"#/components/schemas/code-scanning-analysis-sarif-file"},"started_at":{"description":"The time that the analysis run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.","format":"date-time","type":"string"},"tool_name":{"description":"The name of the tool used to generate the code scanning analysis. If this parameter is not used, the tool name defaults to \"API\". If the uploaded SARIF contains a tool GUID, this will be available for filtering using the `tool_guid` parameter of operations such as `GET /repos/{owner}/{repo}/code-scanning/alerts`.","type":"string"},"validate":{"description":"Whether the SARIF file will be validated according to the code scanning specifications.\nThis parameter is intended to help integrators ensure that the uploaded SARIF files are correctly rendered by code scanning.","type":"boolean"}},"required":["commit_sha","ref","sarif"],"type":"object"}}},"required":true}}

output_schema:
  {"202":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/code-scanning-sarif-upload"}},"schema":{"$ref":"#/components/schemas/code-scanning-sarifs-receipt"}}},"description":"Response"},"400":{"description":"Bad Request if the sarif field is invalid"},"403":{"$ref":"#/components/responses/code_scanning_forbidden_write"},"404":{"$ref":"#/components/responses/not_found"},"413":{"description":"Payload Too Large if the sarif field is too large"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: code-scanning/get-sarif
path: /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}
method: GET
summary: Get information about a SARIF upload
auth_scheme_ref: GitHubBearerToken
description:
  Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/code-scanning/code-scanning#get-a-code-scanning-analysis-for-a-repository)."
  OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"description":"The SARIF ID obtained after uploading.","in":"path","name":"sarif_id","required":true,"schema":{"type":"string"},"style":"simple"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/code-scanning-sarif-upload-status"}},"schema":{"$ref":"#/components/schemas/code-scanning-sarifs-status"}}},"description":"Response"},"403":{"$ref":"#/components/responses/code_scanning_forbidden_read"},"404":{"description":"Not Found if the sarif id does not match any upload"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: code-security/get-configuration-for-repository
path: /repos/{owner}/{repo}/code-security-configuration
method: GET
summary: Get the code security configuration associated with a repository
auth_scheme_ref: GitHubBearerToken
description:
  Get the code security configuration that manages a repository's code security settings.

  The authenticated user must be an administrator or security manager for the organization to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 116 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/code-security-configuration-for-repository"}},"schema":{"$ref":"#/components/schemas/code-security-configuration-for-repository"}}},"description":"Response"},"204":{"$ref":"#/components/responses/no_content"},"304":{"$ref":"#/components/responses/not_modified"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: repos/codeowners-errors
path: /repos/{owner}/{repo}/codeowners/errors
method: GET
summary: List CODEOWNERS errors
auth_scheme_ref: GitHubBearerToken
description:
  List any syntax errors that are detected in the CODEOWNERS
  file.

  For more information about the correct CODEOWNERS syntax,
  see "[About code owners](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)."

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"description":"A branch, tag or commit name used to determine which version of the CODEOWNERS file to use. Default: the repository's default branch (e.g. `main`)","in":"query","name":"ref","schema":{"type":"string"},"style":"form"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/codeowners-errors"}},"schema":{"$ref":"#/components/schemas/codeowners-errors"}}},"description":"Response"},"404":{"description":"Resource not found"}}


operation_id: codespaces/list-in-repository-for-authenticated-user
path: /repos/{owner}/{repo}/codespaces
method: GET
summary: List codespaces in a repository for the authenticated user
auth_scheme_ref: GitHubBearerToken
description:
  Lists the codespaces associated to a specified repository and the authenticated user.

  OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/codespaces-list-for-repository"}},"schema":{"properties":{"codespaces":{"items":{"$ref":"#/components/schemas/codespace"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","codespaces"],"type":"object"}}},"description":"Response"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: codespaces/create-with-repo-for-authenticated-user
path: /repos/{owner}/{repo}/codespaces
method: POST
summary: Create a codespace in a repository
auth_scheme_ref: GitHubBearerToken
description:
  Creates a codespace owned by the authenticated user in the specified repository.

  OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"machine":"standardLinux32gb","ref":"main"}}},"schema":{"nullable":true,"properties":{"client_ip":{"description":"IP for location auto-detection when proxying a request","type":"string"},"devcontainer_path":{"description":"Path to devcontainer.json config to use for this codespace","type":"string"},"display_name":{"description":"Display name for this codespace","type":"string"},"geo":{"description":"The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is closing down.","enum":["EuropeWest","SoutheastAsia","UsEast","UsWest"],"type":"string"},"idle_timeout_minutes":{"description":"Time in minutes before codespace stops from inactivity","type":"integer"},"location":{"description":"The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided.","type":"string"},"machine":{"description":"Machine type to use for this codespace","type":"string"},"multi_repo_permissions_opt_out":{"description":"Whether to authorize requested permissions from devcontainer.json","type":"boolean"},"ref":{"description":"Git ref (typically a branch name) for this codespace","type":"string"},"retention_period_minutes":{"description":"Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days).","type":"integer"},"working_directory":{"description":"Working directory for this codespace","type":"string"}},"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/codespace"}},"schema":{"$ref":"#/components/schemas/codespace"}}},"description":"Response when the codespace was successfully created"},"202":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/codespace"}},"schema":{"$ref":"#/components/schemas/codespace"}}},"description":"Response when the codespace creation partially failed but is being retried in the background"},"400":{"$ref":"#/components/responses/bad_request"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: codespaces/list-devcontainers-in-repository-for-authenticated-user
path: /repos/{owner}/{repo}/codespaces/devcontainers
method: GET
summary: List devcontainer configurations in a repository for the authenticated user
auth_scheme_ref: GitHubBearerToken
description:
  Lists the devcontainer.json files associated with a specified repository and the authenticated user. These files
  specify launchpoint configurations for codespaces created within the repository.

  OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/codespaces-list-devcontainers-for-repository"}},"schema":{"properties":{"devcontainers":{"items":{"properties":{"display_name":{"type":"string"},"name":{"type":"string"},"path":{"type":"string"}},"required":["path"],"type":"object"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","devcontainers"],"type":"object"}}},"description":"Response"},"400":{"$ref":"#/components/responses/bad_request"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: codespaces/repo-machines-for-authenticated-user
path: /repos/{owner}/{repo}/codespaces/machines
method: GET
summary: List available machine types for a repository
auth_scheme_ref: GitHubBearerToken
description:
  List the machine types available for a given repository based on its configuration.

  OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"description":"The location to check for available machines. Assigned by IP if not provided.","in":"query","name":"location","schema":{"example":"WestUs2","type":"string"},"style":"form"},{"description":"IP for location auto-detection when proxying a request","in":"query","name":"client_ip","schema":{"type":"string"},"style":"form"},{"description":"The branch or commit to check for prebuild availability and devcontainer restrictions.","in":"query","name":"ref","schema":{"example":"main","type":"string"},"style":"form"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/codespace-machines-list"}},"schema":{"properties":{"machines":{"items":{"$ref":"#/components/schemas/codespace-machine"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","machines"],"type":"object"}}},"description":"Response"},"304":{"$ref":"#/components/responses/not_modified"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: codespaces/pre-flight-with-repo-for-authenticated-user
path: /repos/{owner}/{repo}/codespaces/new
method: GET
summary: Get default attributes for a codespace
auth_scheme_ref: GitHubBearerToken
description:
  Gets the default attributes for codespaces created by the user with the repository.

  OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"description":"The branch or commit to check for a default devcontainer path. If not specified, the default branch will be checked.","in":"query","name":"ref","schema":{"example":"main","type":"string"},"style":"form"},{"description":"An alternative IP for default location auto-detection, such as when proxying a request.","in":"query","name":"client_ip","schema":{"example":"1.2.3.4","type":"string"},"style":"form"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/codespaces-default-attributes-for-a-codespace"}},"schema":{"properties":{"billable_owner":{"$ref":"#/components/schemas/simple-user"},"defaults":{"properties":{"devcontainer_path":{"nullable":true,"type":"string"},"location":{"type":"string"}},"required":["location","devcontainer_path"],"type":"object"}},"type":"object"}}},"description":"Response when a user is able to create codespaces from the repository."},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: codespaces/check-permissions-for-devcontainer
path: /repos/{owner}/{repo}/codespaces/permissions_check
method: GET
summary: Check if permissions defined by a devcontainer have been accepted by the authenticated user
auth_scheme_ref: GitHubBearerToken
description:
  Checks whether the permissions defined by a given devcontainer configuration have been accepted by the authenticated user.

  OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"description":"The git reference that points to the location of the devcontainer configuration to use for the permission check. The value of `ref` will typically be a branch name (`heads/BRANCH_NAME`). For more information, see \"[Git References](https://git-scm.com/book/en/v2/Git-Internals-Git-References)\" in the Git documentation.","in":"query","name":"ref","required":true,"schema":{"example":"master","type":"string"},"style":"form"},{"description":"Path to the devcontainer.json configuration to use for the permission check.","in":"query","name":"devcontainer_path","required":true,"schema":{"example":".devcontainer/example/devcontainer.json","type":"string"},"style":"form"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/codespaces-permissions-check-for-devcontainer"}},"schema":{"$ref":"#/components/schemas/codespaces-permissions-check-for-devcontainer"}}},"description":"Response when the permission check is successful"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: codespaces/list-repo-secrets
path: /repos/{owner}/{repo}/codespaces/secrets
method: GET
summary: List repository secrets
auth_scheme_ref: GitHubBearerToken
description:
  Lists all development environment secrets available in a repository without revealing their encrypted
  values.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 200 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/repo-codespaces-secret-paginated"}},"schema":{"properties":{"secrets":{"items":{"$ref":"#/components/schemas/repo-codespaces-secret"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","secrets"],"type":"object"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}}}


operation_id: codespaces/get-repo-public-key
path: /repos/{owner}/{repo}/codespaces/secrets/public-key
method: GET
summary: Get a repository public key
auth_scheme_ref: GitHubBearerToken
description:
  Gets your public key, which you need to encrypt secrets. You need to
  encrypt a secret before you can create or update secrets.

  If the repository is private, OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 116 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/codespaces-public-key"}},"schema":{"$ref":"#/components/schemas/codespaces-public-key"}}},"description":"Response"}}


operation_id: codespaces/get-repo-secret
path: /repos/{owner}/{repo}/codespaces/secrets/{secret_name}
method: GET
summary: Get a repository secret
auth_scheme_ref: GitHubBearerToken
description:
  Gets a single repository development environment secret without revealing its encrypted value.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 163 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/repo-codespaces-secret"}},"schema":{"$ref":"#/components/schemas/repo-codespaces-secret"}}},"description":"Response"}}


operation_id: codespaces/create-or-update-repo-secret
path: /repos/{owner}/{repo}/codespaces/secrets/{secret_name}
method: PUT
summary: Create or update a repository secret
auth_scheme_ref: GitHubBearerToken
description:
  Creates or updates a repository development 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)."

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. The associated user must be a repository admin.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/secret-name"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"encrypted_value":"c2VjcmV0","key_id":"012345678912345678"}}},"schema":{"properties":{"encrypted_value":{"description":"Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/codespaces/repository-secrets#get-a-repository-public-key) endpoint.","pattern":"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$","type":"string"},"key_id":{"description":"ID of the key you used to encrypt the secret.","type":"string"}},"type":"object"}}},"required":true}}

output_schema:
[cell repeats an earlier one in this file: 226 characters]


operation_id: codespaces/delete-repo-secret
path: /repos/{owner}/{repo}/codespaces/secrets/{secret_name}
method: DELETE
summary: Delete a repository secret
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Deletes a development environment secret in a repository using the secret name.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. The associated user must be a repository admin.

input_schema:
[cell repeats an earlier one in this file: 163 characters]


operation_id: repos/list-collaborators
path: /repos/{owner}/{repo}/collaborators
method: GET
summary: List repository collaborators
auth_scheme_ref: GitHubBearerToken
description:
  For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners.
  The `permissions` hash returned in the response contains the base role permissions of the collaborator. The `role_name` is the highest role assigned to the collaborator after considering all sources of grants, including: repo, teams, organization, and enterprise.
  There is presently not a way to differentiate between an organization level grant and a repository level grant from this endpoint response.

  Team members will include the members of child teams.

  The authenticated user must have write, maintain, or admin privileges on the repository to use this endpoint. For organization-owned repositories, the authenticated user needs to be a member of the organization.
  OAuth app tokens and personal access tokens (classic) need the `read:org` and `repo` scopes to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"description":"Filter collaborators returned by their affiliation. `outside` means all outside collaborators of an organization-owned repository. `direct` means all collaborators with permissions to an organization-owned repository, regardless of organization membership status. `all` means all collaborators the authenticated user can see.","in":"query","name":"affiliation","schema":{"default":"all","enum":["outside","direct","all"],"type":"string"},"style":"form"},{"description":"Filter collaborators by the permissions they have on the repository. If not specified, all collaborators will be returned.","in":"query","name":"permission","schema":{"enum":["pull","triage","push","maintain","admin"],"type":"string"},"style":"form"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/collaborator-items"}},"schema":{"items":{"$ref":"#/components/schemas/collaborator"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: repos/check-collaborator
path: /repos/{owner}/{repo}/collaborators/{username}
method: GET
summary: Check if a user is a repository collaborator
auth_scheme_ref: GitHubBearerToken
description:
  For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners.

  Team members will include the members of child teams.

  The authenticated user must have push access to the repository to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `read:org` and `repo` scopes to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/username"}],"requestBody":null}

output_schema:
  {"204":{"description":"Response if user is a collaborator"},"404":{"description":"Not Found if user is not a collaborator"}}


operation_id: repos/add-collaborator
path: /repos/{owner}/{repo}/collaborators/{username}
method: PUT
summary: Add a repository collaborator
auth_scheme_ref: GitHubBearerToken
description:
  Add a user to a repository with a specified level of access. If the repository is owned by an organization, this API does not add the user to the organization - a user that has repository access without being an organization member is called an "outside collaborator" (if they are not an Enterprise Managed User) or a "repository collaborator" if they are an Enterprise Managed User. These users are exempt from some organization policies - see "[Adding outside collaborators to repositories](https://docs.github.com/organizations/managing-user-access-to-your-organizations-repositories/managing-outside-collaborators/adding-outside-collaborators-to-repositories-in-your-organization)" to learn more about these collaborator types.

  This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications).

  Adding an outside collaborator may be restricted by enterprise and organization administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)" and "[Setting permissions for adding outside collaborators](https://docs.github.com/organizations/managing-organization-settings/setting-permissions-for-adding-outside-collaborators)" for organization settings.

  For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the role being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:

  ```
  Cannot assign {member} permission of {role name}
  ```

  Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)."

  The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [API](https://docs.github.com/rest/collaborators/invitations).

  For Enterprise Managed Users, this endpoint does not send invitations - these users are automatically added to organizations and repositories. Enterprise Managed Users can only be added to organizations and repositories within their enterprise.

  **Updating an existing collaborator's permission level**

  The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed.

  **Rate limits**

  You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/username"}],"requestBody":{"content":{"application/json":{"examples":{"new-invitation-is-created":{"summary":"Add a collaborator with triage permissions","value":{"permission":"triage"}}},"schema":{"properties":{"permission":{"default":"push","description":"The permission to grant the collaborator. **Only valid on organization-owned repositories.** We accept the following permissions to be set: `pull`, `triage`, `push`, `maintain`, `admin` and you can also specify a custom repository role name, if the owning organization has defined any.","type":"string"}},"type":"object"}}}}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"new-invitation-is-created":{"$ref":"#/components/examples/repository-invitation-response-when-a-new-invitation-is-created"}},"schema":{"$ref":"#/components/schemas/repository-invitation"}}},"description":"Response when a new invitation is created"},"204":{"description":"Response when:\n- an existing collaborator is added as a collaborator\n- an organization member is added as an individual collaborator\n- an existing team member (whose team is also a repository collaborator) is added as an individual collaborator"},"403":{"$ref":"#/components/responses/forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/validation-error"}}},"description":"Response when:\n- validation failed, or the endpoint has been spammed\n- an Enterprise Managed User (EMU) account was invited to a repository in an enterprise with personal user accounts"}}


operation_id: repos/remove-collaborator
path: /repos/{owner}/{repo}/collaborators/{username}
method: DELETE
summary: Remove a repository collaborator
auth_scheme_ref: GitHubBearerToken
description:
  Removes a collaborator from a repository.

  To use this endpoint, the authenticated user must either be an administrator of the repository or target themselves for removal.

  This endpoint also:
  - Cancels any outstanding invitations sent by the collaborator
  - Unassigns the user from any issues
  - Removes access to organization projects if the user is not an organization member and is not a collaborator on any other organization repositories.
  - Unstars the repository
  - Updates access permissions to packages

  Removing a user as a collaborator has the following effects on forks:
   - If the user had access to a fork through their membership to this repository, the user will also be removed from the fork.
   - If the user had their own fork of the repository, the fork will be deleted.
   - If the user still has read access to the repository, open pull requests by this user from a fork will be denied.

  > [!NOTE]
  > A user can still have access to the repository through organization permissions like base repository permissions.

  Although the API responds immediately, the additional permission updates might take some extra time to complete in the background.

  For more information on fork permissions, see "[About permissions and visibility of forks](https://docs.github.com/pull-requests/collaborating-with-pull-requests/working-with-forks/about-permissions-and-visibility-of-forks)".

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/username"}],"requestBody":null}

output_schema:
  {"204":{"description":"No Content when collaborator was removed from the repository."},"403":{"$ref":"#/components/responses/forbidden"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: repos/get-collaborator-permission-level
path: /repos/{owner}/{repo}/collaborators/{username}/permission
method: GET
summary: Get repository permissions for a user
auth_scheme_ref: GitHubBearerToken
description:
  Checks the repository permission and role of a collaborator.

  The `permission` attribute provides the legacy base roles of `admin`, `write`, `read`, and `none`, where the
  `maintain` role is mapped to `write` and the `triage` role is mapped to `read`.
  The `role_name` attribute provides the name of the assigned role, including custom roles. The
  `permission` can also be used to determine which base level of access the collaborator has to the repository.

  The calculated permissions are the highest role assigned to the collaborator after considering all sources of grants, including: repo, teams, organization, and enterprise.
  There is presently not a way to differentiate between an organization level grant and a repository level grant from this endpoint response.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/username"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"response-if-user-has-admin-permissions":{"$ref":"#/components/examples/repository-collaborator-permission-response-if-user-has-admin-permissions"}},"schema":{"$ref":"#/components/schemas/repository-collaborator-permission"}}},"description":"if user has admin permissions"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: repos/list-commit-comments-for-repo
path: /repos/{owner}/{repo}/comments
method: GET
summary: List commit comments for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Lists the commit comments for a specified repository. Comments are ordered by ascending ID.

  This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."

  - **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.
  - **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.
  - **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.
  - **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.

input_schema:
[cell repeats an earlier one in this file: 200 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/commit-comment-items"}},"schema":{"items":{"$ref":"#/components/schemas/commit-comment"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}}}


operation_id: repos/get-commit-comment
path: /repos/{owner}/{repo}/comments/{comment_id}
method: GET
summary: Get a commit comment
auth_scheme_ref: GitHubBearerToken
description:
  Gets a specified commit comment.

  This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."

  - **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.
  - **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.
  - **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.
  - **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/comment-id"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/commit-comment"}},"schema":{"$ref":"#/components/schemas/commit-comment"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: repos/update-commit-comment
path: /repos/{owner}/{repo}/comments/{comment_id}
method: PATCH
summary: Update a commit comment
auth_scheme_ref: GitHubBearerToken
description:
  Updates the contents of a specified commit comment.

  This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."

  - **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.
  - **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.
  - **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.
  - **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/comment-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"body":"Nice change"}}},"schema":{"properties":{"body":{"description":"The contents of the comment","type":"string"}},"required":["body"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/commit-comment-2"}},"schema":{"$ref":"#/components/schemas/commit-comment"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: reactions/list-for-commit-comment
path: /repos/{owner}/{repo}/comments/{comment_id}/reactions
method: GET
summary: List reactions for a commit comment
auth_scheme_ref: GitHubBearerToken
description:
  List the reactions to a [commit comment](https://docs.github.com/rest/commits/comments#get-a-commit-comment).

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/comment-id"},{"description":"Returns a single [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a commit comment.","in":"query","name":"content","schema":{"enum":["+1","-1","laugh","confused","heart","hooray","rocket","eyes"],"type":"string"},"style":"form"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/reaction-items"}},"schema":{"items":{"$ref":"#/components/schemas/reaction"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: reactions/create-for-commit-comment
path: /repos/{owner}/{repo}/comments/{comment_id}/reactions
method: POST
summary: Create reaction for a commit comment
auth_scheme_ref: GitHubBearerToken
description:
  Create a reaction to a [commit comment](https://docs.github.com/rest/commits/comments#get-a-commit-comment). A response with an HTTP `200` status means that you already added the reaction type to this commit comment.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/comment-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"content":"heart"}}},"schema":{"properties":{"content":{"description":"The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the commit comment.","enum":["+1","-1","laugh","confused","heart","hooray","rocket","eyes"],"type":"string"}},"required":["content"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/reaction"}},"schema":{"$ref":"#/components/schemas/reaction"}}},"description":"Reaction exists"},"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/reaction"}},"schema":{"$ref":"#/components/schemas/reaction"}}},"description":"Reaction created"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: reactions/delete-for-commit-comment
path: /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}
method: DELETE
summary: Delete a commit comment reaction
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  > [!NOTE]
  > You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`.

  Delete a reaction to a [commit comment](https://docs.github.com/rest/commits/comments#get-a-commit-comment).

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/comment-id"},{"$ref":"#/components/parameters/reaction-id"}],"requestBody":null}


operation_id: repos/list-commits
path: /repos/{owner}/{repo}/commits
method: GET
summary: List commits
auth_scheme_ref: GitHubBearerToken
description:
  **Signature verification object**

  The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:

  | Name | Type | Description |
  | ---- | ---- | ----------- |
  | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. |
  | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. |
  | `signature` | `string` | The signature that was extracted from the commit. |
  | `payload` | `string` | The value that was signed. |
  | `verified_at` | `string` | The date the signature was verified by GitHub. |

  These are the possible values for `reason` in the `verification` object:

  | Value | Description |
  | ----- | ----------- |
  | `expired_key` | The key that made the signature is expired. |
  | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. |
  | `gpgverify_error` | There was an error communicating with the signature verification service. |
  | `gpgverify_unavailable` | The signature verification service is currently unavailable. |
  | `unsigned` | The object does not include a signature. |
  | `unknown_signature_type` | A non-PGP signature was found in the commit. |
  | `no_user` | No user was associated with the `committer` email address in the commit. |
  | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. |
  | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |
  | `unknown_key` | The key that made the signature has not been registered with any user's account. |
  | `malformed_signature` | There was an error parsing the signature. |
  | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
  | `valid` | None of the above errors applied, so the signature is considered to be verified. |

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"description":"SHA or branch to start listing commits from. Default: the repository’s default branch (usually `main`).","in":"query","name":"sha","schema":{"type":"string"},"style":"form"},{"description":"Only commits containing this file path will be returned.","in":"query","name":"path","schema":{"type":"string"},"style":"form"},{"description":"GitHub username or email address to use to filter by commit author.","in":"query","name":"author","schema":{"type":"string"},"style":"form"},{"description":"GitHub username or email address to use to filter by commit committer.","in":"query","name":"committer","schema":{"type":"string"},"style":"form"},{"description":"Only show results that were last updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Due to limitations of Git, timestamps must be between 1970-01-01 and 2099-12-31 (inclusive) or unexpected results may be returned.","in":"query","name":"since","schema":{"format":"date-time","type":"string"},"style":"form"},{"description":"Only commits before this date will be returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Due to limitations of Git, timestamps must be between 1970-01-01 and 2099-12-31 (inclusive) or unexpected results may be returned.","in":"query","name":"until","schema":{"format":"date-time","type":"string"},"style":"form"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/commit-items"}},"schema":{"items":{"$ref":"#/components/schemas/commit"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"400":{"$ref":"#/components/responses/bad_request"},"404":{"$ref":"#/components/responses/not_found"},"409":{"$ref":"#/components/responses/conflict"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: repos/list-branches-for-head-commit
path: /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head
method: GET
summary: List branches for HEAD commit
auth_scheme_ref: GitHubBearerToken
description:
  Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

  Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/commit-sha"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/branch-short-items"}},"schema":{"items":{"$ref":"#/components/schemas/branch-short"},"type":"array"}}},"description":"Response"},"409":{"$ref":"#/components/responses/conflict"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: repos/list-comments-for-commit
path: /repos/{owner}/{repo}/commits/{commit_sha}/comments
method: GET
summary: List commit comments
auth_scheme_ref: GitHubBearerToken
description:
  Lists the comments for a specified commit.

  This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."

  - **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.
  - **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.
  - **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.
  - **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/commit-sha"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/commit-comment-items"}},"schema":{"items":{"$ref":"#/components/schemas/commit-comment"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}}}


operation_id: repos/create-commit-comment
path: /repos/{owner}/{repo}/commits/{commit_sha}/comments
method: POST
summary: Create a commit comment
auth_scheme_ref: GitHubBearerToken
description:
  Create a comment for a commit using its `:commit_sha`.

  This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."

  This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."

  - **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.
  - **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.
  - **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.
  - **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/commit-sha"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"body":"Great stuff","line":1,"path":"file1.txt","position":4}}},"schema":{"properties":{"body":{"description":"The contents of the comment.","type":"string"},"line":{"description":"**Closing down notice**. Use **position** parameter instead. Line number in the file to comment on.","type":"integer"},"path":{"description":"Relative path of the file to comment on.","type":"string"},"position":{"description":"Line index in the diff to comment on.","type":"integer"}},"required":["body"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/commit-comment"}},"schema":{"$ref":"#/components/schemas/commit-comment"}}},"description":"Response","headers":{"Location":{"example":"https://api.github.com/repos/octocat/Hello-World/comments/1","schema":{"type":"string"},"style":"simple"}}},"403":{"$ref":"#/components/responses/forbidden"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: repos/list-pull-requests-associated-with-commit
path: /repos/{owner}/{repo}/commits/{commit_sha}/pulls
method: GET
summary: List pull requests associated with a commit
auth_scheme_ref: GitHubBearerToken
description:
  Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, it will return merged and open pull requests associated with the commit.

  To list the open or merged pull requests associated with a branch, you can set the `commit_sha` parameter to the branch name.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/commit-sha"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/pull-request-simple-items"}},"schema":{"items":{"$ref":"#/components/schemas/pull-request-simple"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"409":{"$ref":"#/components/responses/conflict"}}


operation_id: repos/get-commit
path: /repos/{owner}/{repo}/commits/{ref}
method: GET
summary: Get a commit
auth_scheme_ref: GitHubBearerToken
description:
  Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint.

  > [!NOTE]
  > If there are more than 300 files in the commit diff and the default JSON media type is requested, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing.

  This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." Pagination query parameters are not supported for these media types.

  - **`application/vnd.github.diff`**: Returns the diff of the commit. Larger diffs may time out and return a 5xx status code.
  - **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property. Larger diffs may time out and return a 5xx status code.
  - **`application/vnd.github.sha`**: Returns the commit's SHA-1 hash. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag.

  **Signature verification object**

  The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:

  | Name | Type | Description |
  | ---- | ---- | ----------- |
  | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. |
  | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. |
  | `signature` | `string` | The signature that was extracted from the commit. |
  | `payload` | `string` | The value that was signed. |
  | `verified_at` | `string` | The date the signature was verified by GitHub. |

  These are the possible values for `reason` in the `verification` object:

  | Value | Description |
  | ----- | ----------- |
  | `expired_key` | The key that made the signature is expired. |
  | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. |
  | `gpgverify_error` | There was an error communicating with the signature verification service. |
  | `gpgverify_unavailable` | The signature verification service is currently unavailable. |
  | `unsigned` | The object does not include a signature. |
  | `unknown_signature_type` | A non-PGP signature was found in the commit. |
  | `no_user` | No user was associated with the `committer` email address in the commit. |
  | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. |
  | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |
  | `unknown_key` | The key that made the signature has not been registered with any user's account. |
  | `malformed_signature` | There was an error parsing the signature. |
  | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
  | `valid` | None of the above errors applied, so the signature is considered to be verified. |

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/commit-ref"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/commit"}},"schema":{"$ref":"#/components/schemas/commit"}},"application/vnd.github.diff":{"examples":{"default":{"$ref":"#/components/examples/diff-media-type"}},"schema":{"type":"string"}},"application/vnd.github.patch":{"examples":{"default":{"$ref":"#/components/examples/patch-media-type"}},"schema":{"type":"string"}},"application/vnd.github.sha":{"examples":{"default":{"value":"ac3282a2725be3b1d4979169a7a311c89066af1c"}},"schema":{"type":"string"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"409":{"$ref":"#/components/responses/conflict"},"422":{"$ref":"#/components/responses/validation_failed"},"500":{"$ref":"#/components/responses/internal_error"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: checks/list-for-ref
path: /repos/{owner}/{repo}/commits/{ref}/check-runs
method: GET
summary: List check runs for a Git reference
auth_scheme_ref: GitHubBearerToken
description:
  Lists check runs for a commit ref. The `ref` can be a SHA, branch name, or a tag name.

  > [!NOTE]
  > The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.

  If there are more than 1000 check suites on a single git reference, this endpoint will limit check runs to the 1000 most recent check suites. To iterate over all possible check runs, use the [List check suites for a Git reference](https://docs.github.com/rest/reference/checks#list-check-suites-for-a-git-reference) endpoint and provide the `check_suite_id` parameter to the [List check runs in a check suite](https://docs.github.com/rest/reference/checks#list-check-runs-in-a-check-suite) endpoint.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/commit-ref"},{"$ref":"#/components/parameters/check-name"},{"$ref":"#/components/parameters/status"},{"description":"Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs.","in":"query","name":"filter","schema":{"default":"latest","enum":["latest","all"],"type":"string"},"style":"form"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"},{"in":"query","name":"app_id","schema":{"type":"integer"},"style":"form"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/check-run-paginated"}},"schema":{"properties":{"check_runs":{"items":{"$ref":"#/components/schemas/check-run"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","check_runs"],"type":"object"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}}}


operation_id: checks/list-suites-for-ref
path: /repos/{owner}/{repo}/commits/{ref}/check-suites
method: GET
summary: List check suites for a Git reference
auth_scheme_ref: GitHubBearerToken
description:
  Lists check suites for a commit `ref`. The `ref` can be a SHA, branch name, or a tag name.

  > [!NOTE]
  > The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/commit-ref"},{"description":"Filters check suites by GitHub App `id`.","example":1,"in":"query","name":"app_id","schema":{"type":"integer"},"style":"form"},{"$ref":"#/components/parameters/check-name"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/check-suite-paginated"}},"schema":{"properties":{"check_suites":{"items":{"$ref":"#/components/schemas/check-suite"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","check_suites"],"type":"object"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}}}


operation_id: repos/get-combined-status-for-ref
path: /repos/{owner}/{repo}/commits/{ref}/status
method: GET
summary: Get the combined status for a specific reference
auth_scheme_ref: GitHubBearerToken
description:
  Users with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name.


  Additionally, a combined `state` is returned. The `state` is one of:

  *   **failure** if any of the contexts report as `error` or `failure`
  *   **pending** if there are no statuses or a context is `pending`
  *   **success** if the latest status for all contexts is `success`

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/commit-ref"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/combined-commit-status"}},"schema":{"$ref":"#/components/schemas/combined-commit-status"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: repos/list-commit-statuses-for-ref
path: /repos/{owner}/{repo}/commits/{ref}/statuses
method: GET
summary: List commit statuses for a reference
auth_scheme_ref: GitHubBearerToken
description:
  Users with pull access in a repository can view commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. Statuses are returned in reverse chronological order. The first status in the list will be the latest one.

  This resource is also available via a legacy route: `GET /repos/:owner/:repo/statuses/:ref`.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/commit-ref"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/status-items"}},"schema":{"items":{"$ref":"#/components/schemas/status"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"301":{"$ref":"#/components/responses/moved_permanently"}}


operation_id: repos/get-community-profile-metrics
path: /repos/{owner}/{repo}/community/profile
method: GET
summary: Get community profile metrics
auth_scheme_ref: GitHubBearerToken
description:
  Returns all community profile metrics for a repository. The repository cannot be a fork.

  The returned metrics include an overall health score, the repository description, the presence of documentation, the
  detected code of conduct, the detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE,
  README, and CONTRIBUTING files.

  The `health_percentage` score is defined as a percentage of how many of
  the recommended community health files are present. For more information, see
  "[About community profiles for public repositories](https://docs.github.com/communities/setting-up-your-project-for-healthy-contributions/about-community-profiles-for-public-repositories)."

  `content_reports_enabled` is only returned for organization-owned repositories.

input_schema:
[cell repeats an earlier one in this file: 116 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/community-profile"}},"schema":{"$ref":"#/components/schemas/community-profile"}}},"description":"Response"}}


operation_id: repos/compare-commits
path: /repos/{owner}/{repo}/compare/{basehead}
method: GET
summary: Compare two commits
auth_scheme_ref: GitHubBearerToken
description:
  Compares two commits against one another. You can compare refs (branches or tags) and commit SHAs in the same repository, or you can compare refs and commit SHAs that exist in different repositories within the same repository network, including fork branches. For more information about how to view a repository's network, see "[Understanding connections between repositories](https://docs.github.com/repositories/viewing-activity-and-data-for-your-repository/understanding-connections-between-repositories)."

  This endpoint is equivalent to running the `git log BASE..HEAD` command, but it returns commits in a different order. The `git log BASE..HEAD` command returns commits in reverse chronological order, whereas the API returns commits in chronological order.

  This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."

  - **`application/vnd.github.diff`**: Returns the diff of the commit.
  - **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property.

  The API response includes details about the files that were changed between the two commits. This includes the status of the change (if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file.

  When calling this endpoint without any paging parameter (`per_page` or `page`), the returned list is limited to 250 commits, and the last commit in the list is the most recent of the entire comparison.

  **Working with large comparisons**

  To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination:

  - The list of changed files is only shown on the first page of results, and it includes up to 300 changed files for the entire comparison.
  - The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results.

  For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api)."

  **Signature verification object**

  The response will include a `verification` object that describes the result of verifying the commit's signature. The `verification` object includes the following fields:

  | Name | Type | Description |
  | ---- | ---- | ----------- |
  | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. |
  | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. |
  | `signature` | `string` | The signature that was extracted from the commit. |
  | `payload` | `string` | The value that was signed. |
  | `verified_at` | `string` | The date the signature was verified by GitHub. |

  These are the possible values for `reason` in the `verification` object:

  | Value | Description |
  | ----- | ----------- |
  | `expired_key` | The key that made the signature is expired. |
  | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. |
  | `gpgverify_error` | There was an error communicating with the signature verification service. |
  | `gpgverify_unavailable` | The signature verification service is currently unavailable. |
  | `unsigned` | The object does not include a signature. |
  | `unknown_signature_type` | A non-PGP signature was found in the commit. |
  | `no_user` | No user was associated with the `committer` email address in the commit. |
  | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. |
  | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |
  | `unknown_key` | The key that made the signature has not been registered with any user's account. |
  | `malformed_signature` | There was an error parsing the signature. |
  | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
  | `valid` | None of the above errors applied, so the signature is considered to be verified. |

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per-page"},{"description":"The base branch and head branch to compare. This parameter expects the format `BASE...HEAD`. Both must be branch names in `repo`. To compare with a branch that exists in a different repository in the same network as `repo`, the `basehead` parameter expects the format `USERNAME:BASE...USERNAME:HEAD`.","in":"path","name":"basehead","required":true,"schema":{"type":"string"},"style":"simple","x-multi-segment":true}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/commit-comparison"}},"schema":{"$ref":"#/components/schemas/commit-comparison"}},"application/vnd.github.diff":{"examples":{"default":{"$ref":"#/components/examples/diff-media-type"}},"schema":{"type":"string"}},"application/vnd.github.patch":{"examples":{"default":{"$ref":"#/components/examples/patch-media-type"}},"schema":{"type":"string"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"500":{"$ref":"#/components/responses/internal_error"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: repos/get-content
path: /repos/{owner}/{repo}/contents/{path}
method: GET
summary: Get repository content
auth_scheme_ref: GitHubBearerToken
description:
  Gets the contents of a file or directory in a repository. Specify the file path or directory with the `path` parameter. If you omit the `path` parameter, you will receive the contents of the repository's root directory.

  This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."

  - **`application/vnd.github.raw+json`**: Returns the raw file contents for files and symlinks.
  - **`application/vnd.github.html+json`**: Returns the file contents in HTML. Markup languages are rendered to HTML using GitHub's open-source [Markup library](https://github.com/github/markup).
  - **`application/vnd.github.object+json`**: Returns the contents in a consistent object format regardless of the content type. For example, instead of an array of objects for a directory, the response will be an object with an `entries` attribute containing the array of objects.

  If the content is a directory: The response will be an array of objects, one object for each item in the directory.

  If the content is a symlink and the symlink's target is a normal file in the repository, then the API responds with the content of the file. Otherwise, the API responds with an object describing the symlink itself.

  If the content is a submodule, the `submodule_git_url` field identifies the location of the submodule repository, and the `sha` identifies a specific commit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out the submodule at that specific commit. If the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links["git"]`) and the github.com URLs (`html_url` and `_links["html"]`) will have null values.

  **Notes**:

  - To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/rest/git/trees#get-a-tree).
  - This API has an upper limit of 1,000 files for a directory. If you need to retrieve
  more files, use the [Git Trees API](https://docs.github.com/rest/git/trees#get-a-tree).
  - Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download.
  - If the requested file's size is:
    - 1 MB or smaller: All features of this endpoint are supported.
    - Between 1-100 MB: Only the `raw` or `object` custom media types are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty
  string and the `encoding` field will be `"none"`. To get the contents of these larger files, use the `raw` media type.
    - Greater than 100 MB: This endpoint is not supported.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"description":"path parameter","in":"path","name":"path","required":true,"schema":{"type":"string"},"style":"simple","x-multi-segment":true},{"description":"The name of the commit/branch/tag. Default: the repository’s default branch.","in":"query","name":"ref","schema":{"type":"string"},"style":"form"}],"requestBody":{"content":{"application/json":{"examples":{"response-if-content-is-a-directory":{"summary":"Content is a directory"},"response-if-content-is-a-directory-github-object":{"summary":"Content is a directory using the object media type"},"response-if-content-is-a-file":{"summary":"Content is a file"},"response-if-content-is-a-file-github-object":{"summary":"Content is a file using the object media type"},"response-if-content-is-a-submodule":{"summary":"Content is a submodule"},"response-if-content-is-a-symlink":{"summary":"Content is a symlink"}}}}}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"response-if-content-is-a-directory":{"$ref":"#/components/examples/content-file-response-if-content-is-a-directory"},"response-if-content-is-a-file":{"$ref":"#/components/examples/content-file-response-if-content-is-a-file"},"response-if-content-is-a-submodule":{"$ref":"#/components/examples/content-file-response-if-content-is-a-submodule"},"response-if-content-is-a-symlink":{"$ref":"#/components/examples/content-file-response-if-content-is-a-symlink"}},"schema":{"discriminator":{"mapping":{"array":"#/components/schemas/content-directory","file":"#/components/schemas/content-file","submodule":"#/components/schemas/content-submodule","symlink":"#/components/schemas/content-symlink"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/content-directory"},{"$ref":"#/components/schemas/content-file"},{"$ref":"#/components/schemas/content-symlink"},{"$ref":"#/components/schemas/content-submodule"}]}},"application/vnd.github.object":{"examples":{"response-if-content-is-a-directory-github-object":{"$ref":"#/components/examples/content-file-response-if-content-is-a-directory-object"},"response-if-content-is-a-file-github-object":{"$ref":"#/components/examples/content-file-response-if-content-is-a-file"}},"schema":{"$ref":"#/components/schemas/content-tree"}}},"description":"Response"},"302":{"$ref":"#/components/responses/found"},"304":{"$ref":"#/components/responses/not_modified"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: repos/create-or-update-file-contents
path: /repos/{owner}/{repo}/contents/{path}
method: PUT
summary: Create or update file contents
auth_scheme_ref: GitHubBearerToken
description:
  Creates a new file or replaces an existing file in a repository.

  > [!NOTE]
  > If you use this endpoint and the "[Delete a file](https://docs.github.com/rest/repos/contents/#delete-a-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. The `workflow` scope is also required in order to modify files in the `.github/workflows` directory.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"description":"path parameter","in":"path","name":"path","required":true,"schema":{"type":"string"},"style":"simple","x-multi-segment":true}],"requestBody":{"content":{"application/json":{"examples":{"example-for-creating-a-file":{"summary":"Example for creating a file","value":{"committer":{"email":"octocat@github.com","name":"Monalisa Octocat"},"content":"bXkgbmV3IGZpbGUgY29udGVudHM=","message":"my commit message"}},"example-for-updating-a-file":{"summary":"Example for updating a file","value":{"committer":{"email":"octocat@github.com","name":"Monalisa Octocat"},"content":"bXkgdXBkYXRlZCBmaWxlIGNvbnRlbnRz","message":"a new commit message","sha":"95b966ae1c166bd92f8ae7d1c313e738c731dfc3"}}},"schema":{"properties":{"author":{"description":"The author of the file. Default: The `committer` or the authenticated user if you omit `committer`.","properties":{"date":{"example":"\"2013-01-15T17:13:22+05:00\"","type":"string"},"email":{"description":"The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted.","type":"string"},"name":{"description":"The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted.","type":"string"}},"required":["name","email"],"type":"object"},"branch":{"description":"The branch name. Default: the repository’s default branch.","type":"string"},"committer":{"description":"The person that committed the file. Default: the authenticated user.","properties":{"date":{"example":"\"2013-01-05T13:13:22+05:00\"","type":"string"},"email":{"description":"The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted.","type":"string"},"name":{"description":"The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted.","type":"string"}},"required":["name","email"],"type":"object"},"content":{"description":"The new file content, using Base64 encoding.","type":"string"},"message":{"description":"The commit message.","type":"string"},"sha":{"description":"**Required if you are updating a file**. The blob SHA of the file being replaced.","type":"string"}},"required":["message","content"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"example-for-updating-a-file":{"$ref":"#/components/examples/file-commit-example-for-updating-a-file"}},"schema":{"$ref":"#/components/schemas/file-commit"}}},"description":"Response"},"201":{"content":{"application/json":{"examples":{"example-for-creating-a-file":{"$ref":"#/components/examples/file-commit-example-for-creating-a-file"}},"schema":{"$ref":"#/components/schemas/file-commit"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"409":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/basic-error"},{"$ref":"#/components/schemas/repository-rule-violation-error"}]}}},"description":"Conflict"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: repos/delete-file
path: /repos/{owner}/{repo}/contents/{path}
method: DELETE
summary: Delete a file
auth_scheme_ref: GitHubBearerToken
description:
  Deletes a file in a repository.

  You can provide an additional `committer` parameter, which is an object containing information about the committer. Or, you can provide an `author` parameter, which is an object containing information about the author.

  The `author` section is optional and is filled in with the `committer` information if omitted. If the `committer` information is omitted, the authenticated user's information is used.

  You must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code.

  > [!NOTE]
  > If you use this endpoint and the "[Create or update file contents](https://docs.github.com/rest/repos/contents/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"description":"path parameter","in":"path","name":"path","required":true,"schema":{"type":"string"},"style":"simple","x-multi-segment":true}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"committer":{"email":"octocat@github.com","name":"Monalisa Octocat"},"message":"my commit message","sha":"329688480d39049927147c162b9d2deaf885005f"}}},"schema":{"properties":{"author":{"description":"object containing information about the author.","properties":{"email":{"description":"The email of the author (or committer) of the commit","type":"string"},"name":{"description":"The name of the author (or committer) of the commit","type":"string"}},"type":"object"},"branch":{"description":"The branch name. Default: the repository’s default branch","type":"string"},"committer":{"description":"object containing information about the committer.","properties":{"email":{"description":"The email of the author (or committer) of the commit","type":"string"},"name":{"description":"The name of the author (or committer) of the commit","type":"string"}},"type":"object"},"message":{"description":"The commit message.","type":"string"},"sha":{"description":"The blob SHA of the file being deleted.","type":"string"}},"required":["message","sha"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/file-commit"}},"schema":{"$ref":"#/components/schemas/file-commit"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"409":{"$ref":"#/components/responses/conflict"},"422":{"$ref":"#/components/responses/validation_failed"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: repos/list-contributors
path: /repos/{owner}/{repo}/contributors
method: GET
summary: List repository contributors
auth_scheme_ref: GitHubBearerToken
description:
  Lists contributors to the specified repository and sorts them by the number of commits per contributor in descending order. This endpoint may return information that is a few hours old because the GitHub REST API caches contributor data to improve performance.

  GitHub identifies contributors by author email address. This endpoint groups contribution counts by GitHub user, which includes all associated email addresses. To improve performance, only the first 500 author email addresses in the repository link to GitHub users. The rest will appear as anonymous contributors without associated GitHub user information.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"description":"Set to `1` or `true` to include anonymous contributors in results.","in":"query","name":"anon","schema":{"type":"string"},"style":"form"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"response-if-repository-contains-content":{"$ref":"#/components/examples/contributor-items-response-if-repository-contains-content"}},"schema":{"items":{"$ref":"#/components/schemas/contributor"},"type":"array"}}},"description":"If repository contains content","headers":{"Link":{"$ref":"#/components/headers/link"}}},"204":{"description":"Response if repository is empty"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: copilot/get-copilot-cloud-agent-configuration
path: /repos/{owner}/{repo}/copilot/cloud-agent/configuration
method: GET
summary: Get Copilot cloud agent configuration for a repository
auth_scheme_ref: GitHubBearerToken
description:
  > [!NOTE]
  > This endpoint is in public preview and is subject to change.

  Gets the Copilot cloud agent configuration for a repository, including MCP server
  configuration, enabled review tools, Actions workflow approval settings, and firewall
  configuration.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 116 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"configured":{"summary":"Configuration with an MCP server and a custom firewall allowlist","value":{"custom_allowlist":["sentry.io","https://api.example.com"],"enabled_tools":{"codeql":true,"copilot_code_review":true,"dependency_vulnerability_checks":true,"secret_scanning":true},"is_firewall_enabled":true,"is_firewall_recommended_allowlist_enabled":true,"mcp_configuration":{"mcpServers":{"sentry":{"args":["@sentry/mcp-server@latest","--host=$SENTRY_HOST"],"command":"npx","env":{"SENTRY_ACCESS_TOKEN":"$COPILOT_MCP_SENTRY_ACCESS_TOKEN","SENTRY_HOST":"https://octo-org.sentry.io"},"tools":["search_issues","get_issue_details"],"type":"local"}}},"require_actions_workflow_approval":false}},"default":{"summary":"Default configuration","value":{"custom_allowlist":[],"enabled_tools":{"codeql":true,"copilot_code_review":true,"dependency_vulnerability_checks":true,"secret_scanning":true},"is_firewall_enabled":true,"is_firewall_recommended_allowlist_enabled":true,"mcp_configuration":null,"require_actions_workflow_approval":true}}},"schema":{"properties":{"custom_allowlist":{"description":"A list of custom allowlist entries, as hosts or URLs, that the firewall will allow the Copilot cloud agent to access.","items":{"description":"A custom allowlist entry, as a host or URL, that the firewall will allow the Copilot cloud agent to access.","type":"string"},"type":"array"},"enabled_tools":{"description":"The enabled review tools for Copilot cloud agent.","properties":{"codeql":{"description":"Whether the CodeQL tool is enabled for the Copilot cloud agent.","type":"boolean"},"copilot_code_review":{"description":"Whether the Copilot code review tool is enabled for the Copilot cloud agent.","type":"boolean"},"dependency_vulnerability_checks":{"description":"Whether the dependency vulnerability checks tool is enabled for the Copilot cloud agent.","type":"boolean"},"secret_scanning":{"description":"Whether the secret scanning tool is enabled for the Copilot cloud agent.","type":"boolean"}},"required":["codeql","copilot_code_review","secret_scanning","dependency_vulnerability_checks"],"type":"object"},"is_firewall_enabled":{"description":"Whether the firewall is enabled.","type":"boolean"},"is_firewall_recommended_allowlist_enabled":{"description":"Whether the firewall recommended allowlist is enabled.","type":"boolean"},"mcp_configuration":{"additionalProperties":true,"description":"The user-supplied MCP server configuration for the repository, as a free-form JSON object. This will be set to `null` if no configuration has been set.\n\nThe shape of a valid MCP configuration may evolve over time, so this property is intentionally not strictly typed. Clients should not assume a fixed schema.","nullable":true,"type":"object"},"require_actions_workflow_approval":{"description":"Whether Actions workflow approval is required for Copilot cloud agent pull requests.","type":"boolean"}},"required":["mcp_configuration","enabled_tools","require_actions_workflow_approval","is_firewall_enabled","is_firewall_recommended_allowlist_enabled","custom_allowlist"],"type":"object"}}},"description":"Response"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: dependabot/list-alerts-for-repo
path: /repos/{owner}/{repo}/dependabot/alerts
method: GET
summary: List Dependabot alerts for a repository
auth_scheme_ref: GitHubBearerToken
description:
  OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/dependabot-alert-comma-separated-classifications"},{"$ref":"#/components/parameters/dependabot-alert-comma-separated-states"},{"$ref":"#/components/parameters/dependabot-alert-comma-separated-severities"},{"$ref":"#/components/parameters/dependabot-alert-comma-separated-ecosystems"},{"$ref":"#/components/parameters/dependabot-alert-comma-separated-packages"},{"$ref":"#/components/parameters/dependabot-alert-comma-separated-manifests"},{"$ref":"#/components/parameters/dependabot-alert-comma-separated-epss"},{"$ref":"#/components/parameters/dependabot-alert-comma-separated-has"},{"$ref":"#/components/parameters/dependabot-alert-comma-separated-assignees"},{"$ref":"#/components/parameters/dependabot-alert-scope"},{"$ref":"#/components/parameters/dependabot-alert-sort"},{"$ref":"#/components/parameters/direction"},{"$ref":"#/components/parameters/pagination-before"},{"$ref":"#/components/parameters/pagination-after"},{"$ref":"#/components/parameters/per-page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/dependabot-alerts-for-repository"}},"schema":{"items":{"$ref":"#/components/schemas/dependabot-alert"},"type":"array"}}},"description":"Response"},"304":{"$ref":"#/components/responses/not_modified"},"400":{"$ref":"#/components/responses/bad_request"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed_simple"}}


operation_id: dependabot/get-alert
path: /repos/{owner}/{repo}/dependabot/alerts/{alert_number}
method: GET
summary: Get a Dependabot alert
auth_scheme_ref: GitHubBearerToken
description:
  OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/dependabot-alert-number"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/dependabot-alert-open"}},"schema":{"$ref":"#/components/schemas/dependabot-alert"}}},"description":"Response"},"304":{"$ref":"#/components/responses/not_modified"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: dependabot/update-alert
path: /repos/{owner}/{repo}/dependabot/alerts/{alert_number}
method: PATCH
summary: Update a Dependabot alert
auth_scheme_ref: GitHubBearerToken
description:
  The authenticated user must have access to security alerts for the repository to use this endpoint. For more information, see "[Granting access to security alerts](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-security-and-analysis-settings-for-your-repository#granting-access-to-security-alerts)."

  OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/dependabot-alert-number"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"dismissed_comment":"This alert is accurate but we use a sanitizer.","dismissed_reason":"tolerable_risk","state":"dismissed"}}},"schema":{"additionalProperties":false,"anyOf":[{"required":["state"]},{"required":["assignees"]}],"properties":{"agent_assignment":{"additionalProperties":false,"description":"Parameters for AI agent assignment. Only used when an agent bot login is\nincluded in `assignees`. Ignored when no agent is being assigned.","properties":{"custom_agent":{"description":"A custom agent identifier.","type":"string"},"custom_instructions":{"description":"Custom instructions for the agent.","type":"string"},"model":{"description":"The model to use for the agent.","type":"string"}},"type":"object"},"assignees":{"description":"Usernames to assign to this Dependabot Alert.\nPass one or more user logins to _replace_ the set of assignees on this alert.\nSend an empty array (`[]`) to clear all assignees from the alert.\nTo assign an AI agent, include the bot login (for example, `copilot-swe-agent[bot]`).","items":{"type":"string"},"type":"array"},"dismissed_comment":{"description":"An optional comment associated with dismissing the alert.","maxLength":280,"type":"string"},"dismissed_reason":{"description":"**Required when `state` is `dismissed`.** A reason for dismissing the alert.","enum":["fix_started","inaccurate","no_bandwidth","not_used","tolerable_risk"],"type":"string"},"state":{"description":"The state of the Dependabot alert.\nA `dismissed_reason` must be provided when setting the state to `dismissed`.","enum":["dismissed","open"],"type":"string"}},"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/dependabot-alert-dismissed"}},"schema":{"$ref":"#/components/schemas/dependabot-alert"}}},"description":"Response"},"400":{"$ref":"#/components/responses/bad_request"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"409":{"$ref":"#/components/responses/conflict"},"422":{"$ref":"#/components/responses/validation_failed_simple"}}


operation_id: dependabot/list-repo-secrets
path: /repos/{owner}/{repo}/dependabot/secrets
method: GET
summary: List repository secrets
auth_scheme_ref: GitHubBearerToken
description:
  Lists all secrets available in a repository without revealing their encrypted
  values.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 200 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/dependabot-secret-paginated"}},"schema":{"properties":{"secrets":{"items":{"$ref":"#/components/schemas/dependabot-secret"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","secrets"],"type":"object"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}}}


operation_id: dependabot/get-repo-public-key
path: /repos/{owner}/{repo}/dependabot/secrets/public-key
method: GET
summary: Get a repository public key
auth_scheme_ref: GitHubBearerToken
description:
  Gets your public key, which you need to encrypt 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.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint if the repository is private.

input_schema:
[cell repeats an earlier one in this file: 116 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/dependabot-public-key"}},"schema":{"$ref":"#/components/schemas/dependabot-public-key"}}},"description":"Response"}}


operation_id: dependabot/get-repo-secret
path: /repos/{owner}/{repo}/dependabot/secrets/{secret_name}
method: GET
summary: Get a repository secret
auth_scheme_ref: GitHubBearerToken
description:
  Gets a single repository secret without revealing its encrypted value.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 163 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/dependabot-secret"}},"schema":{"$ref":"#/components/schemas/dependabot-secret"}}},"description":"Response"}}


operation_id: dependabot/create-or-update-repo-secret
path: /repos/{owner}/{repo}/dependabot/secrets/{secret_name}
method: PUT
summary: Create or update a repository secret
auth_scheme_ref: GitHubBearerToken
description:
  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)."

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/secret-name"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"encrypted_value":"c2VjcmV0","key_id":"012345678912345678"}}},"schema":{"properties":{"encrypted_value":{"description":"Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/dependabot/secrets#get-a-repository-public-key) endpoint.","pattern":"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$","type":"string"},"key_id":{"description":"ID of the key you used to encrypt the secret.","type":"string"}},"type":"object"}}},"required":true}}

output_schema:
[cell repeats an earlier one in this file: 226 characters]


operation_id: dependabot/delete-repo-secret
path: /repos/{owner}/{repo}/dependabot/secrets/{secret_name}
method: DELETE
summary: Delete a repository secret
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Deletes a secret in a repository using the secret name.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 163 characters]


operation_id: dependency-graph/diff-range
path: /repos/{owner}/{repo}/dependency-graph/compare/{basehead}
method: GET
summary: Get a diff of the dependencies between commits
auth_scheme_ref: GitHubBearerToken
description:
  Gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"description":"The base and head Git revisions to compare. The Git revisions will be resolved to commit SHAs. Named revisions will be resolved to their corresponding HEAD commits, and an appropriate merge base will be determined. This parameter expects the format `{base}...{head}`.","in":"path","name":"basehead","required":true,"schema":{"type":"string"},"style":"simple"},{"$ref":"#/components/parameters/manifest-path"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/diff-range-response"}},"schema":{"$ref":"#/components/schemas/dependency-graph-diff"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"400":{"$ref":"#/components/responses/bad_request"},"403":{"$ref":"#/components/responses/dependency_review_forbidden"},"404":{"$ref":"#/components/responses/not_found"},"500":{"$ref":"#/components/responses/internal_error"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: dependency-graph/export-sbom
path: /repos/{owner}/{repo}/dependency-graph/sbom
method: GET
summary: Export a software bill of materials (SBOM) for a repository.
description: Exports the software bill of materials (SBOM) for a repository in SPDX JSON format.
auth_scheme_ref: GitHubBearerToken
input_schema:
[cell repeats an earlier one in this file: 116 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/dependency-graph-export-sbom-response"}},"schema":{"$ref":"#/components/schemas/dependency-graph-spdx-sbom"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: dependency-graph/fetch-sbom-report
path: /repos/{owner}/{repo}/dependency-graph/sbom/fetch-report/{sbom_uuid}
method: GET
summary: Fetch a software bill of materials (SBOM) for a repository.
auth_scheme_ref: GitHubBearerToken
description:
  Fetches a previously generated software bill of materials (SBOM) for a repository.
  When the SBOM is ready, the response is a 302 redirect to a temporary download URL for the SBOM in SPDX JSON format.
  The generated SBOM report may be retained for up to one week from the original request.
  The temporary download URL returned by this endpoint expires separately, and its expiry is set when the fetch request is made.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"description":"The unique identifier of the SBOM export.","in":"path","name":"sbom_uuid","required":true,"schema":{"type":"string"},"style":"simple"}],"requestBody":null}

output_schema:
  {"202":{"description":"SBOM is still being processed, no content is returned."},"302":{"description":"Redirects to a temporary download URL for the completed SBOM.","headers":{"Location":{"$ref":"#/components/headers/location"}}},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: dependency-graph/generate-sbom-report
path: /repos/{owner}/{repo}/dependency-graph/sbom/generate-report
method: GET
summary: Request generation of a software bill of materials (SBOM) for a repository.
auth_scheme_ref: GitHubBearerToken
description:
  Triggers a job to generate a software bill of materials (SBOM) for a repository in SPDX JSON format.

input_schema:
[cell repeats an earlier one in this file: 116 characters]

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/dependency-graph-generate-sbom-report-response"}},"schema":{"properties":{"sbom_url":{"description":"URL to poll for the SBOM export result.","type":"string"}},"type":"object"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: dependency-graph/create-repository-snapshot
path: /repos/{owner}/{repo}/dependency-graph/snapshots
method: POST
summary: Create a snapshot of dependencies for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Create a new snapshot of a repository's dependencies.

  The authenticated user must have access to the repository.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"example-of-a-dependency-submission":{"$ref":"#/components/examples/dependency-graph-create-snapshot-request"}},"schema":{"$ref":"#/components/schemas/snapshot"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"example-of-a-dependency-submission":{"$ref":"#/components/examples/dependency-graph-create-snapshot-success"}},"schema":{"properties":{"created_at":{"description":"The time at which the snapshot was created.","type":"string"},"id":{"description":"ID of the created snapshot.","type":"integer"},"message":{"description":"A message providing further details about the result, such as why the dependencies were not updated.","type":"string"},"result":{"description":"Either \"SUCCESS\", \"ACCEPTED\", or \"INVALID\". \"SUCCESS\" indicates that the snapshot was successfully created and the repository's dependencies were updated. \"ACCEPTED\" indicates that the snapshot was successfully created, but the repository's dependencies were not updated. \"INVALID\" indicates that the snapshot was malformed.","type":"string"}},"required":["id","created_at","result","message"],"type":"object"}}},"description":"Response"}}


operation_id: repos/list-deployments
path: /repos/{owner}/{repo}/deployments
method: GET
summary: List deployments
description: Simple filtering of deployments is available via query parameters:
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"description":"The SHA recorded at creation time.","in":"query","name":"sha","schema":{"default":"none","type":"string"},"style":"form"},{"description":"The name of the ref. This can be a branch, tag, or SHA.","in":"query","name":"ref","schema":{"default":"none","type":"string"},"style":"form"},{"description":"The name of the task for the deployment (e.g., `deploy` or `deploy:migrations`).","in":"query","name":"task","schema":{"default":"none","type":"string"},"style":"form"},{"description":"The name of the environment that was deployed to (e.g., `staging` or `production`).","in":"query","name":"environment","schema":{"default":"none","nullable":true,"type":"string"},"style":"form"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/deployment-items"}},"schema":{"items":{"$ref":"#/components/schemas/deployment"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}}}


operation_id: repos/create-deployment
path: /repos/{owner}/{repo}/deployments
method: POST
summary: Create a deployment
auth_scheme_ref: GitHubBearerToken
description:
  Deployments offer a few configurable parameters with certain defaults.

  The `ref` parameter can be any named branch, tag, or SHA. At GitHub we often deploy branches and verify them
  before we merge a pull request.

  The `environment` parameter allows deployments to be issued to different runtime environments. Teams often have
  multiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter
  makes it easier to track which environments have requested deployments. The default environment is `production`.

  The `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If
  the ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,
  the API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will
  return a failure response.

  By default, [commit statuses](https://docs.github.com/rest/commits/statuses) for every submitted context must be in a `success`
  state. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to
  specify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do
  not require any contexts or create any commit statuses, the deployment will always succeed.

  The `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text
  field that will be passed on when a deployment event is dispatched.

  The `task` parameter is used by the deployment system to allow different execution paths. In the web world this might
  be `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an
  application with debugging enabled.

  Merged branch response:

  You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating
  a deployment. This auto-merge happens when:
  *   Auto-merge option is enabled in the repository
  *   Topic branch does not include the latest changes on the base branch, which is `master` in the response example
  *   There are no merge conflicts

  If there are no new commits in the base branch, a new request to create a deployment should give a successful
  response.

  Merge conflict response:

  This error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can't
  be merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts.

  Failed commit status checks:

  This error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success`
  status for the commit to be deployed, but one or more of the required contexts do not have a state of `success`.

  OAuth app tokens and personal access tokens (classic) need the `repo` or `repo_deployment` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"advanced-example":{"summary":"Advanced example","value":{"auto_merge":false,"description":"Deploy request from hubot","payload":"{ \"deploy\": \"migrate\" }","ref":"topic-branch","required_contexts":["ci/janky","security/brakeman"]}},"simple-example":{"summary":"Simple example","value":{"description":"Deploy request from hubot","payload":"{ \"deploy\": \"migrate\" }","ref":"topic-branch"}}},"schema":{"properties":{"auto_merge":{"default":true,"description":"Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch.","type":"boolean"},"description":{"default":"","description":"Short description of the deployment.","nullable":true,"type":"string"},"environment":{"default":"production","description":"Name for the target deployment environment (e.g., `production`, `staging`, `qa`).","type":"string"},"payload":{"oneOf":[{"additionalProperties":true,"type":"object"},{"default":"","description":"JSON payload with extra information about the deployment.","type":"string"}]},"production_environment":{"description":"Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise.","type":"boolean"},"ref":{"description":"The ref to deploy. This can be a branch, tag, or SHA.","type":"string"},"required_contexts":{"description":"The [status](https://docs.github.com/rest/commits/statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.","items":{"type":"string"},"type":"array"},"task":{"default":"deploy","description":"Specifies a task to execute (e.g., `deploy` or `deploy:migrations`).","type":"string"},"transient_environment":{"default":false,"description":"Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false`","type":"boolean"}},"required":["ref"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"simple-example":{"$ref":"#/components/examples/deployment-simple-example"}},"schema":{"$ref":"#/components/schemas/deployment"}}},"description":"Response"},"202":{"content":{"application/json":{"examples":{"merged-branch-response":{"value":{"message":"Auto-merged master into topic-branch on deployment."}}},"schema":{"properties":{"message":{"type":"string"}},"type":"object"}}},"description":"Merged branch response"},"409":{"description":"Conflict when there is a merge conflict or the commit's status checks failed"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: repos/get-deployment
path: /repos/{owner}/{repo}/deployments/{deployment_id}
method: GET
summary: Get a deployment
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/deployment-id"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/deployment"}},"schema":{"$ref":"#/components/schemas/deployment"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: repos/delete-deployment
path: /repos/{owner}/{repo}/deployments/{deployment_id}
method: DELETE
summary: Delete a deployment
auth_scheme_ref: GitHubBearerToken
description:
  If the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment.

  To set a deployment as inactive, you must:

  *   Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment.
  *   Mark the active deployment as inactive by adding any non-successful deployment status.

  For more information, see "[Create a deployment](https://docs.github.com/rest/deployments/deployments/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/rest/deployments/statuses#create-a-deployment-status)."

  OAuth app tokens and personal access tokens (classic) need the `repo` or `repo_deployment` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/deployment-id"}],"requestBody":null}

output_schema:
  {"204":{"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed_simple"}}


operation_id: repos/list-deployment-statuses
path: /repos/{owner}/{repo}/deployments/{deployment_id}/statuses
method: GET
summary: List deployment statuses
description: Users with pull access can view deployment statuses for a deployment:
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/deployment-id"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/deployment-status-items"}},"schema":{"items":{"$ref":"#/components/schemas/deployment-status"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: repos/create-deployment-status
path: /repos/{owner}/{repo}/deployments/{deployment_id}/statuses
method: POST
summary: Create a deployment status
auth_scheme_ref: GitHubBearerToken
description:
  Users with `push` access can create deployment statuses for a given deployment.

  OAuth app tokens and personal access tokens (classic) need the `repo_deployment` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/deployment-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"description":"Deployment finished successfully.","environment":"production","log_url":"https://example.com/deployment/42/output","state":"success"}}},"schema":{"properties":{"auto_inactive":{"description":"Adds a new `inactive` status to all prior non-transient, non-production environment deployments with the same repository and `environment` name as the created status's deployment. An `inactive` status is only added to deployments that had a `success` state. Default: `true`","type":"boolean"},"description":{"default":"","description":"A short description of the status. The maximum description length is 140 characters.","type":"string"},"environment":{"description":"Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. If not defined, the environment of the previous status on the deployment will be used, if it exists. Otherwise, the environment of the deployment will be used.","type":"string"},"environment_url":{"default":"","description":"Sets the URL for accessing your environment. Default: `\"\"`","type":"string"},"log_url":{"default":"","description":"The full URL of the deployment's output. This parameter replaces `target_url`. We will continue to accept `target_url` to support legacy uses, but we recommend replacing `target_url` with `log_url`. Setting `log_url` will automatically set `target_url` to the same value. Default: `\"\"`","type":"string"},"state":{"description":"The state of the status. When you set a transient deployment to `inactive`, the deployment will be shown as `destroyed` in GitHub.","enum":["error","failure","inactive","in_progress","queued","pending","success"],"type":"string"},"target_url":{"default":"","description":"The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment.\n\n> [!NOTE]\n> It's recommended to use the `log_url` parameter, which replaces `target_url`.","type":"string"}},"required":["state"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/deployment-status"}},"schema":{"$ref":"#/components/schemas/deployment-status"}}},"description":"Response","headers":{"Location":{"example":"https://api.github.com/repos/octocat/example/deployments/42/statuses/1","schema":{"type":"string"},"style":"simple"}}},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: repos/get-deployment-status
path: /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}
method: GET
summary: Get a deployment status
description: Users with pull access can view a deployment status for a deployment:
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/deployment-id"},{"in":"path","name":"status_id","required":true,"schema":{"type":"integer"},"style":"simple"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/deployment-status"}},"schema":{"$ref":"#/components/schemas/deployment-status"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: repos/create-dispatch-event
path: /repos/{owner}/{repo}/dispatches
method: POST
summary: Create a repository dispatch event
auth_scheme_ref: GitHubBearerToken
description:
  You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see "[RepositoryDispatchEvent](https://docs.github.com/webhooks/event-payloads/#repository_dispatch)."

  The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow.

  This input example shows how you can use the `client_payload` as a test to debug your workflow.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"client_payload":{"integration":true,"unit":false},"event_type":"on-demand-test"}}},"schema":{"properties":{"client_payload":{"additionalProperties":true,"description":"JSON payload with extra information about the webhook event that your action or workflow may use. The maximum number of top-level properties is 10. The total size of the JSON payload must be less than 64KB.","maxProperties":10,"type":"object"},"event_type":{"description":"A custom webhook event name. Must be 100 characters or fewer.","maxLength":100,"minLength":1,"type":"string"}},"required":["event_type"],"type":"object"}}},"required":true}}

output_schema:
[cell repeats an earlier one in this file: 142 characters]


operation_id: repos/get-all-environments
path: /repos/{owner}/{repo}/environments
method: GET
summary: List environments
auth_scheme_ref: GitHubBearerToken
description:
  Lists the environments for a repository.

  Anyone with read access to the repository can use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.

input_schema:
[cell repeats an earlier one in this file: 200 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/environments"}},"schema":{"properties":{"environments":{"items":{"$ref":"#/components/schemas/environment"},"type":"array"},"total_count":{"description":"The number of environments in this repository","example":5,"type":"integer"}},"type":"object"}}},"description":"Response"}}


operation_id: repos/get-environment
path: /repos/{owner}/{repo}/environments/{environment_name}
method: GET
summary: Get an environment
auth_scheme_ref: GitHubBearerToken
description:
  > [!NOTE]
  > To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)."

  Anyone with read access to the repository can use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/environment-name"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/environment"}},"schema":{"$ref":"#/components/schemas/environment"}}},"description":"Response"}}


operation_id: repos/create-or-update-environment
path: /repos/{owner}/{repo}/environments/{environment_name}
method: PUT
summary: Create or update an environment
auth_scheme_ref: GitHubBearerToken
description:
  Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)."

  > [!NOTE]
  > To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)."

  > [!NOTE]
  > To create or update secrets for an environment, see "[GitHub Actions secrets](/rest/actions/secrets)."

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/environment-name"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"deployment_branch_policy":{"custom_branch_policies":true,"protected_branches":false},"prevent_self_review":false,"reviewers":[{"id":1,"type":"User"},{"id":1,"type":"Team"}],"wait_timer":30}}},"schema":{"additionalProperties":false,"nullable":true,"properties":{"deployment_branch_policy":{"$ref":"#/components/schemas/deployment-branch-policy-settings"},"prevent_self_review":{"$ref":"#/components/schemas/prevent-self-review"},"reviewers":{"description":"The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed.","items":{"properties":{"id":{"description":"The id of the user or team who can review the deployment","example":4532992,"type":"integer"},"type":{"$ref":"#/components/schemas/deployment-reviewer-type"}},"type":"object"},"nullable":true,"type":"array"},"wait_timer":{"$ref":"#/components/schemas/wait-timer"}},"type":"object"}}}}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/environment"}},"schema":{"$ref":"#/components/schemas/environment"}}},"description":"Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/basic-error"}}},"description":"Validation error when the environment name is invalid or when `protected_branches` and `custom_branch_policies` in `deployment_branch_policy` are set to the same value"}}


operation_id: repos/list-deployment-branch-policies
path: /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies
method: GET
summary: List deployment branch policies
auth_scheme_ref: GitHubBearerToken
description:
  Lists the deployment branch policies for an environment.

  Anyone with read access to the repository can use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/environment-name"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/deployment-branch-policies-list"}},"schema":{"properties":{"branch_policies":{"items":{"$ref":"#/components/schemas/deployment-branch-policy"},"type":"array"},"total_count":{"description":"The number of deployment branch policies for the environment.","example":2,"type":"integer"}},"required":["total_count","branch_policies"],"type":"object"}}},"description":"Response"}}


operation_id: repos/create-deployment-branch-policy
path: /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies
method: POST
summary: Create a deployment branch policy
auth_scheme_ref: GitHubBearerToken
description:
  Creates a deployment branch or tag policy for an environment.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/environment-name"}],"requestBody":{"content":{"application/json":{"examples":{"example-single-branch":{"summary":"Example of a single branch name pattern","value":{"name":"main","type":"branch"}},"example-single-tag":{"summary":"Example of a single tag name pattern","value":{"name":"v1","type":"tag"}},"example-wildcard":{"summary":"Example of a wildcard name pattern","value":{"name":"release/*"}}},"schema":{"$ref":"#/components/schemas/deployment-branch-policy-name-pattern-with-type"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"example-single-branch":{"$ref":"#/components/examples/deployment-branch-policy-single-branch"},"example-single-tag":{"$ref":"#/components/examples/deployment-branch-policy-single-tag"},"example-wildcard":{"$ref":"#/components/examples/deployment-branch-policy-wildcard"}},"schema":{"$ref":"#/components/schemas/deployment-branch-policy"}}},"description":"Response"},"303":{"description":"Response if the same branch name pattern already exists"},"404":{"description":"Not Found or `deployment_branch_policy.custom_branch_policies` property for the environment is set to false"}}


operation_id: repos/get-deployment-branch-policy
path: /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}
method: GET
summary: Get a deployment branch policy
auth_scheme_ref: GitHubBearerToken
description:
  Gets a deployment branch or tag policy for an environment.

  Anyone with read access to the repository can use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/environment-name"},{"$ref":"#/components/parameters/branch-policy-id"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/deployment-branch-policy-wildcard"}},"schema":{"$ref":"#/components/schemas/deployment-branch-policy"}}},"description":"Response"}}


operation_id: repos/update-deployment-branch-policy
path: /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}
method: PUT
summary: Update a deployment branch policy
auth_scheme_ref: GitHubBearerToken
description:
  Updates a deployment branch or tag policy for an environment.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/environment-name"},{"$ref":"#/components/parameters/branch-policy-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"name":"release/*"}}},"schema":{"$ref":"#/components/schemas/deployment-branch-policy-name-pattern"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/deployment-branch-policy-wildcard"}},"schema":{"$ref":"#/components/schemas/deployment-branch-policy"}}},"description":"Response"}}


operation_id: repos/delete-deployment-branch-policy
path: /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}
method: DELETE
summary: Delete a deployment branch policy
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Deletes a deployment branch or tag policy for an environment.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/environment-name"},{"$ref":"#/components/parameters/branch-policy-id"}],"requestBody":null}


operation_id: repos/get-all-deployment-protection-rules
path: /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules
method: GET
summary: Get all deployment protection rules for an environment
auth_scheme_ref: GitHubBearerToken
description:
  Gets all custom deployment protection rules that are enabled for an environment. Anyone with read access to the repository can use this endpoint. For more information about environments, see "[Using environments for deployment](https://docs.github.com/actions/deployment/targeting-different-environments/using-environments-for-deployment)."

  For more information about the app that is providing this custom deployment rule, see the [documentation for the `GET /apps/{app_slug}` endpoint](https://docs.github.com/rest/apps/apps#get-an-app).

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/environment-name"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/owner"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"value":{"custom_deployment_protection_rules":[{"app":{"id":1,"integration_url":"https://api.github.com/apps/a-custom-app","node_id":"GHT58kRlcGxveW1lbnRTdTY!bbcy","slug":"a-custom-app"},"enabled":true,"id":3,"node_id":"IEH37kRlcGxveW1lbnRTdGF0ddiv"},{"app":{"id":1,"integration_url":"https://api.github.com/apps/another-custom-app","node_id":"UHVE67RlcGxveW1lbnRTdTY!jfeuy","slug":"another-custom-app"},"enabled":true,"id":4,"node_id":"MDE2OkRlcGxveW1lbnRTdHJ41128"}],"total_count":2}}},"schema":{"example":{"$ref":"#/components/examples/deployment-protection-rules"},"properties":{"custom_deployment_protection_rules":{"items":{"$ref":"#/components/schemas/deployment-protection-rule"},"type":"array"},"total_count":{"description":"The number of enabled custom deployment protection rules for this environment","example":10,"type":"integer"}},"type":"object"}}},"description":"List of deployment protection rules"}}


operation_id: repos/create-deployment-protection-rule
path: /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules
method: POST
summary: Create a custom deployment protection rule on an environment
auth_scheme_ref: GitHubBearerToken
description:
  Enable a custom deployment protection rule for an environment.

  The authenticated user must have admin or owner permissions to the repository to use this endpoint.

  For more information about the app that is providing this custom deployment rule, see the [documentation for the `GET /apps/{app_slug}` endpoint](https://docs.github.com/rest/apps/apps#get-an-app), as well as the [guide to creating custom deployment protection rules](https://docs.github.com/actions/managing-workflow-runs-and-deployments/managing-deployments/creating-custom-deployment-protection-rules).

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/environment-name"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/owner"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"integration_id":5}}},"schema":{"properties":{"integration_id":{"description":"The ID of the custom app that will be enabled on the environment.","type":"integer"}},"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/deployment-protection-rule"}},"schema":{"$ref":"#/components/schemas/deployment-protection-rule"}}},"description":"The enabled custom deployment protection rule"}}


operation_id: repos/list-custom-deployment-rule-integrations
path: /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps
method: GET
summary: List custom deployment rule integrations available for an environment
auth_scheme_ref: GitHubBearerToken
description:
  Gets all custom deployment protection rule integrations that are available for an environment.

  The authenticated user must have admin or owner permissions to the repository to use this endpoint.

  For more information about environments, see "[Using environments for deployment](https://docs.github.com/actions/deployment/targeting-different-environments/using-environments-for-deployment)."

  For more information about the app that is providing this custom deployment rule, see "[GET an app](https://docs.github.com/rest/apps/apps#get-an-app)".

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/environment-name"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per-page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/custom-deployment-protection-rule-apps"}},"schema":{"properties":{"available_custom_deployment_protection_rule_integrations":{"items":{"$ref":"#/components/schemas/custom-deployment-rule-app"},"type":"array"},"total_count":{"description":"The total number of custom deployment protection rule integrations available for this environment.","example":35,"type":"integer"}},"type":"object"}}},"description":"A list of custom deployment rule integrations available for this environment."}}


operation_id: repos/get-custom-deployment-protection-rule
method: GET
summary: Get a custom deployment protection rule
auth_scheme_ref: GitHubBearerToken
path:
  /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}

description:
  Gets an enabled custom deployment protection rule for an environment. Anyone with read access to the repository can use this endpoint. For more information about environments, see "[Using environments for deployment](https://docs.github.com/actions/deployment/targeting-different-environments/using-environments-for-deployment)."

  For more information about the app that is providing this custom deployment rule, see [`GET /apps/{app_slug}`](https://docs.github.com/rest/apps/apps#get-an-app).

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/environment-name"},{"$ref":"#/components/parameters/protection-rule-id"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/deployment-protection-rule"}},"schema":{"$ref":"#/components/schemas/deployment-protection-rule"}}},"description":"Response"}}


operation_id: repos/disable-deployment-protection-rule
method: DELETE
summary: Disable a custom protection rule for an environment
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
path:
  /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}

description:
  Disables a custom deployment protection rule for an environment.

  The authenticated user must have admin or owner permissions to the repository to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/environment-name"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/protection-rule-id"}],"requestBody":null}


operation_id: actions/list-environment-secrets
path: /repos/{owner}/{repo}/environments/{environment_name}/secrets
method: GET
summary: List environment secrets
auth_scheme_ref: GitHubBearerToken
description:
  Lists all secrets available in an environment without revealing their
  encrypted values.

  Authenticated users must have collaborator access to a repository to create, update, or read secrets.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/environment-name"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
[cell repeats an earlier one in this file: 398 characters]


operation_id: actions/get-environment-public-key
path: /repos/{owner}/{repo}/environments/{environment_name}/secrets/public-key
method: GET
summary: Get an environment public key
auth_scheme_ref: GitHubBearerToken
description:
  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.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/environment-name"}],"requestBody":null}

output_schema:
[cell repeats an earlier one in this file: 202 characters]


operation_id: actions/get-environment-secret
path: /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}
method: GET
summary: Get an environment secret
auth_scheme_ref: GitHubBearerToken
description:
  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.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/environment-name"},{"$ref":"#/components/parameters/secret-name"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/actions-secret"}},"schema":{"$ref":"#/components/schemas/actions-secret"}}},"description":"Response"}}


operation_id: actions/create-or-update-environment-secret
path: /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}
method: PUT
summary: Create or update an environment secret
auth_scheme_ref: GitHubBearerToken
description:
  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.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/environment-name"},{"$ref":"#/components/parameters/secret-name"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"encrypted_value":"c2VjcmV0","key_id":"012345678912345678"}}},"schema":{"properties":{"encrypted_value":{"description":"Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an environment public key](https://docs.github.com/rest/actions/secrets#get-an-environment-public-key) endpoint.","pattern":"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$","type":"string"},"key_id":{"description":"ID of the key you used to encrypt the secret.","type":"string"}},"required":["encrypted_value","key_id"],"type":"object"}}},"required":true}}

output_schema:
[cell repeats an earlier one in this file: 226 characters]


operation_id: actions/delete-environment-secret
path: /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}
method: DELETE
summary: Delete an environment secret
output_schema: {"204":{"description":"Default response"}}
auth_scheme_ref: GitHubBearerToken
description:
  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.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/environment-name"},{"$ref":"#/components/parameters/secret-name"}],"requestBody":null}


operation_id: actions/list-environment-variables
path: /repos/{owner}/{repo}/environments/{environment_name}/variables
method: GET
summary: List environment variables
auth_scheme_ref: GitHubBearerToken
description:
  Lists all environment variables.

  Authenticated users must have collaborator access to a repository to create, update, or read variables.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/environment-name"},{"$ref":"#/components/parameters/variables-per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
[cell repeats an earlier one in this file: 407 characters]


operation_id: actions/create-environment-variable
path: /repos/{owner}/{repo}/environments/{environment_name}/variables
method: POST
summary: Create an environment variable
auth_scheme_ref: GitHubBearerToken
description:
  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.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/environment-name"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"name":"USERNAME","value":"octocat"}}},"schema":{"properties":{"name":{"description":"The name of the variable.","type":"string"},"value":{"description":"The value of the variable.","type":"string"}},"required":["name","value"],"type":"object"}}},"required":true}}

output_schema:
[cell repeats an earlier one in this file: 147 characters]


operation_id: actions/get-environment-variable
path: /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}
method: GET
summary: Get an environment variable
auth_scheme_ref: GitHubBearerToken
description:
  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.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/environment-name"},{"$ref":"#/components/parameters/variable-name"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/actions-variable"}},"schema":{"$ref":"#/components/schemas/actions-variable"}}},"description":"Response"}}


operation_id: actions/delete-environment-variable
path: /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}
method: DELETE
summary: Delete an environment variable
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  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.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/variable-name"},{"$ref":"#/components/parameters/environment-name"}],"requestBody":null}


operation_id: actions/update-environment-variable
path: /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}
method: PATCH
summary: Update an environment variable
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Updates 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 app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/variable-name"},{"$ref":"#/components/parameters/environment-name"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"name":"USERNAME","value":"octocat"}}},"schema":{"properties":{"name":{"description":"The name of the variable.","type":"string"},"value":{"description":"The value of the variable.","type":"string"}},"type":"object"}}},"required":true}}


operation_id: activity/list-repo-events
path: /repos/{owner}/{repo}/events
method: GET
summary: List repository events
auth_scheme_ref: GitHubBearerToken
description:
[cell repeats an earlier one in this file: 139 characters]

input_schema:
[cell repeats an earlier one in this file: 200 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"200-response":{"$ref":"#/components/examples/repo-events-items"}},"schema":{"items":{"$ref":"#/components/schemas/event"},"type":"array"}}},"description":"Response"}}


operation_id: repos/list-forks
path: /repos/{owner}/{repo}/forks
method: GET
summary: List forks
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"description":"The sort order. `stargazers` will sort by star count.","in":"query","name":"sort","schema":{"default":"newest","enum":["newest","oldest","stargazers","watchers"],"type":"string"},"style":"form"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/minimal-repository-items-2"}},"schema":{"items":{"$ref":"#/components/schemas/minimal-repository"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"400":{"$ref":"#/components/responses/bad_request"}}


operation_id: repos/create-fork
path: /repos/{owner}/{repo}/forks
method: POST
summary: Create a fork
auth_scheme_ref: GitHubBearerToken
description:
  Create a fork for the authenticated user.

  > [!NOTE]
  > Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api).

  > [!NOTE]
  > Although this endpoint works with GitHub Apps, the GitHub App must be installed on the destination account with access to all repositories and on the source account with access to the source repository.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"default_branch_only":true,"name":"Hello-World","organization":"octocat"}}},"schema":{"nullable":true,"properties":{"default_branch_only":{"description":"When forking from an existing repository, fork with only the default branch.","type":"boolean"},"name":{"description":"When forking from an existing repository, a new name for the fork.","type":"string"},"organization":{"description":"Optional parameter to specify the organization name if forking into an organization.","type":"string"}},"type":"object"}}}}}

output_schema:
  {"202":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/full-repository"}},"schema":{"$ref":"#/components/schemas/full-repository"}}},"description":"Response"},"400":{"$ref":"#/components/responses/bad_request"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: git/create-blob
path: /repos/{owner}/{repo}/git/blobs
method: POST
summary: Create a blob
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"content":"Content of the blob","encoding":"utf-8"}}},"schema":{"properties":{"content":{"description":"The new blob's content.","type":"string"},"encoding":{"default":"utf-8","description":"The encoding used for `content`. Currently, `\"utf-8\"` and `\"base64\"` are supported.","type":"string"}},"required":["content"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/short-blob"}},"schema":{"$ref":"#/components/schemas/short-blob"}}},"description":"Response","headers":{"Location":{"example":"https://api.github.com/repos/octocat/example/git/blobs/3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15","schema":{"type":"string"},"style":"simple"}}},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"409":{"$ref":"#/components/responses/conflict"},"422":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/validation-error"},{"$ref":"#/components/schemas/repository-rule-violation-error"}]}}},"description":"Validation failed"}}


operation_id: git/get-blob
path: /repos/{owner}/{repo}/git/blobs/{file_sha}
method: GET
summary: Get a blob
auth_scheme_ref: GitHubBearerToken
description:
  The `content` in the response will always be Base64 encoded.

  This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."

  - **`application/vnd.github.raw+json`**: Returns the raw blob data.
  - **`application/vnd.github+json`**: Returns a JSON representation of the blob with `content` as a base64 encoded string. This is the default if no media type is specified.

  **Note** This endpoint supports blobs up to 100 megabytes in size.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"in":"path","name":"file_sha","required":true,"schema":{"type":"string"},"style":"simple"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/blob"}},"schema":{"$ref":"#/components/schemas/blob"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"409":{"$ref":"#/components/responses/conflict"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: git/create-commit
path: /repos/{owner}/{repo}/git/commits
method: POST
summary: Create a commit
auth_scheme_ref: GitHubBearerToken
description:
  Creates a new Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects).

  **Signature verification object**

  The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:

  | Name | Type | Description |
  | ---- | ---- | ----------- |
  | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. |
  | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. |
  | `signature` | `string` | The signature that was extracted from the commit. |
  | `payload` | `string` | The value that was signed. |
  | `verified_at` | `string` | The date the signature was verified by GitHub. |

  These are the possible values for `reason` in the `verification` object:

  | Value | Description |
  | ----- | ----------- |
  | `expired_key` | The key that made the signature is expired. |
  | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. |
  | `gpgverify_error` | There was an error communicating with the signature verification service. |
  | `gpgverify_unavailable` | The signature verification service is currently unavailable. |
  | `unsigned` | The object does not include a signature. |
  | `unknown_signature_type` | A non-PGP signature was found in the commit. |
  | `no_user` | No user was associated with the `committer` email address in the commit. |
  | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. |
  | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |
  | `unknown_key` | The key that made the signature has not been registered with any user's account. |
  | `malformed_signature` | There was an error parsing the signature. |
  | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
  | `valid` | None of the above errors applied, so the signature is considered to be verified. |

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"author":{"date":"2008-07-09T16:13:30+12:00","email":"octocat@github.com","name":"Mona Octocat"},"message":"my commit message","parents":["7d1b31e74ee336d15cbd21741bc88a537ed063a0"],"signature":"-----BEGIN PGP SIGNATURE-----\n\niQIzBAABAQAdFiEESn/54jMNIrGSE6Tp6cQjvhfv7nAFAlnT71cACgkQ6cQjvhfv\n7nCWwA//XVqBKWO0zF+bZl6pggvky3Oc2j1pNFuRWZ29LXpNuD5WUGXGG209B0hI\nDkmcGk19ZKUTnEUJV2Xd0R7AW01S/YSub7OYcgBkI7qUE13FVHN5ln1KvH2all2n\n2+JCV1HcJLEoTjqIFZSSu/sMdhkLQ9/NsmMAzpf/iIM0nQOyU4YRex9eD1bYj6nA\nOQPIDdAuaTQj1gFPHYLzM4zJnCqGdRlg0sOM/zC5apBNzIwlgREatOYQSCfCKV7k\nnrU34X8b9BzQaUx48Qa+Dmfn5KQ8dl27RNeWAqlkuWyv3pUauH9UeYW+KyuJeMkU\n+NyHgAsWFaCFl23kCHThbLStMZOYEnGagrd0hnm1TPS4GJkV4wfYMwnI4KuSlHKB\njHl3Js9vNzEUQipQJbgCgTiWvRJoK3ENwBTMVkKHaqT4x9U4Jk/XZB6Q8MA09ezJ\n3QgiTjTAGcum9E9QiJqMYdWQPWkaBIRRz5cET6HPB48YNXAAUsfmuYsGrnVLYbG+\nUpC6I97VybYHTy2O9XSGoaLeMI9CsFn38ycAxxbWagk5mhclNTP5mezIq6wKSwmr\nX11FW3n1J23fWZn5HJMBsRnUCgzqzX3871IqLYHqRJ/bpZ4h20RhTyPj5c/z7QXp\neSakNQMfbbMcljkha+ZMuVQX1K9aRlVqbmv3ZMWh+OijLYVU2bc=\n=5Io4\n-----END PGP SIGNATURE-----\n","tree":"827efc6d56897b048c772eb4087f854f46256132"}}},"schema":{"properties":{"author":{"description":"Information about the author of the commit. By default, the `author` will be the authenticated user and the current date. See the `author` and `committer` object below for details.","properties":{"date":{"description":"Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.","format":"date-time","type":"string"},"email":{"description":"The email of the author (or committer) of the commit","type":"string"},"name":{"description":"The name of the author (or committer) of the commit","type":"string"}},"required":["name","email"],"type":"object"},"committer":{"description":"Information about the person who is making the commit. By default, `committer` will use the information set in `author`. See the `author` and `committer` object below for details.","properties":{"date":{"description":"Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.","format":"date-time","type":"string"},"email":{"description":"The email of the author (or committer) of the commit","type":"string"},"name":{"description":"The name of the author (or committer) of the commit","type":"string"}},"type":"object"},"message":{"description":"The commit message","type":"string"},"parents":{"description":"The full SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided.","items":{"type":"string"},"type":"array"},"signature":{"description":"The [PGP signature](https://en.wikipedia.org/wiki/Pretty_Good_Privacy) of the commit. GitHub adds the signature to the `gpgsig` header of the created commit. For a commit signature to be verifiable by Git or GitHub, it must be an ASCII-armored detached PGP signature over the string commit as it would be written to the object database. To pass a `signature` parameter, you need to first manually create a valid PGP signature, which can be complicated. You may find it easier to [use the command line](https://git-scm.com/book/id/v2/Git-Tools-Signing-Your-Work) to create signed commits.","type":"string"},"tree":{"description":"The SHA of the tree object this commit points to","type":"string"}},"required":["message","tree"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/git-commit"}},"schema":{"$ref":"#/components/schemas/git-commit"}}},"description":"Response","headers":{"Location":{"example":"https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd","schema":{"type":"string"},"style":"simple"}}},"404":{"$ref":"#/components/responses/not_found"},"409":{"$ref":"#/components/responses/conflict"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: git/get-commit
path: /repos/{owner}/{repo}/git/commits/{commit_sha}
method: GET
summary: Get a commit object
auth_scheme_ref: GitHubBearerToken
description:
  Gets a Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects).

  To get the contents of a commit, see "[Get a commit](/rest/commits/commits#get-a-commit)."

  **Signature verification object**

  The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:

  | Name | Type | Description |
  | ---- | ---- | ----------- |
  | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. |
  | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. |
  | `signature` | `string` | The signature that was extracted from the commit. |
  | `payload` | `string` | The value that was signed. |
  | `verified_at` | `string` | The date the signature was verified by GitHub. |

  These are the possible values for `reason` in the `verification` object:

  | Value | Description |
  | ----- | ----------- |
  | `expired_key` | The key that made the signature is expired. |
  | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. |
  | `gpgverify_error` | There was an error communicating with the signature verification service. |
  | `gpgverify_unavailable` | The signature verification service is currently unavailable. |
  | `unsigned` | The object does not include a signature. |
  | `unknown_signature_type` | A non-PGP signature was found in the commit. |
  | `no_user` | No user was associated with the `committer` email address in the commit. |
  | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. |
  | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |
  | `unknown_key` | The key that made the signature has not been registered with any user's account. |
  | `malformed_signature` | There was an error parsing the signature. |
  | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
  | `valid` | None of the above errors applied, so the signature is considered to be verified. |

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/commit-sha"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/git-commit-2"}},"schema":{"$ref":"#/components/schemas/git-commit"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"409":{"$ref":"#/components/responses/conflict"}}


operation_id: git/list-matching-refs
path: /repos/{owner}/{repo}/git/matching-refs/{ref}
method: GET
summary: List matching references
auth_scheme_ref: GitHubBearerToken
description:
  Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/<branch name>` for branches and `tags/<tag name>` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array.

  When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`.

  > [!NOTE]
  > You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)".

  If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/git-ref-only"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/git-ref-items"}},"schema":{"items":{"$ref":"#/components/schemas/git-ref"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"409":{"$ref":"#/components/responses/conflict"}}


operation_id: git/get-ref
path: /repos/{owner}/{repo}/git/ref/{ref}
method: GET
summary: Get a reference
auth_scheme_ref: GitHubBearerToken
description:
  Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/<branch name>` for branches and `tags/<tag name>` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned.

  > [!NOTE]
  > You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)".

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/git-ref-only"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/git-ref"}},"schema":{"$ref":"#/components/schemas/git-ref"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"409":{"$ref":"#/components/responses/conflict"}}


operation_id: git/create-ref
path: /repos/{owner}/{repo}/git/refs
method: POST
summary: Create a reference
auth_scheme_ref: GitHubBearerToken
description:
  Creates a reference for your repository. You are unable to create new references for empty repositories, even if the commit SHA-1 hash used exists. Empty repositories are repositories without branches.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"ref":"refs/heads/featureA","sha":"aa218f56b14c9653891f9e74264a383fa43fefbd"}}},"schema":{"properties":{"ref":{"description":"The name of the fully qualified reference (ie: `refs/heads/master`). If it doesn't start with 'refs' and have at least two slashes, it will be rejected.","type":"string"},"sha":{"description":"The SHA1 value for this reference.","type":"string"}},"required":["ref","sha"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/git-ref"}},"schema":{"$ref":"#/components/schemas/git-ref"}}},"description":"Response","headers":{"Location":{"example":"https://api.github.com/repos/octocat/Hello-World/git/refs/heads/featureA","schema":{"type":"string"},"style":"simple"}}},"409":{"$ref":"#/components/responses/conflict"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: git/delete-ref
path: /repos/{owner}/{repo}/git/refs/{ref}
method: DELETE
summary: Delete a reference
description: Deletes the provided reference.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/git-ref-only"}],"requestBody":null}

output_schema:
  {"204":{"description":"Response"},"409":{"$ref":"#/components/responses/conflict"},"422":{"description":"Validation failed, an attempt was made to delete the default branch, or the endpoint has been spammed."}}


operation_id: git/update-ref
path: /repos/{owner}/{repo}/git/refs/{ref}
method: PATCH
summary: Update a reference
auth_scheme_ref: GitHubBearerToken
description:
  Updates the provided reference to point to a new SHA. For more information, see "[Git References](https://git-scm.com/book/en/v2/Git-Internals-Git-References)" in the Git documentation.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/git-ref-only"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"force":true,"sha":"aa218f56b14c9653891f9e74264a383fa43fefbd"}}},"schema":{"properties":{"force":{"default":false,"description":"Indicates whether to force the update or to make sure the update is a fast-forward update. Leaving this out or setting it to `false` will make sure you're not overwriting work.","type":"boolean"},"sha":{"description":"The SHA1 value to set this reference to","type":"string"}},"required":["sha"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/git-ref"}},"schema":{"$ref":"#/components/schemas/git-ref"}}},"description":"Response"},"409":{"$ref":"#/components/responses/conflict"},"422":{"$ref":"#/components/responses/validation_failed"}}


