# endpoints

operation_id: git/create-tag
path: /repos/{owner}/{repo}/git/tags
method: POST
summary: Create a tag object
auth_scheme_ref: GitHubBearerToken
description:
  Note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then [create](https://docs.github.com/rest/git/refs#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/rest/git/refs#create-a-reference) the tag reference - this call would be unnecessary.

  **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"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"message":"initial version","object":"c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c","tag":"v0.0.1","tagger":{"date":"2011-06-17T14:53:35-07:00","email":"octocat@github.com","name":"Monalisa Octocat"},"type":"commit"}}},"schema":{"properties":{"message":{"description":"The tag message.","type":"string"},"object":{"description":"The SHA of the git object this is tagging.","type":"string"},"tag":{"description":"The tag's name. This is typically a version (e.g., \"v0.0.1\").","type":"string"},"tagger":{"description":"An object with information about the individual creating the tag.","properties":{"date":{"description":"When this object was tagged. 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 of the tag","type":"string"},"name":{"description":"The name of the author of the tag","type":"string"}},"required":["name","email"],"type":"object"},"type":{"description":"The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`.","enum":["commit","tree","blob"],"type":"string"}},"required":["tag","message","object","type"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/git-tag"}},"schema":{"$ref":"#/components/schemas/git-tag"}}},"description":"Response","headers":{"Location":{"example":"https://api.github.com/repos/octocat/Hello-World/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac","schema":{"type":"string"},"style":"simple"}}},"409":{"$ref":"#/components/responses/conflict"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: git/get-tag
path: /repos/{owner}/{repo}/git/tags/{tag_sha}
method: GET
summary: Get a tag
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"},{"in":"path","name":"tag_sha","required":true,"schema":{"type":"string"},"style":"simple"}],"requestBody":null}

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


operation_id: git/create-tree
path: /repos/{owner}/{repo}/git/trees
method: POST
summary: Create a tree
auth_scheme_ref: GitHubBearerToken
description:
  The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure.

  If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "[Create a commit](https://docs.github.com/rest/git/commits#create-a-commit)" and "[Update a reference](https://docs.github.com/rest/git/refs#update-a-reference)."

  Returns an error if you try to delete a file that does not exist.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"base_tree":"9fb037999f264ba9a7fc6274d15fa3ae2ab98312","tree":[{"mode":"100644","path":"file.rb","sha":"44b4fc6d56897b048c772eb4087f854f46256132","type":"blob"}]}}},"schema":{"properties":{"base_tree":{"description":"The SHA1 of an existing Git tree object which will be used as the base for the new tree. If provided, a new Git tree object will be created from entries in the Git tree object pointed to by `base_tree` and entries defined in the `tree` parameter. Entries defined in the `tree` parameter will overwrite items from `base_tree` with the same `path`. If you're creating new changes on a branch, then normally you'd set `base_tree` to the SHA1 of the Git tree object of the current latest commit on the branch you're working on.\nIf not provided, GitHub will create a new Git tree object from only the entries defined in the `tree` parameter. If you create a new commit pointing to such a tree, then all files which were a part of the parent commit's tree and were not defined in the `tree` parameter will be listed as deleted by the new commit.","type":"string"},"tree":{"description":"Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure.","items":{"properties":{"content":{"description":"The content you want this file to have. GitHub will write this blob out and use that SHA for this entry. Use either this, or `tree.sha`.  \n  \n**Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error.","type":"string"},"mode":{"description":"The file mode; one of `100644` for file (blob), `100755` for executable (blob), `040000` for subdirectory (tree), `160000` for submodule (commit), or `120000` for a blob that specifies the path of a symlink.","enum":["100644","100755","040000","160000","120000"],"type":"string"},"path":{"description":"The file referenced in the tree.","type":"string"},"sha":{"description":"The SHA1 checksum ID of the object in the tree. Also called `tree.sha`. If the value is `null` then the file will be deleted.  \n  \n**Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error.","nullable":true,"type":"string"},"type":{"description":"Either `blob`, `tree`, or `commit`.","enum":["blob","tree","commit"],"type":"string"}},"type":"object"},"type":"array"}},"required":["tree"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/git-tree"}},"schema":{"$ref":"#/components/schemas/git-tree"}}},"description":"Response","headers":{"Location":{"example":"https://api.github.com/repos/octocat/Hello-World/trees/cd8274d15fa3ae2ab983129fb037999f264ba9a7","schema":{"type":"string"},"style":"simple"}}},"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/get-tree
path: /repos/{owner}/{repo}/git/trees/{tree_sha}
method: GET
summary: Get a tree
auth_scheme_ref: GitHubBearerToken
description:
  Returns a single tree using the SHA1 value or ref name for that tree.

  If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time.

  > [!NOTE]
  > The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"description":"The SHA1 value or ref (branch or tag) name of the tree.","in":"path","name":"tree_sha","required":true,"schema":{"type":"string"},"style":"simple","x-multi-segment":true},{"description":"Setting this parameter to any value returns the objects or subtrees referenced by the tree specified in `:tree_sha`. For example, setting `recursive` to any of the following will enable returning objects or subtrees: `0`, `1`, `\"true\"`, and `\"false\"`. Omit this parameter to prevent recursively returning objects or subtrees.","in":"query","name":"recursive","schema":{"type":"string"},"style":"form"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default-response":{"$ref":"#/components/examples/git-tree-default-response"},"response-recursively-retrieving-a-tree":{"$ref":"#/components/examples/git-tree-response-recursively-retrieving-a-tree"}},"schema":{"$ref":"#/components/schemas/git-tree"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"409":{"$ref":"#/components/responses/conflict"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: repos/get-hash-algorithm
path: /repos/{owner}/{repo}/hash-algorithm
method: GET
summary: Get the hash algorithm for a repository
description: Returns the hash algorithm used to store repository objects.
auth_scheme_ref: GitHubBearerToken
input_schema:
[cell repeats an earlier one in this file: 116 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"value":{"hash_algorithm":"sha1"}}},"schema":{"$ref":"#/components/schemas/repository-hash-algorithm"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: repos/list-webhooks
path: /repos/{owner}/{repo}/hooks
method: GET
summary: List repository webhooks
auth_scheme_ref: GitHubBearerToken
description:
  Lists webhooks for a repository. `last response` may return null if there have not been any deliveries within 30 days.

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

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


operation_id: repos/create-webhook
path: /repos/{owner}/{repo}/hooks
method: POST
summary: Create a repository webhook
auth_scheme_ref: GitHubBearerToken
description:
  Repositories can have multiple webhooks installed. Each webhook should have a unique `config`. Multiple webhooks can
  share the same `config` as long as those webhooks do not have any `events` that overlap.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"active":true,"config":{"content_type":"json","insecure_ssl":"0","url":"https://example.com/webhook"},"events":["push","pull_request"],"name":"web"}}},"schema":{"additionalProperties":false,"nullable":true,"properties":{"active":{"default":true,"description":"Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications.","type":"boolean"},"config":{"description":"Key/value pairs to provide settings for this webhook.","properties":{"content_type":{"$ref":"#/components/schemas/webhook-config-content-type"},"insecure_ssl":{"$ref":"#/components/schemas/webhook-config-insecure-ssl"},"secret":{"$ref":"#/components/schemas/webhook-config-secret"},"url":{"$ref":"#/components/schemas/webhook-config-url"}},"type":"object"},"events":{"default":["push"],"description":"Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for.","items":{"type":"string"},"type":"array"},"name":{"description":"Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`.","type":"string"}},"type":"object"}}}}}

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


operation_id: repos/get-webhook
path: /repos/{owner}/{repo}/hooks/{hook_id}
method: GET
summary: Get a repository webhook
auth_scheme_ref: GitHubBearerToken
description:
  Returns a webhook configured in a repository. To get only the webhook `config` properties, see "[Get a webhook configuration for a repository](/rest/webhooks/repo-config#get-a-webhook-configuration-for-a-repository)."

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

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


operation_id: repos/delete-webhook
path: /repos/{owner}/{repo}/hooks/{hook_id}
method: DELETE
summary: Delete a repository webhook
output_schema: {"204":{"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}
auth_scheme_ref: GitHubBearerToken
description:
  Delete a webhook for an organization.

  The authenticated user must be a repository owner, or have admin access in the repository, to delete the webhook.

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


operation_id: repos/update-webhook
path: /repos/{owner}/{repo}/hooks/{hook_id}
method: PATCH
summary: Update a repository webhook
auth_scheme_ref: GitHubBearerToken
description:
  Updates a webhook configured in a repository. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for a repository](/rest/webhooks/repo-config#update-a-webhook-configuration-for-a-repository)."

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/hook-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"active":true,"add_events":["pull_request"]}}},"schema":{"properties":{"active":{"default":true,"description":"Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications.","type":"boolean"},"add_events":{"description":"Determines a list of events to be added to the list of events that the Hook triggers for.","items":{"type":"string"},"type":"array"},"config":{"$ref":"#/components/schemas/webhook-config"},"events":{"default":["push"],"description":"Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events.","items":{"type":"string"},"type":"array"},"remove_events":{"description":"Determines a list of events to be removed from the list of events that the Hook triggers for.","items":{"type":"string"},"type":"array"}},"type":"object"}}},"required":true}}

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


operation_id: repos/get-webhook-config-for-repo
path: /repos/{owner}/{repo}/hooks/{hook_id}/config
method: GET
summary: Get a webhook configuration for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Returns the webhook configuration for a repository. To get more information about the webhook, including the `active` state and `events`, use "[Get a repository webhook](/rest/webhooks/repos#get-a-repository-webhook)."

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

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

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


operation_id: repos/update-webhook-config-for-repo
path: /repos/{owner}/{repo}/hooks/{hook_id}/config
method: PATCH
summary: Update a webhook configuration for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Updates the webhook configuration for a repository. To update more information about the webhook, including the `active` state and `events`, use "[Update a repository webhook](/rest/webhooks/repos#update-a-repository-webhook)."

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/hook-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Example of updating content type and URL","value":{"content_type":"json","url":"https://example.com/webhook"}}},"schema":{"additionalProperties":false,"properties":{"content_type":{"$ref":"#/components/schemas/webhook-config-content-type"},"insecure_ssl":{"$ref":"#/components/schemas/webhook-config-insecure-ssl"},"secret":{"$ref":"#/components/schemas/webhook-config-secret"},"url":{"$ref":"#/components/schemas/webhook-config-url"}},"type":"object"}}}}}

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


operation_id: repos/list-webhook-deliveries
path: /repos/{owner}/{repo}/hooks/{hook_id}/deliveries
method: GET
summary: List deliveries for a repository webhook
description: Returns a list of webhook deliveries for a webhook configured in a repository.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/hook-id"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/cursor"},{"$ref":"#/components/parameters/webhook-delivery-status"}],"requestBody":null}

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


operation_id: repos/get-webhook-delivery
path: /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}
method: GET
summary: Get a delivery for a repository webhook
description: Returns a delivery for a webhook configured in a repository.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/hook-id"},{"$ref":"#/components/parameters/delivery-id"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/hook-delivery"}},"schema":{"$ref":"#/components/schemas/hook-delivery"}}},"description":"Response"},"400":{"$ref":"#/components/responses/bad_request"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: repos/ping-webhook
path: /repos/{owner}/{repo}/hooks/{hook_id}/pings
method: POST
summary: Ping a repository webhook
output_schema: {"204":{"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}
auth_scheme_ref: GitHubBearerToken
description:
  This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook.

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


operation_id: repos/test-push-webhook
path: /repos/{owner}/{repo}/hooks/{hook_id}/tests
method: POST
summary: Test the push repository webhook
output_schema: {"204":{"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}
auth_scheme_ref: GitHubBearerToken
description:
  This will trigger the hook with the latest push to the current repository if the hook is subscribed to `push` events. If the hook is not subscribed to `push` events, the server will respond with 204 but no test POST will be generated.

  > [!NOTE]
  > Previously `/repos/:owner/:repo/hooks/:hook_id/test`

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


operation_id: repos/check-immutable-releases
path: /repos/{owner}/{repo}/immutable-releases
method: GET
summary: Check if immutable releases are enabled for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Shows whether immutable releases are enabled or disabled. Also identifies whether immutability is being
  enforced by the repository owner.  The authenticated user must have admin read access to the repository.

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

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"value":{"enabled":true,"enforced_by_owner":false}}},"schema":{"$ref":"#/components/schemas/check-immutable-releases"}}},"description":"Response if immutable releases are enabled"},"404":{"description":"Not Found if immutable releases are not enabled for the repository"}}


operation_id: repos/enable-immutable-releases
path: /repos/{owner}/{repo}/immutable-releases
method: PUT
summary: Enable immutable releases
auth_scheme_ref: GitHubBearerToken
description:
  Enables immutable releases for a repository. The authenticated user must have admin access to the repository.

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

output_schema:
  {"204":{"$ref":"#/components/responses/no_content"},"409":{"$ref":"#/components/responses/conflict"}}


operation_id: repos/disable-immutable-releases
path: /repos/{owner}/{repo}/immutable-releases
method: DELETE
summary: Disable immutable releases
auth_scheme_ref: GitHubBearerToken
description:
  Disables immutable releases for a repository. The authenticated user must have admin access to the repository.

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

output_schema:
  {"204":{"$ref":"#/components/responses/no_content"},"409":{"$ref":"#/components/responses/conflict"}}


operation_id: migrations/get-import-status
path: /repos/{owner}/{repo}/import
method: GET
summary: Get an import status
auth_scheme_ref: GitHubBearerToken
description:
  View the progress of an import.

  > [!WARNING]
  > **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation).

  **Import status**

  This section includes details about the possible values of the `status` field of the Import Progress response.

  An import that does not have errors will progress through these steps:

  *   `detecting` - the "detection" step of the import is in progress because the request did not include a `vcs` parameter. The import is identifying the type of source control present at the URL.
  *   `importing` - the "raw" step of the import is in progress. This is where commit data is fetched from the original repository. The import progress response will include `commit_count` (the total number of raw commits that will be imported) and `percent` (0 - 100, the current progress through the import).
  *   `mapping` - the "rewrite" step of the import is in progress. This is where SVN branches are converted to Git branches, and where author updates are applied. The import progress response does not include progress information.
  *   `pushing` - the "push" step of the import is in progress. This is where the importer updates the repository on GitHub. The import progress response will include `push_percent`, which is the percent value reported by `git push` when it is "Writing objects".
  *   `complete` - the import is complete, and the repository is ready on GitHub.

  If there are problems, you will see one of these in the `status` field:

  *   `auth_failed` - the import requires authentication in order to connect to the original repository. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/migrations/source-imports#update-an-import) section.
  *   `error` - the import encountered an error. The import progress response will include the `failed_step` and an error message. Contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api) for more information.
  *   `detection_needs_auth` - the importer requires authentication for the originating repository to continue detection. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/migrations/source-imports#update-an-import) section.
  *   `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/migrations/source-imports#cancel-an-import) and [retry](https://docs.github.com/rest/migrations/source-imports#start-an-import) with the correct URL.
  *   `detection_found_multiple` - the importer found several projects or repositories at the provided URL. When this is the case, the Import Progress response will also include a `project_choices` field with the possible project choices as values. To update project choice, please see the [Update an import](https://docs.github.com/rest/migrations/source-imports#update-an-import) section.

  **The project_choices field**

  When multiple projects are found at the provided URL, the response hash will include a `project_choices` field, the value of which is an array of hashes each representing a project choice. The exact key/value pairs of the project hashes will differ depending on the version control type.

  **Git LFS related fields**

  This section includes details about Git LFS related fields that may be present in the Import Progress response.

  *   `use_lfs` - describes whether the import has been opted in or out of using Git LFS. The value can be `opt_in`, `opt_out`, or `undecided` if no action has been taken.
  *   `has_large_files` - the boolean value describing whether files larger than 100MB were found during the `importing` step.
  *   `large_files_size` - the total size in gigabytes of files larger than 100MB found in the originating repository.
  *   `large_files_count` - the total number of files larger than 100MB found in the originating repository. To see a list of these files, make a "Get Large Files" request.

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

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


operation_id: migrations/start-import
path: /repos/{owner}/{repo}/import
method: PUT
summary: Start an import
auth_scheme_ref: GitHubBearerToken
description:
  Start a source import to a GitHub repository using GitHub Importer.
  Importing into a GitHub repository with GitHub Actions enabled is not supported and will
  return a status `422 Unprocessable Entity` response.

  > [!WARNING]
  > **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation).

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"vcs":"subversion","vcs_password":"secret","vcs_url":"http://svn.example.com/svn/myproject","vcs_username":"octocat"}}},"schema":{"properties":{"tfvc_project":{"description":"For a tfvc import, the name of the project that is being imported.","type":"string"},"vcs":{"description":"The originating VCS type. Without this parameter, the import job will take additional time to detect the VCS type before beginning the import. This detection step will be reflected in the response.","enum":["subversion","git","mercurial","tfvc"],"type":"string"},"vcs_password":{"description":"If authentication is required, the password to provide to `vcs_url`.","type":"string"},"vcs_url":{"description":"The URL of the originating repository.","type":"string"},"vcs_username":{"description":"If authentication is required, the username to provide to `vcs_url`.","type":"string"}},"required":["vcs_url"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/import-2"}},"schema":{"$ref":"#/components/schemas/import"}}},"description":"Response","headers":{"Location":{"example":"https://api.github.com/repos/spraints/socm/import","schema":{"type":"string"},"style":"simple"}}},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"},"503":{"$ref":"#/components/responses/porter_maintenance"}}


operation_id: migrations/cancel-import
path: /repos/{owner}/{repo}/import
method: DELETE
summary: Cancel an import
output_schema: {"204":{"description":"Response"},"503":{"$ref":"#/components/responses/porter_maintenance"}}
auth_scheme_ref: GitHubBearerToken
description:
  Stop an import for a repository.

  > [!WARNING]
  > **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation).

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


operation_id: migrations/update-import
path: /repos/{owner}/{repo}/import
method: PATCH
summary: Update an import
auth_scheme_ref: GitHubBearerToken
description:
  An import can be updated with credentials or a project choice by passing in the appropriate parameters in this API
  request. If no parameters are provided, the import will be restarted.

  Some servers (e.g. TFS servers) can have several projects at a single URL. In those cases the import progress will
  have the status `detection_found_multiple` and the Import Progress response will include a `project_choices` array.
  You can select the project to import by providing one of the objects in the `project_choices` array in the update request.

  > [!WARNING]
  > **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation).

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"example-1":{"summary":"Update authentication for an import","value":{"vcs_password":"secret","vcs_username":"octocat"}},"example-2":{"summary":"Updating the project choice","value":{"human_name":"project1 (tfs)","tfvc_project":"project1","vcs":"tfvc"}},"example-3":{"summary":"Restarting an import"}},"schema":{"nullable":true,"properties":{"tfvc_project":{"description":"For a tfvc import, the name of the project that is being imported.","example":"\"project1\"","type":"string"},"vcs":{"description":"The type of version control system you are migrating from.","enum":["subversion","tfvc","git","mercurial"],"example":"\"git\"","type":"string"},"vcs_password":{"description":"The password to provide to the originating repository.","type":"string"},"vcs_username":{"description":"The username to provide to the originating repository.","type":"string"}},"type":"object"}}}}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"example-1":{"$ref":"#/components/examples/import-example-1"},"example-2":{"$ref":"#/components/examples/import-example-2"},"example-3":{"$ref":"#/components/examples/import-response"}},"schema":{"$ref":"#/components/schemas/import"}}},"description":"Response"},"503":{"$ref":"#/components/responses/porter_maintenance"}}


operation_id: migrations/get-commit-authors
path: /repos/{owner}/{repo}/import/authors
method: GET
summary: Get commit authors
auth_scheme_ref: GitHubBearerToken
description:
  Each type of source control system represents authors in a different way. For example, a Git commit author has a display name and an email address, but a Subversion commit author just has a username. The GitHub Importer will make the author information valid, but the author might not be correct. For example, it will change the bare Subversion username `hubot` into something like `hubot <hubot@12341234-abab-fefe-8787-fedcba987654>`.

  This endpoint and the [Map a commit author](https://docs.github.com/rest/migrations/source-imports#map-a-commit-author) endpoint allow you to provide correct Git author information.

  > [!WARNING]
  > **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation).

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

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


operation_id: migrations/map-commit-author
path: /repos/{owner}/{repo}/import/authors/{author_id}
method: PATCH
summary: Map a commit author
auth_scheme_ref: GitHubBearerToken
description:
  Update an author's identity for the import. Your application can continue updating authors any time before you push
  new commits to the repository.

  > [!WARNING]
  > **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation).

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"in":"path","name":"author_id","required":true,"schema":{"type":"integer"},"style":"simple"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"email":"hubot@github.com","name":"Hubot the Robot"}}},"schema":{"additionalProperties":false,"properties":{"email":{"description":"The new Git author email.","type":"string"},"name":{"description":"The new Git author name.","type":"string"}},"type":"object"}}}}}

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


operation_id: migrations/get-large-files
path: /repos/{owner}/{repo}/import/large_files
method: GET
summary: Get large files
auth_scheme_ref: GitHubBearerToken
description:
  List files larger than 100MB found during the import

  > [!WARNING]
  > **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation).

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

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/porter-large-file-items"}},"schema":{"items":{"$ref":"#/components/schemas/porter-large-file"},"type":"array"}}},"description":"Response"},"503":{"$ref":"#/components/responses/porter_maintenance"}}


operation_id: migrations/set-lfs-preference
path: /repos/{owner}/{repo}/import/lfs
method: PATCH
summary: Update Git LFS preference
auth_scheme_ref: GitHubBearerToken
description:
  You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability
  is powered by [Git LFS](https://git-lfs.com).

  You can learn more about our LFS feature and working with large files [on our help
  site](https://docs.github.com/repositories/working-with-files/managing-large-files).

  > [!WARNING]
  > **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation).

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"use_lfs":"opt_in"}}},"schema":{"properties":{"use_lfs":{"description":"Whether to store large files during the import. `opt_in` means large files will be stored using Git LFS. `opt_out` means large files will be removed during the import.","enum":["opt_in","opt_out"],"type":"string"}},"required":["use_lfs"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/import"}},"schema":{"$ref":"#/components/schemas/import"}}},"description":"Response"},"422":{"$ref":"#/components/responses/validation_failed"},"503":{"$ref":"#/components/responses/porter_maintenance"}}


operation_id: apps/get-repo-installation
path: /repos/{owner}/{repo}/installation
method: GET
summary: Get a repository installation for the authenticated app
auth_scheme_ref: GitHubBearerToken
description:
  Enables an authenticated GitHub App to find the repository's installation information. The installation's account type will be either an organization or a user account, depending which account the repository belongs to.

  You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access 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/installation"}},"schema":{"$ref":"#/components/schemas/installation"}}},"description":"Response"},"301":{"$ref":"#/components/responses/moved_permanently"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: interactions/get-restrictions-for-repo
path: /repos/{owner}/{repo}/interaction-limits
method: GET
summary: Get interaction restrictions for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response.

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

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/interaction-limit-2"}},"schema":{"anyOf":[{"$ref":"#/components/schemas/interaction-limit-response"},{"additionalProperties":false,"type":"object"}]}}},"description":"Response"}}


operation_id: interactions/set-restrictions-for-repo
path: /repos/{owner}/{repo}/interaction-limits
method: PUT
summary: Set interaction restrictions for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Example request body","value":{"expiry":"one_day","limit":"collaborators_only"}}},"schema":{"$ref":"#/components/schemas/interaction-limit"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/interaction-limit-2"}},"schema":{"$ref":"#/components/schemas/interaction-limit-response"}}},"description":"Response"},"409":{"description":"Response"}}


operation_id: interactions/remove-restrictions-for-repo
path: /repos/{owner}/{repo}/interaction-limits
method: DELETE
summary: Remove interaction restrictions for a repository
output_schema: {"204":{"description":"Response"},"409":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository.

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


operation_id: interactions/get-pull-request-bypass-list-for-repo
path: /repos/{owner}/{repo}/interaction-limits/pulls/bypass-list
method: GET
summary: Get pull request creation cap bypass list for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Lists the users that are on the pull request creation cap bypass list for a
  repository. Users on this list can create pull requests regardless of any
  configured pull request creation cap.

  Only users with maintainer permissions can view the bypass list.

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

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


operation_id: interactions/set-pull-request-bypass-list-for-repo
path: /repos/{owner}/{repo}/interaction-limits/pulls/bypass-list
method: PUT
summary: Add users to the pull request creation cap bypass list for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Adds users to the pull request creation cap bypass list for a repository.
  Users on this list can create pull requests regardless of any configured
  pull request creation cap.

  Only users with maintainer permissions can modify the bypass list.
  You can add a maximum of 100 users per request.
  The bypass list can only hold a maximum of 100 users.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Example request body","value":{"users":["octocat","monalisa"]}}},"schema":{"$ref":"#/components/schemas/interaction-limit-pull-request-bypass-list"}}},"required":true}}

output_schema:
  {"204":{"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: interactions/remove-pull-request-bypass-list-for-repo
path: /repos/{owner}/{repo}/interaction-limits/pulls/bypass-list
method: DELETE
summary: Remove users from the pull request creation cap bypass list for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Removes users from the pull request creation cap bypass list for a repository.
  Removed users will be subject to any configured pull request creation cap.

  Only users with maintainer permissions can modify the bypass list.
  You can remove a maximum of 100 users per request.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Example request body","value":{"users":["octocat"]}}},"schema":{"$ref":"#/components/schemas/interaction-limit-pull-request-bypass-list"}}},"required":true}}

output_schema:
  {"204":{"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: repos/list-invitations
path: /repos/{owner}/{repo}/invitations
method: GET
summary: List repository invitations
auth_scheme_ref: GitHubBearerToken
description:
  When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations.

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

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


operation_id: repos/delete-invitation
path: /repos/{owner}/{repo}/invitations/{invitation_id}
method: DELETE
summary: Delete a repository invitation
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/invitation-id"}],"requestBody":null}


operation_id: repos/update-invitation
path: /repos/{owner}/{repo}/invitations/{invitation_id}
method: PATCH
summary: Update a repository invitation
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/invitation-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Example request body","value":{"permissions":"write"}}},"schema":{"properties":{"permissions":{"description":"The permissions that the associated user will have on the repository. Valid values are `read`, `write`, `maintain`, `triage`, and `admin`.","enum":["read","write","maintain","triage","admin"],"type":"string"}},"type":"object"}}}}}

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


operation_id: repos/list-issue-types
path: /repos/{owner}/{repo}/issue-types
method: GET
summary: List issue types for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Lists issue types available for a repository (inherited from its organization owner, with any per-repository overrides applied).
  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.
  Fine-grained access tokens require the "Metadata" repository permission (read).

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

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


operation_id: issues/list-for-repo
path: /repos/{owner}/{repo}/issues
method: GET
summary: List repository issues
auth_scheme_ref: GitHubBearerToken
description:
  List issues in a repository. Only open issues will be listed.

  > [!NOTE]
  > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint.

  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 markdown body. Response will include `body`. This is the default if you do not pass any specific media type.
  - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.
  - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.
  - **`application/vnd.github.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"},{"description":"If an `integer` is passed, it should refer to a milestone by its `number` field. If the string `*` is passed, issues with any milestone are accepted. If the string `none` is passed, issues without milestones are returned.","in":"query","name":"milestone","schema":{"type":"string"},"style":"form"},{"description":"Indicates the state of the issues to return.","in":"query","name":"state","schema":{"default":"open","enum":["open","closed","all"],"type":"string"},"style":"form"},{"description":"Can be the name of a user. Pass in `none` for issues with no assigned user, and `*` for issues assigned to any user.","in":"query","name":"assignee","schema":{"type":"string"},"style":"form"},{"description":"Can be the name of an issue type. If the string `*` is passed, issues with any type are accepted. If the string `none` is passed, issues without type are returned.","in":"query","name":"type","schema":{"type":"string"},"style":"form"},{"description":"The user that created the issue.","in":"query","name":"creator","schema":{"type":"string"},"style":"form"},{"description":"A user that's mentioned in the issue.","in":"query","name":"mentioned","schema":{"type":"string"},"style":"form"},{"description":"A comma-separated list of issue field filters in `field_slug:value` format.\nOnly issues matching all specified field values are returned.\nRequires issue fields to be enabled for the repository. Issue fields are\nnot available for user-owned repositories, and field availability for\norganization-owned public repositories depends on the organization's\nvisibility settings. For example, `priority:Urgent,severity:High` filters\nissues where the `priority` field is `Urgent` AND the `severity` field is\n`High`.","in":"query","name":"issue_field_values","schema":{"type":"string"},"style":"form"},{"$ref":"#/components/parameters/labels"},{"description":"What to sort results by.","in":"query","name":"sort","schema":{"default":"created","enum":["created","updated","comments"],"type":"string"},"style":"form"},{"$ref":"#/components/parameters/direction"},{"$ref":"#/components/parameters/since"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

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


operation_id: issues/create
path: /repos/{owner}/{repo}/issues
method: POST
summary: Create an issue
auth_scheme_ref: GitHubBearerToken
description:
  Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status.

  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.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.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.
  - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.
  - **`application/vnd.github.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"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"assignees":["octocat"],"body":"I'm having a problem with this.","labels":["bug"],"milestone":1,"title":"Found a bug"}}},"schema":{"properties":{"assignees":{"description":"Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._","items":{"type":"string"},"type":"array"},"body":{"description":"The contents of the issue.","type":"string"},"issue_field_values":{"description":"An array of issue field values to set on this issue. Each field value must include the field ID and the value to set. Issue fields are only available for organization-owned repositories with the feature enabled. Field values are silently dropped otherwise.","items":{"additionalProperties":false,"properties":{"field_id":{"description":"The ID of the issue field to set","type":"integer"},"value":{"description":"The value to set for the field. For multi-select fields, provide an array of option names.","oneOf":[{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"}]}},"required":["field_id","value"],"type":"object"},"type":"array"},"labels":{"description":"Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._","items":{"oneOf":[{"type":"string"},{"properties":{"color":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"milestone":{"nullable":true,"oneOf":[{"type":"string"},{"description":"The `number` of the milestone to associate this issue with. _NOTE: Only users with push access can set the milestone for new issues. The milestone is silently dropped otherwise._","type":"integer"}]},"title":{"description":"The title of the issue.","oneOf":[{"type":"string"},{"type":"integer"}]},"type":{"description":"The name of the issue type to associate with this issue. _NOTE: Only users with push access can set the type for new issues. The type is silently dropped otherwise._","example":"Epic","nullable":true,"type":"string"}},"required":["title"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/issue"}},"schema":{"$ref":"#/components/schemas/issue"}}},"description":"Response","headers":{"Location":{"example":"https://api.github.com/repos/octocat/Hello-World/issues/1347","schema":{"type":"string"},"style":"simple"}}},"400":{"$ref":"#/components/responses/bad_request"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"410":{"$ref":"#/components/responses/gone"},"422":{"$ref":"#/components/responses/validation_failed"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: issues/list-comments-for-repo
path: /repos/{owner}/{repo}/issues/comments
method: GET
summary: List issue comments for a repository
auth_scheme_ref: GitHubBearerToken
description:
  You can use the REST API to list comments on issues and pull requests for a repository. Every pull request is an issue, but not every issue is a pull request.

  By default, issue 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.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.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.
  - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.
  - **`application/vnd.github.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/sort"},{"description":"Either `asc` or `desc`. Ignored without the `sort` parameter.","in":"query","name":"direction","schema":{"enum":["asc","desc"],"type":"string"},"style":"form"},{"$ref":"#/components/parameters/since"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

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


operation_id: issues/get-comment
path: /repos/{owner}/{repo}/issues/comments/{comment_id}
method: GET
summary: Get an issue comment
auth_scheme_ref: GitHubBearerToken
description:
  You can use the REST API to get comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request.

  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 markdown body. Response will include `body`. This is the default if you do not pass any specific media type.
  - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.
  - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.
  - **`application/vnd.github.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/issue-comment"}},"schema":{"$ref":"#/components/schemas/issue-comment"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: issues/delete-comment
path: /repos/{owner}/{repo}/issues/comments/{comment_id}
method: DELETE
summary: Delete an issue comment
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  You can use the REST API to delete comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request.

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


operation_id: issues/update-comment
path: /repos/{owner}/{repo}/issues/comments/{comment_id}
method: PATCH
summary: Update an issue comment
auth_scheme_ref: GitHubBearerToken
description:
  You can use the REST API to update comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request.

  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 markdown body. Response will include `body`. This is the default if you do not pass any specific media type.
  - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.
  - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.
  - **`application/vnd.github.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":"Me too"}}},"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/issue-comment"}},"schema":{"$ref":"#/components/schemas/issue-comment"}}},"description":"Response"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: issues/pin-comment
path: /repos/{owner}/{repo}/issues/comments/{comment_id}/pin
method: PUT
summary: Pin an issue comment
auth_scheme_ref: GitHubBearerToken
description:
  You can use the REST API to pin comments on issues.

  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 markdown body. Response will include `body`. This is the default if you do not pass any specific media type.
  - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.
  - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.
  - **`application/vnd.github.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: 162 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/issue-comment-pinned"}},"schema":{"$ref":"#/components/schemas/issue-comment"}}},"description":"Response"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"410":{"$ref":"#/components/responses/gone"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: issues/unpin-comment
path: /repos/{owner}/{repo}/issues/comments/{comment_id}/pin
method: DELETE
summary: Unpin an issue comment
description: You can use the REST API to unpin comments on issues.
auth_scheme_ref: GitHubBearerToken
input_schema:
[cell repeats an earlier one in this file: 162 characters]

output_schema:
  {"204":{"description":"Response"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"410":{"$ref":"#/components/responses/gone"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: reactions/list-for-issue-comment
path: /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions
method: GET
summary: List reactions for an issue comment
auth_scheme_ref: GitHubBearerToken
description:
  List the reactions to an [issue comment](https://docs.github.com/rest/issues/comments#get-an-issue-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 an issue 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-issue-comment
path: /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions
method: POST
summary: Create reaction for an issue comment
auth_scheme_ref: GitHubBearerToken
description:
  Create a reaction to an [issue comment](https://docs.github.com/rest/issues/comments#get-an-issue-comment). A response with an HTTP `200` status means that you already added the reaction type to this issue 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 issue 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-issue-comment
path: /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}
method: DELETE
summary: Delete an issue 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 delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`.

  Delete a reaction to an [issue comment](https://docs.github.com/rest/issues/comments#get-an-issue-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: issues/list-events-for-repo
path: /repos/{owner}/{repo}/issues/events
method: GET
summary: List issue events for a repository
description: Lists events for a repository.
auth_scheme_ref: GitHubBearerToken
input_schema:
[cell repeats an earlier one in this file: 200 characters]

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


operation_id: issues/get-event
path: /repos/{owner}/{repo}/issues/events/{event_id}
method: GET
summary: Get an issue event
description: Gets a single event by the event id.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"in":"path","name":"event_id","required":true,"schema":{"type":"integer"},"style":"simple"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/issue-event"}},"schema":{"$ref":"#/components/schemas/issue-event"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"410":{"$ref":"#/components/responses/gone"}}


operation_id: issues/get
path: /repos/{owner}/{repo}/issues/{issue_number}
method: GET
summary: Get an issue
auth_scheme_ref: GitHubBearerToken
description:
  The API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api#follow-redirects) if the issue was
  [transferred](https://docs.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. If
  the issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API
  returns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has read
  access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe
  to the [`issues`](https://docs.github.com/webhooks/event-payloads/#issues) webhook.

  > [!NOTE]
  > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint.

  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 markdown body. Response will include `body`. This is the default if you do not pass any specific media type.
  - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.
  - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.
  - **`application/vnd.github.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/issue-number"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"summary":"Issue","value":{"$ref":"#/components/examples/issue"}},"pinned_comment":{"summary":"Issue with pinned comment","value":{"$ref":"#/components/examples/issue-with-pinned-comment"}}},"schema":{"$ref":"#/components/schemas/issue"}}},"description":"Response"},"301":{"$ref":"#/components/responses/moved_permanently"},"304":{"$ref":"#/components/responses/not_modified"},"404":{"$ref":"#/components/responses/not_found"},"410":{"$ref":"#/components/responses/gone"}}


operation_id: issues/update
path: /repos/{owner}/{repo}/issues/{issue_number}
method: PATCH
summary: Update an issue
auth_scheme_ref: GitHubBearerToken
description:
  Issue owners and users with push access or Triage role can edit an issue.

  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 markdown body. Response will include `body`. This is the default if you do not pass any specific media type.
  - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.
  - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.
  - **`application/vnd.github.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/issue-number"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"assignees":["octocat"],"body":"I'm having a problem with this.","labels":["bug"],"milestone":1,"state":"open","title":"Found a bug"}}},"schema":{"properties":{"assignees":{"description":"Usernames to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this issue. Send an empty array (`[]`) to clear all assignees from the issue. Only users with push access can set assignees for new issues. Without push access to the repository, assignee changes are silently dropped.","items":{"oneOf":[{"type":"string"},{"properties":{"login":{"type":"string"}},"type":"object"}]},"type":"array"},"body":{"description":"The contents of the issue.","nullable":true,"type":"string"},"duplicate_issue_id":{"description":"The ID of the issue to mark as the canonical duplicate when `state_reason` is `duplicate`. The issue must exist and be accessible to the authenticated user. Ignored when `state_reason` is not `duplicate`.","type":"integer"},"issue_field_values":{"description":"An array of issue field values to set on this issue. Each field value must include the field ID and the value to set. Only users with push access can set field values for issues","items":{"additionalProperties":false,"properties":{"field_id":{"description":"The ID of the issue field to set","type":"integer"},"value":{"description":"The value to set for the field. For multi-select fields, provide an array of option names.","oneOf":[{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"}]}},"required":["field_id","value"],"type":"object"},"type":"array"},"labels":{"description":"Labels to associate with this issue. Pass one or more labels to _replace_ the set of labels on this issue. Send an empty array (`[]`) to clear all labels from the issue. Only users with push access can set labels for issues. Without push access to the repository, label changes are silently dropped.","items":{"oneOf":[{"type":"string"},{"properties":{"color":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"milestone":{"nullable":true,"oneOf":[{"type":"string"},{"description":"The `number` of the milestone to associate this issue with or use `null` to remove the current milestone. Only users with push access can set the milestone for issues. Without push access to the repository, milestone changes are silently dropped.","type":"integer"}]},"state":{"description":"The open or closed state of the issue.","enum":["open","closed"],"type":"string"},"state_reason":{"description":"The reason for the state change. Ignored unless `state` is changed.","enum":["completed","not_planned","duplicate","reopened"],"example":"not_planned","nullable":true,"type":"string"},"title":{"description":"The title of the issue.","nullable":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"type":{"description":"The name of the issue type to associate with this issue or use `null` to remove the current issue type. Only users with push access can set the type for issues. Without push access to the repository, type changes are silently dropped.","example":"Epic","nullable":true,"type":"string"}},"type":"object"}}}}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/issue"}},"schema":{"allOf":[{"$ref":"#/components/schemas/issue"},{"type":"object"}]}}},"description":"Response"},"301":{"$ref":"#/components/responses/moved_permanently"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"410":{"$ref":"#/components/responses/gone"},"422":{"$ref":"#/components/responses/validation_failed"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: issues/add-assignees
path: /repos/{owner}/{repo}/issues/{issue_number}/assignees
method: POST
summary: Add assignees to an issue
description: Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/issue-number"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"assignees":["hubot","other_user"]}}},"schema":{"properties":{"assignees":{"description":"Usernames of people to assign this issue to. _NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise._","items":{"type":"string"},"type":"array"}},"type":"object"}}}}}

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


operation_id: issues/remove-assignees
path: /repos/{owner}/{repo}/issues/{issue_number}/assignees
method: DELETE
summary: Remove assignees from an issue
description: Removes one or more assignees from an issue.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/issue-number"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"assignees":["hubot","other_user"]}}},"schema":{"properties":{"assignees":{"description":"Usernames of assignees to remove from an issue. _NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise._","items":{"type":"string"},"type":"array"}},"type":"object"}}}}}

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


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

  If the `assignee` can be assigned to this issue, a `204` status code with no content is returned.

  Otherwise a `404` status code is returned.

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

output_schema:
  {"204":{"description":"Response if `assignee` can be assigned to `issue_number`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/basic-error"}}},"description":"Response if `assignee` can not be assigned to `issue_number`"}}


operation_id: issues/list-comments
path: /repos/{owner}/{repo}/issues/{issue_number}/comments
method: GET
summary: List issue comments
auth_scheme_ref: GitHubBearerToken
description:
  You can use the REST API to list comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request.

  Issue 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.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.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.
  - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.
  - **`application/vnd.github.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/issue-number"},{"$ref":"#/components/parameters/since"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

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


operation_id: issues/create-comment
path: /repos/{owner}/{repo}/issues/{issue_number}/comments
method: POST
summary: Create an issue comment
auth_scheme_ref: GitHubBearerToken
description:
  You can use the REST API to create comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request.

  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.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.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.
  - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.
  - **`application/vnd.github.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/issue-number"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"body":"Me too"}}},"schema":{"properties":{"body":{"description":"The contents of the comment.","type":"string"}},"required":["body"],"type":"object"}}},"required":true}}

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


operation_id: issues/list-dependencies-blocked-by
path: /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by
method: GET
summary: List dependencies an issue is blocked by
auth_scheme_ref: GitHubBearerToken
description:
  You can use the REST API to list the dependencies an issue is blocked by.

  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 Markdown body. Response will include `body`. This is the default if you do not pass any specific media type.
  - **`application/vnd.github.text+json`**: Returns a text only representation of the Markdown body. Response will include `body_text`.
  - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's Markdown. Response will include `body_html`.
  - **`application/vnd.github.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/issue-number"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

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


operation_id: issues/add-blocked-by-dependency
path: /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by
method: POST
summary: Add a dependency an issue is blocked by
auth_scheme_ref: GitHubBearerToken
description:
  You can use the REST API to add a 'blocked by' relationship to an issue.

  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.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.text+json`**: Returns a text only representation of the Markdown body. Response will include `body_text`.
  - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's Markdown. Response will include `body_html`.
  - **`application/vnd.github.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/issue-number"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"issue_id":1}}},"schema":{"properties":{"issue_id":{"description":"The id of the issue that blocks the current issue","type":"integer"}},"required":["issue_id"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/issue"}},"schema":{"$ref":"#/components/schemas/issue"}}},"description":"Response","headers":{"Location":{"example":"https://api.github.com/repos/octocat/Hello-World/issues/1/dependencies/blocked_by","schema":{"type":"string"},"style":"simple"}}},"301":{"$ref":"#/components/responses/moved_permanently"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"410":{"$ref":"#/components/responses/gone"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: issues/remove-dependency-blocked-by
path: /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by/{issue_id}
method: DELETE
summary: Remove dependency an issue is blocked by
auth_scheme_ref: GitHubBearerToken
description:
  You can use the REST API to remove a dependency that an issue is blocked by.

  Removing 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.raw+json`**: Returns the raw Markdown body. Response will include `body`. This is the default if you do not pass a specific media type.
  - **`application/vnd.github.text+json`**: Returns a text only representation of the Markdown body. Response will include `body_text`.
  - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's Markdown. Response will include `body_html`.
  - **`application/vnd.github.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/issue-number"},{"description":"The id of the blocking issue to remove as a dependency","in":"path","name":"issue_id","required":true,"schema":{"type":"integer"},"style":"simple"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/issue"}},"schema":{"$ref":"#/components/schemas/issue"}}},"description":"Response"},"301":{"$ref":"#/components/responses/moved_permanently"},"400":{"$ref":"#/components/responses/bad_request"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"410":{"$ref":"#/components/responses/gone"}}


operation_id: issues/list-dependencies-blocking
path: /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocking
method: GET
summary: List dependencies an issue is blocking
auth_scheme_ref: GitHubBearerToken
description:
  You can use the REST API to list the dependencies an issue is blocking.

  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 Markdown body. Response will include `body`. This is the default if you do not pass any specific media type.
  - **`application/vnd.github.text+json`**: Returns a text only representation of the Markdown body. Response will include `body_text`.
  - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's Markdown. Response will include `body_html`.
  - **`application/vnd.github.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/issue-number"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

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


operation_id: issues/list-events
path: /repos/{owner}/{repo}/issues/{issue_number}/events
method: GET
summary: List issue events
description: Lists all events for an issue.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/issue-number"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/issue-event-for-issue-items"}},"schema":{"items":{"$ref":"#/components/schemas/issue-event-for-issue"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"410":{"$ref":"#/components/responses/gone"}}


operation_id: issues/list-issue-field-values-for-issue
path: /repos/{owner}/{repo}/issues/{issue_number}/issue-field-values
method: GET
summary: List issue field values for an issue
description: Lists all issue field values for an issue.
auth_scheme_ref: GitHubBearerToken
input_schema:
[cell repeats an earlier one in this file: 248 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/issue-field-value-items"}},"schema":{"items":{"$ref":"#/components/schemas/issue-field-value"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"301":{"$ref":"#/components/responses/moved_permanently"},"404":{"$ref":"#/components/responses/not_found"},"410":{"$ref":"#/components/responses/gone"}}


operation_id: issues/set-issue-field-values
path: /repos/{owner}/{repo}/issues/{issue_number}/issue-field-values
method: PUT
summary: Set issue field values for an issue
auth_scheme_ref: GitHubBearerToken
description:
  Set custom field values for an issue, replacing any existing values. You can set values for organization-level issue fields that have been defined for the repository's organization.

  This endpoint supports the following field data types:
  - **`text`**: String values for text fields
  - **`single_select`**: Option names for single-select fields (must match an existing option name)
  - **`number`**: Numeric values for number fields
  - **`date`**: ISO 8601 date strings for date fields

  This operation will replace all existing field values with the provided ones. If you want to add field values without replacing existing ones, use the `POST` endpoint instead.

  Only users with push access to the repository can set issue field values. If you don't have the proper permissions, you'll receive a `403 Forbidden` response.

  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)."

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/issue-number"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Set multiple field values","value":{"issue_field_values":[{"field_id":123,"value":"Critical"},{"field_id":456,"value":5},{"field_id":789,"value":"2024-12-31"}]}},"single-field":{"summary":"Set a single field value","value":{"issue_field_values":[{"field_id":123,"value":"High Priority"}]}}},"schema":{"properties":{"issue_field_values":{"description":"An array of issue field values to set for this issue. Each field value must include the field ID and the value to set. All existing field values will be replaced.","items":{"additionalProperties":false,"properties":{"field_id":{"description":"The ID of the issue field to set","example":123,"type":"integer"},"value":{"description":"The value to set for the field. The type depends on the field's data type:\n- For text fields: provide a string value\n- For single_select fields: provide the option name as a string (must match an existing option)\n- For number fields: provide a numeric value\n- For date fields: provide an ISO 8601 date string","example":"Critical","oneOf":[{"description":"The value to set for text, single_select, or date fields","type":"string"},{"description":"The value to set for number fields","type":"number"}]}},"required":["field_id","value"],"type":"object"},"maxItems":25,"type":"array"}},"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/issue-field-value-items"}},"schema":{"description":"The current issue field values for this issue after setting the new values","items":{"$ref":"#/components/schemas/issue-field-value"},"type":"array"}}},"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"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: issues/add-issue-field-values
path: /repos/{owner}/{repo}/issues/{issue_number}/issue-field-values
method: POST
summary: Add issue field values to an issue
auth_scheme_ref: GitHubBearerToken
description:
  Add custom field values to an issue. You can set values for organization-level issue fields that have been defined for the repository's organization.
  Adding an empty array will clear all existing field values for the issue.

  This endpoint supports the following field data types:
  - **`text`**: String values for text fields
  - **`single_select`**: Option names for single-select fields (must match an existing option name)
  - **`number`**: Numeric values for number fields
  - **`date`**: ISO 8601 date strings for date fields

  Only users with push access to the repository can add issue field values. If you don't have the proper permissions, you'll receive a `403 Forbidden` response.

  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)."

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/issue-number"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Add multiple field values","value":{"issue_field_values":[{"field_id":123,"value":"Critical"},{"field_id":456,"value":5},{"field_id":789,"value":"2024-12-31"}]}},"single-field":{"summary":"Add a single field value","value":{"issue_field_values":[{"field_id":123,"value":"High Priority"}]}}},"schema":{"properties":{"issue_field_values":{"description":"An array of issue field values to add to this issue. Each field value must include the field ID and the value to set.","items":{"additionalProperties":false,"properties":{"field_id":{"description":"The ID of the issue field to set","example":123,"type":"integer"},"value":{"description":"The value to set for the field. The type depends on the field's data type:\n- For text fields: provide a string value\n- For single_select fields: provide the option name as a string (must match an existing option)\n- For number fields: provide a numeric value\n- For multi_select fields: provide an array of option names (must match existing options)\n- For date fields: provide an ISO 8601 date string","example":"Critical","oneOf":[{"description":"The value to set for text, single_select, or date fields","type":"string"},{"description":"The value to set for number fields","type":"number"},{"description":"The value to set for multi_select fields (array of option names)","items":{"type":"string"},"type":"array"}]}},"required":["field_id","value"],"type":"object"},"maxItems":25,"type":"array"}},"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/issue-field-value-items"}},"schema":{"description":"The current issue field values for this issue after adding the new values","items":{"$ref":"#/components/schemas/issue-field-value"},"type":"array"}}},"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"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: issues/delete-issue-field-value
path: /repos/{owner}/{repo}/issues/{issue_number}/issue-field-values/{issue_field_id}
method: DELETE
summary: Delete an issue field value from an issue
auth_scheme_ref: GitHubBearerToken
description:
  Remove a specific custom field value from an issue.

  Only users with push access to the repository can delete issue field values. If you don't have the proper permissions, you'll receive a `403 Forbidden` response.

  If the specified field does not have a value set on the issue, this operation will return a `404` error.

  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)."

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

output_schema:
  {"204":{"description":"Issue field value deleted successfully"},"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: issues/list-labels-on-issue
path: /repos/{owner}/{repo}/issues/{issue_number}/labels
method: GET
summary: List labels for an issue
description: Lists all labels for an issue.
auth_scheme_ref: GitHubBearerToken
input_schema:
[cell repeats an earlier one in this file: 248 characters]

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


operation_id: issues/set-labels
path: /repos/{owner}/{repo}/issues/{issue_number}/labels
method: PUT
summary: Set labels for an issue
description: Removes any previous labels and sets the new labels for an issue.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/issue-number"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"labels":["bug","enhancement"]}}},"schema":{"oneOf":[{"properties":{"labels":{"description":"The names of the labels to set for the issue. The labels you set replace any existing labels. You can pass an empty array to remove all labels. Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. You can also add labels to the existing labels for an issue. For more information, see \"[Add labels to an issue](https://docs.github.com/rest/issues/labels#add-labels-to-an-issue).\"","items":{"type":"string"},"minItems":1,"type":"array"}},"type":"object"},{"items":{"type":"string"},"minItems":1,"type":"array"},{"properties":{"labels":{"items":{"properties":{"name":{"type":"string"}},"required":["name"],"type":"object"},"minItems":1,"type":"array"}},"type":"object"},{"items":{"properties":{"name":{"type":"string"}},"required":["name"],"type":"object"},"minItems":1,"type":"array"},{"type":"string"}]}}}}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/label-items"}},"schema":{"items":{"$ref":"#/components/schemas/label"},"type":"array"}}},"description":"Response"},"301":{"$ref":"#/components/responses/moved_permanently"},"404":{"$ref":"#/components/responses/not_found"},"410":{"$ref":"#/components/responses/gone"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: issues/add-labels
path: /repos/{owner}/{repo}/issues/{issue_number}/labels
method: POST
summary: Add labels to an issue
description: Adds labels to an issue.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/issue-number"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"labels":["bug","enhancement"]}}},"schema":{"oneOf":[{"properties":{"labels":{"description":"The names of the labels to add to the issue's existing labels. You can also pass an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. To replace all of the labels for an issue, use \"[Set labels for an issue](https://docs.github.com/rest/issues/labels#set-labels-for-an-issue).\"","items":{"type":"string"},"minItems":1,"type":"array"}},"type":"object"},{"items":{"type":"string"},"type":"array"},{"items":{"properties":{"name":{"type":"string"}},"required":["name"],"type":"object"},"type":"array"}]}}}}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/label-items"}},"schema":{"items":{"$ref":"#/components/schemas/label"},"type":"array"}}},"description":"Response"},"301":{"$ref":"#/components/responses/moved_permanently"},"404":{"$ref":"#/components/responses/not_found"},"410":{"$ref":"#/components/responses/gone"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: issues/remove-all-labels
path: /repos/{owner}/{repo}/issues/{issue_number}/labels
method: DELETE
summary: Remove all labels from an issue
description: Removes all labels from an issue.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/issue-number"}],"requestBody":null}

output_schema:
  {"204":{"description":"Response"},"301":{"$ref":"#/components/responses/moved_permanently"},"404":{"$ref":"#/components/responses/not_found"},"410":{"$ref":"#/components/responses/gone"}}


operation_id: issues/remove-label
path: /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}
method: DELETE
summary: Remove a label from an issue
auth_scheme_ref: GitHubBearerToken
description:
  Removes the specified label from the issue, and returns the remaining labels on the issue. This endpoint returns a `404 Not Found` status if the label does not exist.

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

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


operation_id: issues/lock
path: /repos/{owner}/{repo}/issues/{issue_number}/lock
method: PUT
summary: Lock an issue
auth_scheme_ref: GitHubBearerToken
description:
  Users with push access can lock an issue or pull request's conversation.

  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)."

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/issue-number"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Example of locking an issue as off-topic","value":{"lock_reason":"off-topic"}}},"schema":{"nullable":true,"properties":{"lock_reason":{"description":"The reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons:  \n * `off-topic`  \n * `too heated`  \n * `resolved`  \n * `spam`","enum":["off-topic","too heated","resolved","spam"],"type":"string"}},"type":"object"}}}}}

output_schema:
  {"204":{"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"410":{"$ref":"#/components/responses/gone"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: issues/get-parent
path: /repos/{owner}/{repo}/issues/{issue_number}/parent
method: GET
summary: Get parent issue
auth_scheme_ref: GitHubBearerToken
description:
  You can use the REST API to get the parent issue of a sub-issue.

  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 markdown body. Response will include `body`. This is the default if you do not pass any specific media type.
  - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.
  - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.
  - **`application/vnd.github.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: 164 characters]

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


operation_id: reactions/list-for-issue
path: /repos/{owner}/{repo}/issues/{issue_number}/reactions
method: GET
summary: List reactions for an issue
description: List the reactions to an [issue](https://docs.github.com/rest/issues/issues#get-an-issue).
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/issue-number"},{"description":"Returns a single [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to an issue.","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"},"410":{"$ref":"#/components/responses/gone"}}


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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/issue-number"}],"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 issue.","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":"Response"},"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/reaction"}},"schema":{"$ref":"#/components/schemas/reaction"}}},"description":"Response"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: reactions/delete-for-issue
path: /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}
method: DELETE
summary: Delete an issue 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/issues/:issue_number/reactions/:reaction_id`.

  Delete a reaction to an [issue](https://docs.github.com/rest/issues/issues#get-an-issue).

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


operation_id: issues/remove-sub-issue
path: /repos/{owner}/{repo}/issues/{issue_number}/sub_issue
method: DELETE
summary: Remove sub-issue
auth_scheme_ref: GitHubBearerToken
description:
  You can use the REST API to remove a sub-issue from an issue.
  Removing 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.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass a specific media type.
  - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.
  - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.
  - **`application/vnd.github.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/issue-number"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"sub_issue_id":6}}},"schema":{"properties":{"sub_issue_id":{"description":"The id of the sub-issue to remove","type":"integer"}},"required":["sub_issue_id"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/issue"}},"schema":{"$ref":"#/components/schemas/issue"}}},"description":"Response","headers":{"Location":{"example":"https://api.github.com/repos/octocat/Hello-World/issues/1/sub-issue","schema":{"type":"string"},"style":"simple"}}},"400":{"$ref":"#/components/responses/bad_request"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: issues/list-sub-issues
path: /repos/{owner}/{repo}/issues/{issue_number}/sub_issues
method: GET
summary: List sub-issues
auth_scheme_ref: GitHubBearerToken
description:
  You can use the REST API to list the sub-issues on an issue.

  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 Markdown body. Response will include `body`. This is the default if you do not pass any specific media type.
  - **`application/vnd.github.text+json`**: Returns a text only representation of the Markdown body. Response will include `body_text`.
  - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's Markdown. Response will include `body_html`.
  - **`application/vnd.github.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: 248 characters]

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


operation_id: issues/add-sub-issue
path: /repos/{owner}/{repo}/issues/{issue_number}/sub_issues
method: POST
summary: Add sub-issue
auth_scheme_ref: GitHubBearerToken
description:
  You can use the REST API to add sub-issues to issues.

  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.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.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.
  - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.
  - **`application/vnd.github.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/issue-number"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"sub_issue_id":1}}},"schema":{"properties":{"replace_parent":{"description":"Option that, when true, instructs the operation to replace the sub-issues current parent issue","type":"boolean"},"sub_issue_id":{"description":"The id of the sub-issue to add. The sub-issue must belong to the same repository owner as the parent issue","type":"integer"}},"required":["sub_issue_id"],"type":"object"}}},"required":true}}

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


operation_id: issues/reprioritize-sub-issue
path: /repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority
method: PATCH
summary: Reprioritize sub-issue
description: You can use the REST API to reprioritize a sub-issue to a different position in the parent list.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/issue-number"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"after_id":5,"sub_issue_id":6}}},"schema":{"properties":{"after_id":{"description":"The id of the sub-issue to be prioritized after (either positional argument after OR before should be specified).","type":"integer"},"before_id":{"description":"The id of the sub-issue to be prioritized before (either positional argument after OR before should be specified).","type":"integer"},"sub_issue_id":{"description":"The id of the sub-issue to reprioritize","type":"integer"}},"required":["sub_issue_id"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/issue"}},"schema":{"$ref":"#/components/schemas/issue"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed_simple"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: issues/list-events-for-timeline
path: /repos/{owner}/{repo}/issues/{issue_number}/timeline
method: GET
summary: List timeline events for an issue
description: List all timeline events for an issue.
auth_scheme_ref: GitHubBearerToken
input_schema:
[cell repeats an earlier one in this file: 248 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/timeline-issue-events"}},"schema":{"items":{"$ref":"#/components/schemas/timeline-issue-events"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"400":{"$ref":"#/components/responses/bad_request"},"404":{"$ref":"#/components/responses/not_found"},"410":{"$ref":"#/components/responses/gone"}}


operation_id: repos/list-deploy-keys
path: /repos/{owner}/{repo}/keys
method: GET
summary: List deploy keys
auth_scheme_ref: GitHubBearerToken
input_schema:
[cell repeats an earlier one in this file: 200 characters]

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


operation_id: repos/create-deploy-key
path: /repos/{owner}/{repo}/keys
method: POST
summary: Create a deploy key
description: You can create a read-only deploy key.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"key":"ssh-rsa AAA...","read_only":true,"title":"octocat@octomac"}}},"schema":{"properties":{"key":{"description":"The contents of the key.","type":"string"},"read_only":{"description":"If `true`, the key will only be able to read repository contents. Otherwise, the key will be able to read and write.  \n  \nDeploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see \"[Repository permission levels for an organization](https://docs.github.com/articles/repository-permission-levels-for-an-organization/)\" and \"[Permission levels for a user account repository](https://docs.github.com/articles/permission-levels-for-a-user-account-repository/).\"","type":"boolean"},"title":{"description":"A name for the key.","type":"string"}},"required":["key"],"type":"object"}}},"required":true}}

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


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

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


operation_id: repos/delete-deploy-key
path: /repos/{owner}/{repo}/keys/{key_id}
method: DELETE
summary: Delete a deploy key
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead.

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


operation_id: issues/list-labels-for-repo
path: /repos/{owner}/{repo}/labels
method: GET
summary: List labels for a repository
description: Lists all labels for a repository.
auth_scheme_ref: GitHubBearerToken
input_schema:
[cell repeats an earlier one in this file: 200 characters]

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


operation_id: issues/create-label
path: /repos/{owner}/{repo}/labels
method: POST
summary: Create a label
auth_scheme_ref: GitHubBearerToken
description:
  Creates a label for the specified repository with the given name and color. The name and color parameters are required. The color must be a valid [hexadecimal color code](http://www.color-hex.com/).

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"color":"f29513","description":"Something isn't working","name":"bug"}}},"schema":{"properties":{"color":{"description":"The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`.","type":"string"},"description":{"description":"A short description of the label. Must be 100 characters or fewer.","type":"string"},"name":{"description":"The name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png \":strawberry:\"). For a full list of available emoji and codes, see \"[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet).\"","type":"string"}},"required":["name"],"type":"object"}}},"required":true}}

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


operation_id: issues/get-label
path: /repos/{owner}/{repo}/labels/{name}
method: GET
summary: Get a label
description: Gets a label using the given name.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"in":"path","name":"name","required":true,"schema":{"type":"string"},"style":"simple"}],"requestBody":null}

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


operation_id: issues/update-label
path: /repos/{owner}/{repo}/labels/{name}
method: PATCH
summary: Update a label
description: Updates a label using the given label name.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"in":"path","name":"name","required":true,"schema":{"type":"string"},"style":"simple"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"color":"b01f26","description":"Small bug fix required","new_name":"bug :bug:"}}},"schema":{"properties":{"color":{"description":"The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`.","type":"string"},"description":{"description":"A short description of the label. Must be 100 characters or fewer.","type":"string"},"new_name":{"description":"The new name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png \":strawberry:\"). For a full list of available emoji and codes, see \"[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet).\"","type":"string"}},"type":"object"}}}}}

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


operation_id: repos/list-languages
path: /repos/{owner}/{repo}/languages
method: GET
summary: List repository languages
auth_scheme_ref: GitHubBearerToken
description:
  Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language.

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

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


operation_id: licenses/get-for-repo
path: /repos/{owner}/{repo}/license
method: GET
summary: Get the license for a repository
auth_scheme_ref: GitHubBearerToken
description:
  This method returns the contents of the repository's license file, if one is detected.

  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 contents of the license.
  - **`application/vnd.github.html+json`**: Returns the license contents in HTML. Markup languages are rendered to HTML using GitHub's open-source [Markup library](https://github.com/github/markup).

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

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


operation_id: repos/merge-upstream
path: /repos/{owner}/{repo}/merge-upstream
method: POST
summary: Sync a fork branch with the upstream repository
description: Sync a branch of a forked repository to keep it up-to-date with the upstream repository.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"branch":"main"}}},"schema":{"properties":{"branch":{"description":"The name of the branch which should be updated to match upstream.","type":"string"}},"required":["branch"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/merged-upstream"}},"schema":{"$ref":"#/components/schemas/merged-upstream"}}},"description":"The branch has been successfully synced with the upstream repository"},"409":{"description":"The branch could not be synced because of a merge conflict"},"422":{"description":"The branch could not be synced for some other reason"}}


operation_id: repos/merge
path: /repos/{owner}/{repo}/merges
method: POST
summary: Merge a branch
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"base":"master","commit_message":"Shipped cool_feature!","head":"cool_feature"}}},"schema":{"properties":{"base":{"description":"The name of the base branch that the head will be merged into.","type":"string"},"commit_message":{"description":"Commit message to use for the merge commit. If omitted, a default message will be used.","type":"string"},"head":{"description":"The head to merge. This can be a branch name or a commit SHA1.","type":"string"}},"required":["base","head"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/commit"}},"schema":{"$ref":"#/components/schemas/commit"}}},"description":"Successful Response (The resulting merge commit)"},"204":{"description":"Response when already merged"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"description":"Not Found when the base or head does not exist"},"409":{"description":"Conflict when there is a merge conflict"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: issues/list-milestones
path: /repos/{owner}/{repo}/milestones
method: GET
summary: List milestones
description: Lists milestones for a repository.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"description":"The state of the milestone. Either `open`, `closed`, or `all`.","in":"query","name":"state","schema":{"default":"open","enum":["open","closed","all"],"type":"string"},"style":"form"},{"description":"What to sort results by. Either `due_on` or `completeness`.","in":"query","name":"sort","schema":{"default":"due_on","enum":["due_on","completeness"],"type":"string"},"style":"form"},{"description":"The direction of the sort. Either `asc` or `desc`.","in":"query","name":"direction","schema":{"default":"asc","enum":["asc","desc"],"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/milestone-items"}},"schema":{"items":{"$ref":"#/components/schemas/milestone"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: issues/create-milestone
path: /repos/{owner}/{repo}/milestones
method: POST
summary: Create a milestone
description: Creates a milestone.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"description":"Tracking milestone for version 1.0","due_on":"2012-10-09T23:39:01Z","state":"open","title":"v1.0"}}},"schema":{"properties":{"description":{"description":"A description of the milestone.","type":"string"},"due_on":{"description":"The milestone due date. 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"},"state":{"default":"open","description":"The state of the milestone. Either `open` or `closed`.","enum":["open","closed"],"type":"string"},"title":{"description":"The title of the milestone.","type":"string"}},"required":["title"],"type":"object"}}},"required":true}}

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


operation_id: issues/get-milestone
path: /repos/{owner}/{repo}/milestones/{milestone_number}
method: GET
summary: Get a milestone
description: Gets a milestone using the given milestone number.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/milestone-number"}],"requestBody":null}

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


operation_id: issues/update-milestone
path: /repos/{owner}/{repo}/milestones/{milestone_number}
method: PATCH
summary: Update a milestone
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/milestone-number"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"description":"Tracking milestone for version 1.0","due_on":"2012-10-09T23:39:01Z","state":"open","title":"v1.0"}}},"schema":{"properties":{"description":{"description":"A description of the milestone.","type":"string"},"due_on":{"description":"The milestone due date. 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"},"state":{"default":"open","description":"The state of the milestone. Either `open` or `closed`.","enum":["open","closed"],"type":"string"},"title":{"description":"The title of the milestone.","type":"string"}},"type":"object"}}}}}

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


operation_id: issues/list-labels-for-milestone
path: /repos/{owner}/{repo}/milestones/{milestone_number}/labels
method: GET
summary: List labels for issues in a milestone
description: Lists labels for issues in a milestone.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/milestone-number"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

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


operation_id: activity/list-repo-notifications-for-authenticated-user
path: /repos/{owner}/{repo}/notifications
method: GET
summary: List repository notifications for the authenticated user
description: Lists all notifications for the current user in the specified repository.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/all"},{"$ref":"#/components/parameters/participating"},{"$ref":"#/components/parameters/since"},{"$ref":"#/components/parameters/before"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

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


operation_id: activity/mark-repo-notifications-as-read
path: /repos/{owner}/{repo}/notifications
method: PUT
summary: Mark repository notifications as read
auth_scheme_ref: GitHubBearerToken
description:
  Marks all notifications in a repository as "read" for the current user. If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List repository notifications for the authenticated user](https://docs.github.com/rest/activity/notifications#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"last_read_at":"2019-01-01T00:00:00Z"}}},"schema":{"properties":{"last_read_at":{"description":"Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp.","format":"date-time","type":"string"}},"type":"object"}}}}}

output_schema:
  {"202":{"content":{"application/json":{"examples":{"default":{"value":{"message":"Unread notifications couldn't be marked in a single request. Notifications are being marked as read in the background."}}},"schema":{"properties":{"message":{"type":"string"},"url":{"type":"string"}},"type":"object"}}},"description":"Response"},"205":{"description":"Reset Content"}}


operation_id: repos/get-pages
path: /repos/{owner}/{repo}/pages
method: GET
summary: Get a GitHub Pages site
auth_scheme_ref: GitHubBearerToken
description:
  Gets information about a GitHub Pages site.

  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/page"}},"schema":{"$ref":"#/components/schemas/page"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: repos/update-information-about-pages-site
path: /repos/{owner}/{repo}/pages
method: PUT
summary: Update information about a GitHub Pages site
auth_scheme_ref: GitHubBearerToken
description:
  Updates information for a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages).

  The authenticated user must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission.

  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":{"cname":"octocatblog.com","source":{"branch":"main","path":"/"}}}},"schema":{"anyOf":[{"required":["build_type"]},{"required":["source"]},{"required":["cname"]},{"required":["public"]},{"required":["https_enforced"]}],"properties":{"build_type":{"description":"The process by which the GitHub Pages site will be built. `workflow` means that the site is built by a custom GitHub Actions workflow. `legacy` means that the site is built by GitHub when changes are pushed to a specific branch.","enum":["legacy","workflow"],"type":"string"},"cname":{"description":"Specify a custom domain for the repository. Sending a `null` value will remove the custom domain. For more about custom domains, see \"[Using a custom domain with GitHub Pages](https://docs.github.com/pages/configuring-a-custom-domain-for-your-github-pages-site).\"","nullable":true,"type":"string"},"https_enforced":{"description":"Specify whether HTTPS should be enforced for the repository.","type":"boolean"},"source":{"anyOf":[{"description":"Update the source for the repository. Must include the branch name, and may optionally specify the subdirectory `/docs`. Possible values are `\"gh-pages\"`, `\"master\"`, and `\"master /docs\"`.","enum":["gh-pages","master","master /docs"],"type":"string"},{"description":"Update the source for the repository. Must include the branch name and path.","properties":{"branch":{"description":"The repository branch used to publish your site's source files.","type":"string"},"path":{"description":"The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`.","enum":["/","/docs"],"type":"string"}},"required":["branch","path"],"type":"object"}]}},"type":"object"}}},"required":true}}

output_schema:
  {"204":{"description":"Response"},"400":{"$ref":"#/components/responses/bad_request"},"409":{"$ref":"#/components/responses/conflict"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: repos/create-pages-site
path: /repos/{owner}/{repo}/pages
method: POST
summary: Create a GitHub Pages site
auth_scheme_ref: GitHubBearerToken
description:
  Configures a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)."

  The authenticated user must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission.

  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":{"source":{"branch":"main","path":"/docs"}}}},"schema":{"anyOf":[{"required":["source"]},{"required":["build_type"]}],"description":"The source branch and directory used to publish your Pages site.","nullable":true,"properties":{"build_type":{"description":"The process in which the Page will be built. Possible values are `\"legacy\"` and `\"workflow\"`.","enum":["legacy","workflow"],"type":"string"},"source":{"description":"The source branch and directory used to publish your Pages site.","properties":{"branch":{"description":"The repository branch used to publish your site's source files.","type":"string"},"path":{"default":"/","description":"The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. Default: `/`","enum":["/","/docs"],"type":"string"}},"required":["branch"],"type":"object"}},"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/page"}},"schema":{"$ref":"#/components/schemas/page"}}},"description":"Response"},"409":{"$ref":"#/components/responses/conflict"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: repos/delete-pages-site
path: /repos/{owner}/{repo}/pages
method: DELETE
summary: Delete a GitHub Pages site
auth_scheme_ref: GitHubBearerToken
description:
  Deletes a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages).

  The authenticated user must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission.

  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:
  {"204":{"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"409":{"$ref":"#/components/responses/conflict"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: repos/list-pages-builds
path: /repos/{owner}/{repo}/pages/builds
method: GET
summary: List GitHub Pages builds
auth_scheme_ref: GitHubBearerToken
description:
  Lists builts of a GitHub Pages site.

  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/page-build-items"}},"schema":{"items":{"$ref":"#/components/schemas/page-build"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}}}


operation_id: repos/request-pages-build
path: /repos/{owner}/{repo}/pages/builds
method: POST
summary: Request a GitHub Pages build
auth_scheme_ref: GitHubBearerToken
description:
  You can request that your site be built from the latest revision on the default branch. This has the same effect as pushing a commit to your default branch, but does not require an additional commit. Manually triggering page builds can be helpful when diagnosing build warnings and failures.

  Build requests are limited to one concurrent build per repository and one concurrent build per requester. If you request a build while another is still in progress, the second request will be queued until the first completes.

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

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


operation_id: repos/get-latest-pages-build
path: /repos/{owner}/{repo}/pages/builds/latest
method: GET
summary: Get latest Pages build
auth_scheme_ref: GitHubBearerToken
description:
  Gets information about the single most recent build of a GitHub Pages site.

  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/page-build"}},"schema":{"$ref":"#/components/schemas/page-build"}}},"description":"Response"}}


operation_id: repos/get-pages-build
path: /repos/{owner}/{repo}/pages/builds/{build_id}
method: GET
summary: Get GitHub Pages build
auth_scheme_ref: GitHubBearerToken
description:
  Gets information about a GitHub Pages build.

  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"},{"in":"path","name":"build_id","required":true,"schema":{"type":"integer"},"style":"simple"}],"requestBody":null}

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


operation_id: repos/create-pages-deployment
path: /repos/{owner}/{repo}/pages/deployments
method: POST
summary: Create a GitHub Pages deployment
auth_scheme_ref: GitHubBearerToken
description:
  Create a GitHub Pages deployment for a repository.

  The authenticated user must have write permission to the repository.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"artifact_url":"https://downloadcontent/","environment":"github-pages","oidc_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IlV2R1h4SUhlY0JFc1JCdEttemUxUEhfUERiVSIsImtpZCI6IjUyRjE5N0M0ODFERTcwMTEyQzQ0MUI0QTlCMzdCNTNDN0ZDRjBEQjUifQ.eyJqdGkiOiJhMWIwNGNjNy0zNzZiLTQ1N2QtOTMzNS05NTY5YmVjZDExYTIiLCJzdWIiOiJyZXBvOnBhcGVyLXNwYS9taW55aTplbnZpcm9ubWVudDpQcm9kdWN0aW9uIiwiYXVkIjoiaHR0cHM6Ly9naXRodWIuY29tL3BhcGVyLXNwYSIsInJlZiI6InJlZnMvaGVhZHMvbWFpbiIsInNoYSI6ImEyODU1MWJmODdiZDk3NTFiMzdiMmM0YjM3M2MxZjU3NjFmYWM2MjYiLCJyZXBvc2l0b3J5IjoicGFwZXItc3BhL21pbnlpIiwicmVwb3NpdG9yeV9vd25lciI6InBhcGVyLXNwYSIsInJ1bl9pZCI6IjE1NDY0NTkzNjQiLCJydW5fbnVtYmVyIjoiMzQiLCJydW5fYXR0ZW1wdCI6IjYiLCJhY3RvciI6IllpTXlzdHkiLCJ3b3JrZmxvdyI6IkNJIiwiaGVhZF9yZWYiOiIiLCJiYXNlX3JlZiI6IiIsImV2ZW50X25hbWUiOiJwdXNoIiwicmVmX3R5cGUiOiJicmFuY2giLCJlbnZpcm9ubWVudCI6IlByb2R1Y3Rpb24iLCJqb2Jfd29ya2Zsb3dfcmVmIjoicGFwZXItc3BhL21pbnlpLy5naXRodWIvd29ya2Zsb3dzL2JsYW5rLnltbEByZWZzL2hlYWRzL21haW4iLCJpc3MiOiJodHRwczovL3Rva2VuLmFjdGlvbnMuZ2l0aHVidXNlcmNvbnRlbnQuY29tIiwibmJmIjoxNjM5MDAwODU2LCJleHAiOjE2MzkwMDE3NTYsImlhdCI6MTYzOTAwMTQ1Nn0.VP8WictbQECKozE2SgvKb2FqJ9hisWsoMkYRTqfBrQfZTCXi5IcFEdgDMB2X7a99C2DeUuTvHh9RMKXLL2a0zg3-Sd7YrO7a2ll2kNlnvyIypcN6AeIc7BxHsTTnZN9Ud_xmEsTrSRGOEKmzCFkULQ6N4zlVD0sidypmXlMemmWEcv_ZHqhioEI_VMp5vwXQurketWH7qX4oDgG4okyYtPrv5RQHbfQcVo9izaPJ_jnsDd0CBA0QOx9InjPidtIkMYQLyUgJy33HLJy86EFNUnAf8UhBQuQi5mAsEpEzBBuKpG3PDiPtYCHOk64JZkZGd5mR888a5sbHRiaF8hm8YA","pages_build_version":"4fd754f7e594640989b406850d0bc8f06a121251"}}},"schema":{"description":"The object used to create GitHub Pages deployment","properties":{"artifact_id":{"description":"The ID of an artifact that contains the .zip or .tar of static assets to deploy. The artifact belongs to the repository. Either `artifact_id` or `artifact_url` are required.","type":"number"},"artifact_url":{"description":"The URL of an artifact that contains the .zip or .tar of static assets to deploy. The artifact belongs to the repository. Either `artifact_id` or `artifact_url` are required.","type":"string"},"environment":{"default":"github-pages","description":"The target environment for this GitHub Pages deployment.","type":"string"},"oidc_token":{"description":"The OIDC token issued by GitHub Actions certifying the origin of the deployment.","type":"string"},"pages_build_version":{"default":"GITHUB_SHA","description":"A unique string that represents the version of the build for this deployment.","type":"string"}},"required":["pages_build_version","oidc_token"],"type":"object"}}},"required":true}}

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


operation_id: repos/get-pages-deployment
path: /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}
method: GET
summary: Get the status of a GitHub Pages deployment
auth_scheme_ref: GitHubBearerToken
description:
  Gets the current status of a GitHub Pages deployment.

  The authenticated user must have read permission for the GitHub Pages site.

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

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


operation_id: repos/cancel-pages-deployment
path: /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}/cancel
method: POST
summary: Cancel a GitHub Pages deployment
auth_scheme_ref: GitHubBearerToken
description:
  Cancels a GitHub Pages deployment.

  The authenticated user must have write permissions for the GitHub Pages site.

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

output_schema:
  {"204":{"$ref":"#/components/responses/no_content"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: repos/get-pages-health-check
path: /repos/{owner}/{repo}/pages/health
method: GET
summary: Get a DNS health check for GitHub Pages
auth_scheme_ref: GitHubBearerToken
description:
  Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages.

  The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response.

  The authenticated user must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission 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/pages-health-check"}},"schema":{"$ref":"#/components/schemas/pages-health-check"}}},"description":"Response"},"202":{"content":{"application/json":{"examples":{"default":{}},"schema":{"$ref":"#/components/schemas/empty-object"}}},"description":"Empty response"},"400":{"description":"Custom domains are not available for GitHub Pages"},"404":{"$ref":"#/components/responses/not_found"},"422":{"description":"There isn't a CNAME for this page"}}


operation_id: repos/check-private-vulnerability-reporting
path: /repos/{owner}/{repo}/private-vulnerability-reporting
method: GET
summary: Check if private vulnerability reporting is enabled for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Returns a boolean indicating whether or not private vulnerability reporting is enabled for the repository. For more information, see "[Evaluating the security settings of a repository](https://docs.github.com/code-security/security-advisories/working-with-repository-security-advisories/evaluating-the-security-settings-of-a-repository)".

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

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"value":{"enabled":true}}},"schema":{"properties":{"enabled":{"description":"Whether or not private vulnerability reporting is enabled for the repository.","type":"boolean"}},"required":["enabled"],"type":"object"}}},"description":"Private vulnerability reporting status"},"422":{"$ref":"#/components/responses/bad_request"}}


operation_id: repos/enable-private-vulnerability-reporting
path: /repos/{owner}/{repo}/private-vulnerability-reporting
method: PUT
summary: Enable private vulnerability reporting for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Enables private vulnerability reporting for a repository. The authenticated user must have admin access to the repository. For more information, see "[Privately reporting a security vulnerability](https://docs.github.com/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability)."

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

output_schema:
  {"204":{"$ref":"#/components/responses/no_content"},"422":{"$ref":"#/components/responses/bad_request"}}


operation_id: repos/disable-private-vulnerability-reporting
path: /repos/{owner}/{repo}/private-vulnerability-reporting
method: DELETE
summary: Disable private vulnerability reporting for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Disables private vulnerability reporting for a repository. The authenticated user must have admin access to the repository. For more information, see "[Privately reporting a security vulnerability](https://docs.github.com/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability)".

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

output_schema:
  {"204":{"$ref":"#/components/responses/no_content"},"422":{"$ref":"#/components/responses/bad_request"}}


operation_id: repos/custom-properties-for-repos-get-repository-values
path: /repos/{owner}/{repo}/properties/values
method: GET
summary: Get all custom property values for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Gets all custom property values that are set for a repository.
  Users with read access to the repository can 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/custom-property-values"}},"schema":{"items":{"$ref":"#/components/schemas/custom-property-value"},"type":"array"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: repos/custom-properties-for-repos-create-or-update-repository-values
path: /repos/{owner}/{repo}/properties/values
method: PATCH
summary: Create or update custom property values for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Create new or update existing custom property values for a repository.
  Using a value of `null` for a custom property will remove or 'unset' the property value from the repository.

  Repository admins and other users with the repository-level "edit custom property values" fine-grained permission can use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/create-or-update-custom-properties-values"}},"schema":{"properties":{"properties":{"description":"A list of custom property names and associated values to apply to the repositories.","items":{"$ref":"#/components/schemas/custom-property-value"},"type":"array"}},"required":["properties"],"type":"object"}}},"required":true}}

output_schema:
  {"204":{"description":"No Content when custom property values are successfully created or updated"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: pulls/list
path: /repos/{owner}/{repo}/pulls
method: GET
summary: List pull requests
auth_scheme_ref: GitHubBearerToken
description:
  Lists pull requests in a specified repository.

  Draft pull requests are available in public repositories with GitHub
  Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing
  plans, and in public and private repositories with GitHub Team and GitHub Enterprise
  Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)
  in the GitHub Help documentation.

  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 markdown body. Response will include `body`. This is the default if you do not pass any specific media type.
  - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.
  - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.
  - **`application/vnd.github.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"},{"description":"Either `open`, `closed`, or `all` to filter by state.","in":"query","name":"state","schema":{"default":"open","enum":["open","closed","all"],"type":"string"},"style":"form"},{"description":"Filter pulls by head user or head organization and branch name in the format of `user:ref-name` or `organization:ref-name`. For example: `github:new-script-format` or `octocat:test-branch`.","in":"query","name":"head","schema":{"type":"string"},"style":"form"},{"description":"Filter pulls by base branch name. Example: `gh-pages`.","in":"query","name":"base","schema":{"type":"string"},"style":"form"},{"description":"What to sort results by. `popularity` will sort by the number of comments. `long-running` will sort by date created and will limit the results to pull requests that have been open for more than a month and have had activity within the past month.","in":"query","name":"sort","schema":{"default":"created","enum":["created","updated","popularity","long-running"],"type":"string"},"style":"form"},{"description":"The direction of the sort. Default: `desc` when sort is `created` or sort is not specified, otherwise `asc`.","in":"query","name":"direction","schema":{"enum":["asc","desc"],"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/pull-request-simple-items"}},"schema":{"items":{"$ref":"#/components/schemas/pull-request-simple"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"304":{"$ref":"#/components/responses/not_modified"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: pulls/create
path: /repos/{owner}/{repo}/pulls
method: POST
summary: Create a pull request
auth_scheme_ref: GitHubBearerToken
description:
  Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

  To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.

  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.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.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.
  - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.
  - **`application/vnd.github.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"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"base":"master","body":"Please pull these awesome changes in!","head":"octocat:new-feature","title":"Amazing new feature"}}},"schema":{"properties":{"base":{"description":"The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository.","type":"string"},"body":{"description":"The contents of the pull request.","type":"string"},"draft":{"description":"Indicates whether the pull request is a draft. See \"[Draft Pull Requests](https://docs.github.com/articles/about-pull-requests#draft-pull-requests)\" in the GitHub Help documentation to learn more.","type":"boolean"},"head":{"description":"The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace `head` with a user like this: `username:branch`.","type":"string"},"head_repo":{"description":"The name of the repository where the changes in the pull request were made. This field is required for cross-repository pull requests if both repositories are owned by the same organization.","example":"octo-org/octo-repo","format":"repo.nwo","type":"string"},"issue":{"description":"An issue in the repository to convert to a pull request. The issue title, body, and comments will become the title, body, and comments on the new pull request. Required unless `title` is specified.","example":1,"format":"int64","type":"integer"},"maintainer_can_modify":{"description":"Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request.","type":"boolean"},"title":{"description":"The title of the new pull request. Required unless `issue` is specified.","type":"string"}},"required":["head","base"],"type":"object"}}},"required":true}}

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


operation_id: pulls/list-review-comments-for-repo
path: /repos/{owner}/{repo}/pulls/comments
method: GET
summary: List review comments in a repository
auth_scheme_ref: GitHubBearerToken
description:
  Lists review comments for all pull requests in a repository. By default,
  review comments are in ascending order by 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:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"in":"query","name":"sort","schema":{"enum":["created","updated","created_at"],"type":"string"},"style":"form"},{"description":"The direction to sort results. Ignored without `sort` parameter.","in":"query","name":"direction","schema":{"enum":["asc","desc"],"type":"string"},"style":"form"},{"$ref":"#/components/parameters/since"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

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


operation_id: pulls/get-review-comment
path: /repos/{owner}/{repo}/pulls/comments/{comment_id}
method: GET
summary: Get a review comment for a pull request
auth_scheme_ref: GitHubBearerToken
description:
  Provides details for a specified review 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:
[cell repeats an earlier one in this file: 162 characters]

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


operation_id: pulls/update-review-comment
path: /repos/{owner}/{repo}/pulls/comments/{comment_id}
method: PATCH
summary: Update a review comment for a pull request
auth_scheme_ref: GitHubBearerToken
description:
  Edits the content of a specified review 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":"I like this too!"}}},"schema":{"properties":{"body":{"description":"The text of the reply to the review comment.","type":"string"}},"required":["body"],"type":"object"}}},"required":true}}

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


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

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 pull request review 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-pull-request-review-comment
path: /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions
method: POST
summary: Create reaction for a pull request review comment
auth_scheme_ref: GitHubBearerToken
description:
  Create a reaction to a [pull request review comment](https://docs.github.com/rest/pulls/comments#get-a-review-comment-for-a-pull-request). A response with an HTTP `200` status means that you already added the reaction type to this pull request review 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 pull request review 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-pull-request-comment
path: /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}
method: DELETE
summary: Delete a pull request 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/pulls/comments/:comment_id/reactions/:reaction_id.`

  Delete a reaction to a [pull request review comment](https://docs.github.com/rest/pulls/comments#get-a-review-comment-for-a-pull-request).

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: pulls/get
path: /repos/{owner}/{repo}/pulls/{pull_number}
method: GET
summary: Get a pull request
auth_scheme_ref: GitHubBearerToken
description:
  Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

  Lists details of a pull request by providing its number.

  When you get, [create](https://docs.github.com/rest/pulls/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/pulls/pulls#update-a-pull-request) a pull request, GitHub creates a merge commit to test whether the pull request can be automatically merged into the base branch. This test commit is not added to the base branch or the head branch. You can review the status of the test commit using the `mergeable` key. 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)".

  The value of the `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit.

  The value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request:

  *   If merged as a [merge commit](https://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit.
  *   If merged via a [squash](https://docs.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch.
  *   If [rebased](https://docs.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to.

  Pass the appropriate [media type](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types) to fetch diff and patch formats.

  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 markdown body. Response will include `body`. This is the default if you do not pass any specific media type.
  - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.
  - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.
  - **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.
  - **`application/vnd.github.diff`**: For more information, see "[git-diff](https://git-scm.com/docs/git-diff)" in the Git documentation. If a diff is corrupt, contact us through the [GitHub Support portal](https://support.github.com/). Include the repository name and pull request ID in your message.

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

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/pull-request"}},"schema":{"$ref":"#/components/schemas/pull-request"}}},"description":"Pass the appropriate [media type](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types) to fetch diff and patch formats."},"304":{"$ref":"#/components/responses/not_modified"},"404":{"$ref":"#/components/responses/not_found"},"406":{"$ref":"#/components/responses/unacceptable"},"500":{"$ref":"#/components/responses/internal_error"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: pulls/update
path: /repos/{owner}/{repo}/pulls/{pull_number}
method: PATCH
summary: Update a pull request
auth_scheme_ref: GitHubBearerToken
description:
  Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

  To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.

  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 markdown body. Response will include `body`. This is the default if you do not pass any specific media type.
  - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.
  - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.
  - **`application/vnd.github.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/pull-number"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"base":"master","body":"updated body","state":"open","title":"new title"}}},"schema":{"properties":{"base":{"description":"The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository.","type":"string"},"body":{"description":"The contents of the pull request.","type":"string"},"maintainer_can_modify":{"description":"Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request.","type":"boolean"},"state":{"description":"State of this Pull Request. Either `open` or `closed`.","enum":["open","closed"],"type":"string"},"title":{"description":"The title of the pull request.","type":"string"}},"type":"object"}}}}}

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


operation_id: codespaces/create-with-pr-for-authenticated-user
path: /repos/{owner}/{repo}/pulls/{pull_number}/codespaces
method: POST
summary: Create a codespace from a pull request
auth_scheme_ref: GitHubBearerToken
description:
  Creates a codespace owned by the authenticated user for the specified pull request.

  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"},{"$ref":"#/components/parameters/pull-number"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"ref":"main","repository_id":1}}},"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"},"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"},"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: pulls/list-review-comments
path: /repos/{owner}/{repo}/pulls/{pull_number}/comments
method: GET
summary: List review comments on a pull request
auth_scheme_ref: GitHubBearerToken
description:
  Lists all review comments for a specified pull request. By default, review comments
  are in ascending order by 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:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/pull-number"},{"$ref":"#/components/parameters/sort"},{"description":"The direction to sort results. Ignored without `sort` parameter.","in":"query","name":"direction","schema":{"enum":["asc","desc"],"type":"string"},"style":"form"},{"$ref":"#/components/parameters/since"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

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


operation_id: pulls/create-review-comment
path: /repos/{owner}/{repo}/pulls/{pull_number}/comments
method: POST
summary: Create a review comment for a pull request
auth_scheme_ref: GitHubBearerToken
description:
  Creates a review comment on the diff of a specified pull request. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/issues/comments#create-an-issue-comment)."

  If your comment applies to more than one line in the pull request diff, you should use the parameters `line`, `side`, and optionally `start_line` and `start_side` in your request.

  The `position` parameter is closing down. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required.

  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/pull-number"}],"requestBody":{"content":{"application/json":{"examples":{"example-for-a-multi-line-comment":{"summary":"Example for a multi-line comment","value":{"body":"Great stuff!","commit_id":"6dcb09b5b57875f334f61aebed695e2e4193db5e","line":2,"path":"file1.txt","side":"RIGHT","start_line":1,"start_side":"RIGHT"}}},"schema":{"properties":{"body":{"description":"The text of the review comment.","type":"string"},"commit_id":{"description":"The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`.","type":"string"},"in_reply_to":{"description":"The ID of the review comment to reply to. To find the ID of a review comment with [\"List review comments on a pull request\"](#list-review-comments-on-a-pull-request). When specified, all parameters other than `body` in the request body are ignored.","example":2,"type":"integer"},"line":{"description":"**Required unless using `subject_type:file`**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to.","type":"integer"},"path":{"description":"The relative path to the file that necessitates a comment.","type":"string"},"position":{"deprecated":true,"description":"**This parameter is closing down. Use `line` instead**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. The position value equals the number of lines down from the first \"@@\" hunk header in the file you want to add a comment. The line just below the \"@@\" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file.","type":"integer","x-github":{"deprecationDate":"2022-11-01"}},"side":{"description":"In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see \"[Diff view options](https://docs.github.com/articles/about-comparing-branches-in-pull-requests#diff-view-options)\" in the GitHub Help documentation.","enum":["LEFT","RIGHT"],"type":"string"},"start_line":{"description":"**Required when using multi-line comments unless using `in_reply_to`**. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see \"[Commenting on a pull request](https://docs.github.com/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)\" in the GitHub Help documentation.","type":"integer"},"start_side":{"description":"**Required when using multi-line comments unless using `in_reply_to`**. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see \"[Commenting on a pull request](https://docs.github.com/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)\" in the GitHub Help documentation. See `side` in this table for additional context.","enum":["LEFT","RIGHT","side"],"type":"string"},"subject_type":{"description":"The level at which the comment is targeted.","enum":["line","file"],"type":"string"}},"required":["body","commit_id","path"],"type":"object"}}},"required":true}}

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


operation_id: pulls/create-reply-for-review-comment
path: /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies
method: POST
summary: Create a reply for a review comment
auth_scheme_ref: GitHubBearerToken
description:
  Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported.

  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/pull-number"},{"$ref":"#/components/parameters/comment-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"body":"Great stuff!"}}},"schema":{"properties":{"body":{"description":"The text of the review comment.","type":"string"}},"required":["body"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/pull-request-review-comment"}},"schema":{"$ref":"#/components/schemas/pull-request-review-comment"}}},"description":"Response","headers":{"Location":{"example":"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1","schema":{"type":"string"},"style":"simple"}}},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: pulls/list-commits
path: /repos/{owner}/{repo}/pulls/{pull_number}/commits
method: GET
summary: List commits on a pull request
auth_scheme_ref: GitHubBearerToken
description:
  Lists a maximum of 250 commits for a pull request. To receive a complete
  commit list for pull requests with more than 250 commits, use the [List commits](https://docs.github.com/rest/commits/commits#list-commits)
  endpoint.

  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 markdown body. Response will include `body`. This is the default if you do not pass any specific media type.
  - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.
  - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.
  - **`application/vnd.github.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/pull-number"},{"$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"}}}}


operation_id: pulls/list-files
path: /repos/{owner}/{repo}/pulls/{pull_number}/files
method: GET
summary: List pull requests files
auth_scheme_ref: GitHubBearerToken
description:
  Lists the files in a specified pull request.

  > [!NOTE]
  > Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default.

  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 markdown body. Response will include `body`. This is the default if you do not pass any specific media type.
  - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.
  - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.
  - **`application/vnd.github.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/pull-number"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/diff-entry-items"}},"schema":{"items":{"$ref":"#/components/schemas/diff-entry"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"422":{"$ref":"#/components/responses/validation_failed"},"500":{"$ref":"#/components/responses/internal_error"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: pulls/check-if-merged
path: /repos/{owner}/{repo}/pulls/{pull_number}/merge
method: GET
summary: Check if a pull request has been merged
auth_scheme_ref: GitHubBearerToken
description:
  Checks if a pull request has been merged into the base branch. The HTTP status of the response indicates whether or not the pull request has been merged; the response body is empty.

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

output_schema:
  {"204":{"description":"Response if pull request has been merged"},"404":{"description":"Not Found if pull request has not been merged"}}


operation_id: pulls/merge
path: /repos/{owner}/{repo}/pulls/{pull_number}/merge
method: PUT
summary: Merge a pull request
auth_scheme_ref: GitHubBearerToken
description:
  Merges a pull request into the base branch.
  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)."

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/pull-number"}],"requestBody":{"content":{"application/json":{"examples":{"response-if-merge-was-successful":{"value":{"commit_message":"Add a new value to the merge_method enum","commit_title":"Expand enum"}}},"schema":{"nullable":true,"properties":{"commit_message":{"description":"Extra detail to append to automatic commit message.","type":"string"},"commit_title":{"description":"Title for the automatic commit message.","type":"string"},"merge_method":{"description":"The merge method to use.","enum":["merge","squash","rebase"],"type":"string"},"sha":{"description":"SHA that pull request head must match to allow merge.","type":"string"}},"type":"object"}}}}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"response-if-merge-was-successful":{"$ref":"#/components/examples/pull-request-merge-result-response-if-merge-was-successful"}},"schema":{"$ref":"#/components/schemas/pull-request-merge-result"}}},"description":"if merge was successful"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"405":{"content":{"application/json":{"examples":{"response-if-merge-cannot-be-performed":{"value":{"message":"Pull Request is not mergeable"}}},"schema":{"properties":{"documentation_url":{"type":"string"},"message":{"type":"string"}},"type":"object"}}},"description":"Method Not Allowed if merge cannot be performed"},"409":{"content":{"application/json":{"examples":{"response-if-sha-was-provided-and-pull-request-head-did-not-match":{"value":{"message":"Head branch was modified. Review and try the merge again."}}},"schema":{"properties":{"documentation_url":{"type":"string"},"message":{"type":"string"}},"type":"object"}}},"description":"Conflict if sha was provided and pull request head did not match"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: pulls/list-requested-reviewers
path: /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers
method: GET
summary: Get all requested reviewers for a pull request
auth_scheme_ref: GitHubBearerToken
description:
  Gets the users or teams whose review is requested for a pull request. Once a requested reviewer submits a review, they are no longer considered a requested reviewer. Their review will instead be returned by the [List reviews for a pull request](https://docs.github.com/rest/pulls/reviews#list-reviews-for-a-pull-request) operation.

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

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


operation_id: pulls/request-reviewers
path: /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers
method: POST
summary: Request reviewers for a pull request
auth_scheme_ref: GitHubBearerToken
description:
  Requests reviews for a pull request from a given set of users and/or teams.
  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)."

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/pull-number"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"reviewers":["octocat","hubot","other_user"],"team_reviewers":["justice-league"]}}},"schema":{"anyOf":[{"required":["reviewers"]},{"required":["team_reviewers"]}],"properties":{"reviewers":{"description":"An array of user `login`s that will be requested.","items":{"type":"string"},"type":"array"},"team_reviewers":{"description":"An array of team `slug`s that will be requested.","items":{"type":"string"},"type":"array"}},"type":"object"}}}}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/pull-request-review-request"}},"schema":{"$ref":"#/components/schemas/pull-request-simple"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"422":{"description":"Unprocessable Entity if user is not a collaborator"}}


operation_id: pulls/remove-requested-reviewers
path: /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers
method: DELETE
summary: Remove requested reviewers from a pull request
description: Removes review requests from a pull request for a given set of users and/or teams.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/pull-number"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"reviewers":["octocat","hubot","other_user"],"team_reviewers":["justice-league"]}}},"schema":{"properties":{"reviewers":{"description":"An array of user `login`s that will be removed.","items":{"type":"string"},"type":"array"},"team_reviewers":{"description":"An array of team `slug`s that will be removed.","items":{"type":"string"},"type":"array"}},"required":["reviewers"],"type":"object"}}},"required":true}}

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


operation_id: pulls/list-reviews
path: /repos/{owner}/{repo}/pulls/{pull_number}/reviews
method: GET
summary: List reviews for a pull request
auth_scheme_ref: GitHubBearerToken
description:
  Lists all reviews for a specified pull request. The list of reviews returns 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-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/pull-number"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/pull-request-review-items"}},"schema":{"items":{"$ref":"#/components/schemas/pull-request-review"},"type":"array"}}},"description":"The list of reviews returns in chronological order.","headers":{"Link":{"$ref":"#/components/headers/link"}}}}


operation_id: pulls/create-review
path: /repos/{owner}/{repo}/pulls/{pull_number}/reviews
method: POST
summary: Create a review for a pull request
auth_scheme_ref: GitHubBearerToken
description:
  Creates a review on a specified pull request.

  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)."

  Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/rest/pulls/reviews#submit-a-review-for-a-pull-request)."

  > [!NOTE]
  > To comment on a specific line in a file, you need to first determine the position of that line in the diff. To see a pull request diff, add the `application/vnd.github.v3.diff` media type to the `Accept` header of a call to the [Get a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) endpoint.

  The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file.

  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/pull-number"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"body":"This is close to perfect! Please address the suggested inline change.","comments":[{"body":"Please add more information here, and fix this typo.","path":"file.md","position":6}],"commit_id":"ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091","event":"REQUEST_CHANGES"}}},"schema":{"properties":{"body":{"description":"**Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review.","type":"string"},"comments":{"description":"Use the following table to specify the location, destination, and contents of the draft review comment.","items":{"properties":{"body":{"description":"Text of the review comment.","type":"string"},"line":{"example":28,"type":"integer"},"path":{"description":"The relative path to the file that necessitates a review comment.","type":"string"},"position":{"description":"The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. The `position` value equals the number of lines down from the first \"@@\" hunk header in the file you want to add a comment. The line just below the \"@@\" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file.","type":"integer"},"side":{"example":"RIGHT","type":"string"},"start_line":{"example":26,"type":"integer"},"start_side":{"example":"LEFT","type":"string"}},"required":["path","body"],"type":"object"},"type":"array"},"commit_id":{"description":"The SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the `position`. Defaults to the most recent commit in the pull request when you do not specify a value.","type":"string"},"event":{"description":"The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. By leaving this blank, you set the review action state to `PENDING`, which means you will need to [submit the pull request review](https://docs.github.com/rest/pulls/reviews#submit-a-review-for-a-pull-request) when you are ready.","enum":["APPROVE","REQUEST_CHANGES","COMMENT"],"type":"string"}},"type":"object"}}}}}

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


operation_id: pulls/get-review
path: /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}
method: GET
summary: Get a review for a pull request
auth_scheme_ref: GitHubBearerToken
description:
  Retrieves a pull request review by its 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:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/pull-number"},{"$ref":"#/components/parameters/review-id"}],"requestBody":null}

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


operation_id: pulls/update-review
path: /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}
method: PUT
summary: Update a review for a pull request
auth_scheme_ref: GitHubBearerToken
description:
  Updates the contents of a specified review summary 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/pull-number"},{"$ref":"#/components/parameters/review-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"body":"This is close to perfect! Please address the suggested inline change. And add more about this."}}},"schema":{"properties":{"body":{"description":"The body text of the pull request review.","type":"string"}},"required":["body"],"type":"object"}}},"required":true}}

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


operation_id: pulls/delete-pending-review
path: /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}
method: DELETE
summary: Delete a pending review for a pull request
auth_scheme_ref: GitHubBearerToken
description:
  Deletes a pull request review that has not been submitted. Submitted reviews cannot be deleted.

  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/pull-number"},{"$ref":"#/components/parameters/review-id"}],"requestBody":null}

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


operation_id: pulls/list-comments-for-review
path: /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments
method: GET
summary: List comments for a pull request review
auth_scheme_ref: GitHubBearerToken
description:
  Lists comments for a specific pull request review.

  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/pull-number"},{"$ref":"#/components/parameters/review-id"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

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


operation_id: pulls/dismiss-review
path: /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals
method: PUT
summary: Dismiss a review for a pull request
auth_scheme_ref: GitHubBearerToken
description:
  Dismisses a specified review on a pull request.

  > [!NOTE]
  > To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/branches/branch-protection), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews.

  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/pull-number"},{"$ref":"#/components/parameters/review-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"event":"DISMISS","message":"You are dismissed"}}},"schema":{"properties":{"event":{"enum":["DISMISS"],"example":"\"DISMISS\"","type":"string"},"message":{"description":"The message for the pull request review dismissal","type":"string"}},"required":["message"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/pull-request-review-3"}},"schema":{"$ref":"#/components/schemas/pull-request-review"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed_simple"}}


operation_id: pulls/submit-review
path: /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events
method: POST
summary: Submit a review for a pull request
auth_scheme_ref: GitHubBearerToken
description:
  Submits a pending review for a pull request. For more information about creating a pending review for a pull request, see "[Create a review for a pull request](https://docs.github.com/rest/pulls/reviews#create-a-review-for-a-pull-request)."

  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/pull-number"},{"$ref":"#/components/parameters/review-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"body":"Here is the body for the review.","event":"REQUEST_CHANGES"}}},"schema":{"properties":{"body":{"description":"The body text of the pull request review","type":"string"},"event":{"description":"The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. When you leave this blank, the API returns _HTTP 422 (Unrecognizable entity)_ and sets the review action state to `PENDING`, which means you will need to re-submit the pull request review using a review action.","enum":["APPROVE","REQUEST_CHANGES","COMMENT"],"type":"string"}},"required":["event"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/pull-request-review-4"}},"schema":{"$ref":"#/components/schemas/pull-request-review"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed_simple"}}


operation_id: pulls/update-branch
path: /repos/{owner}/{repo}/pulls/{pull_number}/update-branch
method: PUT
summary: Update a pull request branch
auth_scheme_ref: GitHubBearerToken
description:
  Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch.
  Note: If making a request on behalf of a GitHub App you must also have permissions to write the contents of the head repository.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/pull-number"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"expected_head_sha":"6dcb09b5b57875f334f61aebed695e2e4193db5e"}}},"schema":{"nullable":true,"properties":{"expected_head_sha":{"description":"The expected SHA of the pull request's HEAD ref. This is the most recent commit on the pull request's branch. If the expected SHA does not match the pull request's HEAD, you will receive a `422 Unprocessable Entity` status. You can use the \"[List commits](https://docs.github.com/rest/commits/commits#list-commits)\" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref.","type":"string"}},"type":"object"}}}}}

output_schema:
  {"202":{"content":{"application/json":{"examples":{"default":{"value":{"message":"Updating pull request branch.","url":"https://github.com/repos/octocat/Hello-World/pulls/53"}}},"schema":{"properties":{"message":{"type":"string"},"url":{"type":"string"}},"type":"object"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: repos/get-readme
path: /repos/{owner}/{repo}/readme
method: GET
summary: Get a repository README
auth_scheme_ref: GitHubBearerToken
description:
  Gets the preferred README for a repository.

  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. This is the default if you do not specify a media type.
  - **`application/vnd.github.html+json`**: Returns the README in HTML. Markup languages are rendered to HTML using GitHub's open-source [Markup library](https://github.com/github/markup).

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"description":"The name of the commit/branch/tag. Default: the repository’s default branch.","in":"query","name":"ref","schema":{"type":"string"},"style":"form"}],"requestBody":null}

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


operation_id: repos/get-readme-in-directory
path: /repos/{owner}/{repo}/readme/{dir}
method: GET
summary: Get a repository README for a directory
auth_scheme_ref: GitHubBearerToken
description:
  Gets the README from a repository 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. This is the default if you do not specify a media type.
  - **`application/vnd.github.html+json`**: Returns the README in HTML. Markup languages are rendered to HTML using GitHub's open-source [Markup library](https://github.com/github/markup).

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"description":"The alternate path to look for a README file","in":"path","name":"dir","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":null}

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


operation_id: repos/list-releases
path: /repos/{owner}/{repo}/releases
method: GET
summary: List releases
auth_scheme_ref: GitHubBearerToken
description:
  This returns a list of releases, which does not include regular Git tags that have not been associated with a release. To get a list of Git tags, use the [Repository Tags API](https://docs.github.com/rest/repos/repos#list-repository-tags).

  Information about published releases are available to everyone. Only users with push access will receive listings for draft releases.

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

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


operation_id: repos/create-release
path: /repos/{owner}/{repo}/releases
method: POST
summary: Create a release
auth_scheme_ref: GitHubBearerToken
description:
  Users with push access to the repository can create a release.

  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)."

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"body":"Description of the release","draft":false,"generate_release_notes":false,"name":"v1.0.0","prerelease":false,"tag_name":"v1.0.0","target_commitish":"master"}}},"schema":{"properties":{"body":{"description":"Text describing the contents of the tag.","type":"string"},"discussion_category_name":{"description":"If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see \"[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository).\"","type":"string"},"draft":{"default":false,"description":"`true` to create a draft (unpublished) release, `false` to create a published one.","type":"boolean"},"generate_release_notes":{"default":false,"description":"Whether to automatically generate the name and body for this release. If `name` is specified, the specified name will be used; otherwise, a name will be automatically generated. If `body` is specified, the body will be pre-pended to the automatically generated notes.","type":"boolean"},"make_latest":{"default":"true","description":"Specifies whether this release should be set as the latest release for the repository. Drafts and prereleases cannot be set as latest. Defaults to `true` for newly published releases. `legacy` specifies that the latest release should be determined based on the release creation date and higher semantic version.","enum":["true","false","legacy"],"type":"string"},"name":{"description":"The name of the release.","type":"string"},"prerelease":{"default":false,"description":"`true` to identify the release as a prerelease. `false` to identify the release as a full release.","type":"boolean"},"tag_name":{"description":"The name of the tag.","type":"string"},"target_commitish":{"description":"Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch.","type":"string"}},"required":["tag_name"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/release"}},"schema":{"$ref":"#/components/schemas/release"}}},"description":"Response","headers":{"Location":{"example":"https://api.github.com/repos/octocat/Hello-World/releases/1","schema":{"type":"string"},"style":"simple"}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/basic-error"}}},"description":"Not Found if the discussion category name is invalid"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: repos/get-release-asset
path: /repos/{owner}/{repo}/releases/assets/{asset_id}
method: GET
summary: Get a release asset
auth_scheme_ref: GitHubBearerToken
description:
  To download the asset's binary content:

  - If within a browser, fetch the location specified in the `browser_download_url` key provided in the response.
  - Alternatively, set the `Accept` header of the request to 
    [`application/octet-stream`](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types). 
    The API will either redirect the client to the location, or stream it directly if possible.
    API clients should handle both a `200` or `302` response.

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

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


operation_id: repos/update-release-asset
path: /repos/{owner}/{repo}/releases/assets/{asset_id}
method: PATCH
summary: Update a release asset
description: Users with push access to the repository can edit a release asset.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/asset-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"label":"Mac binary","name":"foo-1.0.0-osx.zip"}}},"schema":{"properties":{"label":{"description":"An alternate short description of the asset. Used in place of the filename.","type":"string"},"name":{"description":"The file name of the asset.","type":"string"},"state":{"example":"\"uploaded\"","type":"string"}},"type":"object"}}}}}

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


operation_id: repos/generate-release-notes
path: /repos/{owner}/{repo}/releases/generate-notes
method: POST
summary: Generate release notes content for a release
auth_scheme_ref: GitHubBearerToken
description:
  Generate a name and body describing a [release](https://docs.github.com/rest/releases/releases#get-a-release). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"configuration_file_path":".github/custom_release_config.yml","previous_tag_name":"v0.9.2","tag_name":"v1.0.0","target_commitish":"main"}}},"schema":{"properties":{"configuration_file_path":{"description":"Specifies a path to a file in the repository containing configuration settings used for generating the release notes. If unspecified, the configuration file located in the repository at '.github/release.yml' or '.github/release.yaml' will be used. If that is not present, the default configuration will be used.","type":"string"},"previous_tag_name":{"description":"The name of the previous tag to use as the starting point for the release notes. Use to manually specify the range for the set of changes considered as part this release.","type":"string"},"tag_name":{"description":"The tag name for the release. This can be an existing tag or a new one.","type":"string"},"target_commitish":{"description":"Specifies the commitish value that will be the target for the release's tag. Required if the supplied tag_name does not reference an existing tag. Ignored if the tag_name already exists.","type":"string"}},"required":["tag_name"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/release-notes-content"}},"schema":{"$ref":"#/components/schemas/release-notes-content"}}},"description":"Name and body of generated release notes"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: repos/get-latest-release
path: /repos/{owner}/{repo}/releases/latest
method: GET
summary: Get the latest release
auth_scheme_ref: GitHubBearerToken
description:
  View the latest published full release for the repository.

  The latest release is the most recent non-prerelease, non-draft release, sorted by the `created_at` attribute. The `created_at` attribute is the date of the commit used for the release, and not the date when the release was drafted or published.

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

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


operation_id: repos/get-release-by-tag
path: /repos/{owner}/{repo}/releases/tags/{tag}
method: GET
summary: Get a release by tag name
description: Get a published release with the specified tag.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"description":"tag parameter","in":"path","name":"tag","required":true,"schema":{"type":"string"},"style":"simple","x-multi-segment":true}],"requestBody":null}

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


operation_id: repos/get-release
path: /repos/{owner}/{repo}/releases/{release_id}
method: GET
summary: Get a release
auth_scheme_ref: GitHubBearerToken
description:
  Gets a public release with the specified release ID.

  > [!NOTE]
  > This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a hypermedia resource. For more information, see "[Getting started with the REST API](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia)."

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

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/release"}},"schema":{"$ref":"#/components/schemas/release"}}},"description":"**Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a hypermedia resource. For more information, see \"[Getting started with the REST API](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia).\""},"401":{"description":"Unauthorized"}}


operation_id: repos/update-release
path: /repos/{owner}/{repo}/releases/{release_id}
method: PATCH
summary: Update a release
description: Users with push access to the repository can edit a release.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/release-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"body":"Description of the release","draft":false,"name":"v1.0.0","prerelease":false,"tag_name":"v1.0.0","target_commitish":"master"}}},"schema":{"properties":{"body":{"description":"Text describing the contents of the tag.","type":"string"},"discussion_category_name":{"description":"If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. If there is already a discussion linked to the release, this parameter is ignored. For more information, see \"[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository).\"","type":"string"},"draft":{"description":"`true` makes the release a draft, and `false` publishes the release.","type":"boolean"},"make_latest":{"default":"true","description":"Specifies whether this release should be set as the latest release for the repository. Drafts and prereleases cannot be set as latest. Defaults to `true` for newly published releases. `legacy` specifies that the latest release should be determined based on the release creation date and higher semantic version.","enum":["true","false","legacy"],"type":"string"},"name":{"description":"The name of the release.","type":"string"},"prerelease":{"description":"`true` to identify the release as a prerelease, `false` to identify the release as a full release.","type":"boolean"},"tag_name":{"description":"The name of the tag.","type":"string"},"target_commitish":{"description":"Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch.","type":"string"}},"type":"object"}}}}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/release"}},"schema":{"$ref":"#/components/schemas/release"}}},"description":"Response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/basic-error"}}},"description":"Not Found if the discussion category name is invalid"}}


operation_id: repos/list-release-assets
path: /repos/{owner}/{repo}/releases/{release_id}/assets
method: GET
summary: List release assets
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/release-id"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

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


operation_id: repos/upload-release-asset
path: /repos/{owner}/{repo}/releases/{release_id}/assets
method: POST
summary: Upload a release asset
auth_scheme_ref: GitHubBearerToken
description:
  This endpoint makes use of a [Hypermedia relation](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in
  the response of the [Create a release endpoint](https://docs.github.com/rest/releases/releases#create-a-release) to upload a release asset.

  You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint.

  Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: 

  `application/zip`

  GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example,
  you'll still need to pass your authentication to be able to upload an asset.

  When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted.

  **Notes:**
  *   GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List release assets](https://docs.github.com/rest/releases/assets#list-release-assets)"
  endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api).
  *   To find the `release_id` query the [`GET /repos/{owner}/{repo}/releases/latest` endpoint](https://docs.github.com/rest/releases/releases#get-the-latest-release). 
  *   If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/release-id"},{"in":"query","name":"name","required":true,"schema":{"type":"string"},"style":"form"},{"in":"query","name":"label","schema":{"type":"string"},"style":"form"}],"requestBody":{"content":{"application/octet-stream":{"examples":{"default":{"value":"@example.zip"}},"schema":{"description":"The raw file data","format":"binary","type":"string"}}}}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"response-for-successful-upload":{"$ref":"#/components/examples/release-asset-response-for-successful-upload"}},"schema":{"$ref":"#/components/schemas/release-asset"}}},"description":"Response for successful upload"},"422":{"description":"Response if you upload an asset with the same filename as another uploaded asset"}}


operation_id: reactions/list-for-release
path: /repos/{owner}/{repo}/releases/{release_id}/reactions
method: GET
summary: List reactions for a release
description: List the reactions to a [release](https://docs.github.com/rest/releases/releases#get-a-release).
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/release-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 release.","in":"query","name":"content","schema":{"enum":["+1","laugh","heart","hooray","rocket","eyes"],"type":"string"},"style":"form"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

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


operation_id: reactions/create-for-release
path: /repos/{owner}/{repo}/releases/{release_id}/reactions
method: POST
summary: Create reaction for a release
auth_scheme_ref: GitHubBearerToken
description:
  Create a reaction to a [release](https://docs.github.com/rest/releases/releases#get-a-release). A response with a `Status: 200 OK` means that you already added the reaction type to this release.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/release-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 release.","enum":["+1","laugh","heart","hooray","rocket","eyes"],"type":"string"}},"required":["content"],"type":"object"}}},"required":true}}

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


operation_id: reactions/delete-for-release
path: /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}
method: DELETE
summary: Delete a release 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 delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`.

  Delete a reaction to a [release](https://docs.github.com/rest/releases/releases#get-a-release).

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


operation_id: repos/get-branch-rules
path: /repos/{owner}/{repo}/rules/branches/{branch}
method: GET
summary: Get rules for a branch
auth_scheme_ref: GitHubBearerToken
description:
  Returns all active rules that apply to the specified branch. The branch does not need to exist; rules that would apply
  to a branch with that name will be returned. All active rules that apply will be returned, regardless of the level
  at which they are configured (e.g. repository or organization). Rules in rulesets with "evaluate" or "disabled"
  enforcement statuses are not returned.

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

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


operation_id: repos/get-repo-rulesets
path: /repos/{owner}/{repo}/rulesets
method: GET
summary: Get all repository rulesets
description: Get all the rulesets for a repository.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"},{"description":"Include rulesets configured at higher levels that apply to this repository","in":"query","name":"includes_parents","schema":{"default":true,"type":"boolean"},"style":"form"},{"$ref":"#/components/parameters/ruleset-targets"}],"requestBody":null}

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


operation_id: repos/create-repo-ruleset
path: /repos/{owner}/{repo}/rulesets
method: POST
summary: Create a repository ruleset
description: Create a ruleset for a repository.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"bypass_actors":[{"actor_id":234,"actor_type":"Team","bypass_mode":"always"}],"conditions":{"ref_name":{"exclude":["refs/heads/dev*"],"include":["refs/heads/main","refs/heads/master"]}},"enforcement":"active","name":"super cool ruleset","rules":[{"parameters":{"operator":"contains","pattern":"github"},"type":"commit_author_email_pattern"}],"target":"branch"}}},"schema":{"properties":{"bypass_actors":{"description":"The actors that can bypass the rules in this ruleset","items":{"$ref":"#/components/schemas/repository-ruleset-bypass-actor"},"type":"array"},"conditions":{"$ref":"#/components/schemas/repository-ruleset-conditions"},"enforcement":{"$ref":"#/components/schemas/repository-rule-enforcement"},"name":{"description":"The name of the ruleset.","type":"string"},"rules":{"description":"An array of rules within the ruleset.","items":{"$ref":"#/components/schemas/repository-rule"},"type":"array"},"target":{"default":"branch","description":"The target of the ruleset","enum":["branch","tag","push"],"type":"string"}},"required":["name","enforcement"],"type":"object"}}},"description":"Request body","required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/repository-ruleset"}},"schema":{"$ref":"#/components/schemas/repository-ruleset"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: repos/get-repo-rule-suites
path: /repos/{owner}/{repo}/rulesets/rule-suites
method: GET
summary: List repository rule suites
auth_scheme_ref: GitHubBearerToken
description:
  Lists suites of rule evaluations at the repository level.
  For more information, see "[Managing rulesets for a repository](https://docs.github.com/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/managing-rulesets-for-a-repository#viewing-insights-for-rulesets)."

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/ref-in-query"},{"$ref":"#/components/parameters/time-period"},{"$ref":"#/components/parameters/actor-name-in-query"},{"$ref":"#/components/parameters/rule-suite-result"},{"$ref":"#/components/parameters/evaluate-status"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/rule-suite-items"}},"schema":{"$ref":"#/components/schemas/rule-suites"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: repos/get-repo-rule-suite
path: /repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}
method: GET
summary: Get a repository rule suite
auth_scheme_ref: GitHubBearerToken
description:
  Gets information about a suite of rule evaluations from within a repository.
  For more information, see "[Managing rulesets for a repository](https://docs.github.com/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/managing-rulesets-for-a-repository#viewing-insights-for-rulesets)."

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

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


operation_id: repos/get-repo-ruleset
path: /repos/{owner}/{repo}/rulesets/{ruleset_id}
method: GET
summary: Get a repository ruleset
auth_scheme_ref: GitHubBearerToken
description:
  Get a ruleset for a repository.

  **Note:** To prevent leaking sensitive information, the `bypass_actors` property is only returned if the user
  making the API request has write access to the ruleset.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"description":"The ID of the ruleset.","in":"path","name":"ruleset_id","required":true,"schema":{"type":"integer"},"style":"simple"},{"description":"Include rulesets configured at higher levels that apply to this repository","in":"query","name":"includes_parents","schema":{"default":true,"type":"boolean"},"style":"form"}],"requestBody":null}

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


operation_id: repos/update-repo-ruleset
path: /repos/{owner}/{repo}/rulesets/{ruleset_id}
method: PUT
summary: Update a repository ruleset
description: Update a ruleset for a repository.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"description":"The ID of the ruleset.","in":"path","name":"ruleset_id","required":true,"schema":{"type":"integer"},"style":"simple"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"bypass_actors":[{"actor_id":234,"actor_type":"Team","bypass_mode":"always"}],"conditions":{"ref_name":{"exclude":["refs/heads/dev*"],"include":["refs/heads/main","refs/heads/master"]}},"enforcement":"active","name":"super cool ruleset","rules":[{"parameters":{"operator":"contains","pattern":"github"},"type":"commit_author_email_pattern"}],"target":"branch"}}},"schema":{"properties":{"bypass_actors":{"description":"The actors that can bypass the rules in this ruleset","items":{"$ref":"#/components/schemas/repository-ruleset-bypass-actor"},"type":"array"},"conditions":{"$ref":"#/components/schemas/repository-ruleset-conditions"},"enforcement":{"$ref":"#/components/schemas/repository-rule-enforcement"},"name":{"description":"The name of the ruleset.","type":"string"},"rules":{"description":"An array of rules within the ruleset.","items":{"$ref":"#/components/schemas/repository-rule"},"type":"array"},"target":{"description":"The target of the ruleset","enum":["branch","tag","push"],"type":"string"}},"type":"object"}}},"description":"Request body"}}

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


operation_id: repos/delete-repo-ruleset
path: /repos/{owner}/{repo}/rulesets/{ruleset_id}
method: DELETE
summary: Delete a repository ruleset
description: Delete a ruleset for a repository.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"description":"The ID of the ruleset.","in":"path","name":"ruleset_id","required":true,"schema":{"type":"integer"},"style":"simple"}],"requestBody":null}

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


operation_id: repos/get-repo-ruleset-history
path: /repos/{owner}/{repo}/rulesets/{ruleset_id}/history
method: GET
summary: Get repository ruleset history
description: Get the history of a repository ruleset.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"},{"description":"The ID of the ruleset.","in":"path","name":"ruleset_id","required":true,"schema":{"type":"integer"},"style":"simple"}],"requestBody":null}

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


operation_id: repos/get-repo-ruleset-version
path: /repos/{owner}/{repo}/rulesets/{ruleset_id}/history/{version_id}
method: GET
summary: Get repository ruleset version
description: Get a version of a repository ruleset.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"description":"The ID of the ruleset.","in":"path","name":"ruleset_id","required":true,"schema":{"type":"integer"},"style":"simple"},{"description":"The ID of the version","in":"path","name":"version_id","required":true,"schema":{"type":"integer"},"style":"simple"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/repository-ruleset-version-with-state"}},"schema":{"$ref":"#/components/schemas/ruleset-version-with-state"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: secret-scanning/list-alerts-for-repo
path: /repos/{owner}/{repo}/secret-scanning/alerts
method: GET
summary: List secret scanning alerts for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Lists secret scanning alerts for an eligible repository, from newest to oldest.

  The authenticated user must be an administrator for the repository or for the organization that owns the repository to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `repo` or `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/secret-scanning-alert-state"},{"$ref":"#/components/parameters/secret-scanning-alert-secret-type"},{"$ref":"#/components/parameters/secret-scanning-alert-exclude-secret-types"},{"$ref":"#/components/parameters/secret-scanning-alert-exclude-providers"},{"$ref":"#/components/parameters/secret-scanning-alert-providers"},{"$ref":"#/components/parameters/secret-scanning-alert-resolution"},{"$ref":"#/components/parameters/secret-scanning-alert-assignee"},{"$ref":"#/components/parameters/secret-scanning-alert-sort"},{"$ref":"#/components/parameters/direction"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/secret-scanning-pagination-before-org-repo"},{"$ref":"#/components/parameters/secret-scanning-pagination-after-org-repo"},{"$ref":"#/components/parameters/secret-scanning-alert-validity"},{"$ref":"#/components/parameters/secret-scanning-alert-publicly-leaked"},{"$ref":"#/components/parameters/secret-scanning-alert-multi-repo"},{"$ref":"#/components/parameters/secret-scanning-alert-hide-secret"},{"$ref":"#/components/parameters/secret-scanning-alert-bypassed"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/secret-scanning-alert-list"}},"schema":{"items":{"$ref":"#/components/schemas/secret-scanning-alert"},"type":"array"}}},"description":"Response"},"404":{"description":"Repository is public or secret scanning is disabled for the repository"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: secret-scanning/get-alert
path: /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}
method: GET
summary: Get a secret scanning alert
auth_scheme_ref: GitHubBearerToken
description:
  Gets a single secret scanning alert detected in an eligible repository.

  The authenticated user must be an administrator for the repository or for the organization that owns the repository to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `repo` or `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/alert-number"},{"$ref":"#/components/parameters/secret-scanning-alert-hide-secret"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/secret-scanning-alert-open"}},"schema":{"$ref":"#/components/schemas/secret-scanning-alert"}}},"description":"Response"},"304":{"$ref":"#/components/responses/not_modified"},"404":{"description":"Repository is public, or secret scanning is disabled for the repository, or the resource is not found"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: secret-scanning/update-alert
path: /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}
method: PATCH
summary: Update a secret scanning alert
auth_scheme_ref: GitHubBearerToken
description:
  Updates the status of a secret scanning alert in an eligible repository.

  You can also use this endpoint to assign or unassign an alert to a user who has write access to the repository.

  The authenticated user must be an administrator for the repository or for the organization that owns the repository to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `repo` or `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/alert-number"}],"requestBody":{"content":{"application/json":{"examples":{"assign":{"summary":"Assign alert to a user","value":{"assignee":"octocat"}},"default":{"value":{"resolution":"false_positive","state":"resolved"}},"unassign":{"summary":"Unassign alert","value":{"assignee":null}}},"schema":{"anyOf":[{"required":["state"]},{"required":["assignee"]},{"required":["validity"]}],"properties":{"assignee":{"$ref":"#/components/schemas/secret-scanning-alert-assignee"},"resolution":{"$ref":"#/components/schemas/secret-scanning-alert-resolution"},"resolution_comment":{"$ref":"#/components/schemas/secret-scanning-alert-resolution-comment"},"state":{"$ref":"#/components/schemas/secret-scanning-alert-state"},"validity":{"description":"Sets the validity of the secret scanning alert. Can be `active`, `inactive`, or `null` to clear the override.","enum":["active","inactive"],"nullable":true,"type":"string"}},"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/secret-scanning-alert-resolved"}},"schema":{"$ref":"#/components/schemas/secret-scanning-alert"}}},"description":"Response"},"400":{"description":"Bad request, resolution comment is invalid or the resolution was not changed."},"403":{"description":"Delegated alert dismissal is enabled and the authenticated user is not a valid reviewer."},"404":{"description":"Repository is public, or secret scanning is disabled for the repository, or the resource is not found"},"422":{"description":"State does not match the resolution or resolution comment, assignee does not have write access to the repository, or the requested validity change could not be applied to this alert"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: secret-scanning/list-locations-for-alert
path: /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations
method: GET
summary: List locations for a secret scanning alert
auth_scheme_ref: GitHubBearerToken
description:
  Lists all locations for a given secret scanning alert for an eligible repository.

  The authenticated user must be an administrator for the repository or for the organization that owns the repository to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `repo` or `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/alert-number"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per-page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/secret-scanning-location-list"}},"schema":{"description":"List of locations where the secret was detected","items":{"$ref":"#/components/schemas/secret-scanning-location"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"404":{"description":"Repository is public, or secret scanning is disabled for the repository, or the resource is not found"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: secret-scanning/create-push-protection-bypass
path: /repos/{owner}/{repo}/secret-scanning/push-protection-bypasses
method: POST
summary: Create a push protection bypass
auth_scheme_ref: GitHubBearerToken
description:
  Creates a bypass for a previously push protected secret.

  The authenticated user must be the original author of the committed secret.

  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":{"placeholder_id":"2k4dM4tseyC5lPIsjl5emX9sPNk","reason":"will_fix_later"}}},"schema":{"properties":{"placeholder_id":{"$ref":"#/components/schemas/secret-scanning-push-protection-bypass-placeholder-id"},"reason":{"$ref":"#/components/schemas/secret-scanning-push-protection-bypass-reason"}},"required":["reason","placeholder_id"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/secret-scanning-push-protection-bypass"}},"schema":{"$ref":"#/components/schemas/secret-scanning-push-protection-bypass"}}},"description":"Response"},"403":{"description":"User does not have enough permissions to perform this action."},"404":{"description":"Placeholder ID not found, or push protection is disabled on this repository."},"422":{"description":"Bad request, input data missing or incorrect."},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: secret-scanning/get-scan-history
path: /repos/{owner}/{repo}/secret-scanning/scan-history
method: GET
summary: Get secret scanning scan history for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Lists the latest default incremental and backfill scans by type for a repository.

  > [!NOTE]
  > This endpoint requires [GitHub Advanced Security](https://docs.github.com/get-started/learning-about-github/about-github-advanced-security).

  OAuth app tokens and personal access tokens (classic) need the `repo` or `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:
[cell repeats an earlier one in this file: 116 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/secret-scanning-scan-history"}},"schema":{"$ref":"#/components/schemas/secret-scanning-scan-history"}}},"description":"Response"},"404":{"description":"Repository does not have GitHub Advanced Security or secret scanning enabled"},"503":{"$ref":"#/components/responses/service_unavailable"}}


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

  The authenticated user can access unpublished security advisories from a repository if they are a security manager or administrator of that repository, or if they are a collaborator on any security advisory.

  OAuth app tokens and personal access tokens (classic) need the `repo` or `repository_advisories:read` scope to to get a published security advisory in a private repository, or any unpublished security advisory that the authenticated user has access to.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/direction"},{"description":"The property to sort the results by.","in":"query","name":"sort","schema":{"default":"created","enum":["created","updated","published"],"type":"string"},"style":"form"},{"$ref":"#/components/parameters/pagination-before"},{"$ref":"#/components/parameters/pagination-after"},{"description":"The number of advisories to return per page. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"","in":"query","name":"per_page","schema":{"default":30,"maximum":100,"minimum":1,"type":"integer"},"style":"form"},{"description":"Filter by state of the repository advisories. Only advisories of this state will be returned.","in":"query","name":"state","schema":{"enum":["triage","draft","published","closed"],"type":"string"},"style":"form"}],"requestBody":null}

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


operation_id: security-advisories/create-repository-advisory
path: /repos/{owner}/{repo}/security-advisories
method: POST
summary: Create a repository security advisory
auth_scheme_ref: GitHubBearerToken
description:
  Creates a new repository security advisory.

  In order to create a draft repository security advisory, the authenticated user must be a security manager or administrator of that repository.

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"credits":[{"login":"monalisa","type":"reporter"},{"login":"octocat","type":"analyst"}],"cve_id":null,"cwe_ids":["CWE-1101","CWE-20"],"description":"A more in-depth description of what the problem is.","severity":"high","summary":"A new important advisory","vulnerabilities":[{"package":{"ecosystem":"npm","name":"a-package"},"patched_versions":"1.0.0","vulnerable_functions":["important_function"],"vulnerable_version_range":"< 1.0.0"}]}},"minimal":{"value":{"description":"A more in-depth description of what the problem is.","summary":"A new important advisory","vulnerabilities":[{"package":{"ecosystem":"npm"}}]}},"withVectorString":{"value":{"credits":[{"login":"monalisa","type":"reporter"},{"login":"octocat","type":"analyst"}],"cve_id":null,"cvss_vector_string":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","cwe_ids":["CWE-1101","CWE-20"],"description":"A more in-depth description of what the problem is.","summary":"A new important advisory","vulnerabilities":[{"package":{"ecosystem":"npm","name":"a-package"},"patched_versions":"1.0.0","vulnerable_functions":["important_function"],"vulnerable_version_range":"< 1.0.0"}]}}},"schema":{"$ref":"#/components/schemas/repository-advisory-create"}}},"required":true}}

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


operation_id: security-advisories/create-private-vulnerability-report
path: /repos/{owner}/{repo}/security-advisories/reports
method: POST
summary: Privately report a security vulnerability
auth_scheme_ref: GitHubBearerToken
description:
  Report a security vulnerability to the maintainers of the repository.
  See "[Privately reporting a security vulnerability](https://docs.github.com/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability)" for more information about private vulnerability reporting.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"cwe_ids":["CWE-123"],"description":"A more in-depth description of what the problem is.","severity":"high","summary":"A newly discovered vulnerability","vulnerabilities":[{"package":{"ecosystem":"npm","name":"a-package"},"patched_versions":"1.0.0","vulnerable_functions":["important_function"],"vulnerable_version_range":"< 1.0.0"}]}}},"schema":{"$ref":"#/components/schemas/private-vulnerability-report-create"}}},"required":true}}

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


operation_id: security-advisories/get-repository-advisory
path: /repos/{owner}/{repo}/security-advisories/{ghsa_id}
method: GET
summary: Get a repository security advisory
auth_scheme_ref: GitHubBearerToken
description:
  Get a repository security advisory using its GitHub Security Advisory (GHSA) identifier.

  Anyone can access any published security advisory on a public repository.

  The authenticated user can access an unpublished security advisory from a repository if they are a security manager or administrator of that repository, or if they are a
  collaborator on the security advisory.

  OAuth app tokens and personal access tokens (classic) need the `repo` or `repository_advisories:read` scope to to get a published security advisory in a private repository, or any unpublished security advisory that the authenticated user has access to.

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

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


operation_id: security-advisories/update-repository-advisory
path: /repos/{owner}/{repo}/security-advisories/{ghsa_id}
method: PATCH
summary: Update a repository security advisory
auth_scheme_ref: GitHubBearerToken
description:
  Update a repository security advisory using its GitHub Security Advisory (GHSA) identifier.

  In order to update any security advisory, the authenticated user must be a security manager or administrator of that repository,
  or a collaborator on the repository security advisory.

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/ghsa_id"}],"requestBody":{"content":{"application/json":{"examples":{"add_credit":{"summary":"To add a credit to an advisory, send the whole array of values.","value":{"credits":[{"login":"monauser","type":"remediation_developer"}]}},"default":{"summary":"Updating the severity and state.","value":{"severity":"critical","state":"published"}},"invalid_state_transition":{"summary":"Example of an invalid state transition, from `published` to `draft`.","value":{"state":"draft"}},"update_severity_with_cvss_set":{"summary":"Severity cannot be updated when the CVSS is already set.","value":{"severity":"low"}},"update_vvrs":{"summary":"To add vulnerable versions, include existing versions in the array.","value":[{"package":{"ecosystem":"pip","name":"a-package"},"patched_versions":"1.0.1","vulnerable_functions":["function1"],"vulnerable_version_range":">= 1.0.0, < 1.0.1"},{"package":{"ecosystem":"pip","name":"another-package"},"patched_versions":"1.0.2","vulnerable_functions":["function2"],"vulnerable_version_range":">= 1.0.0, < 1.0.2"}]}},"schema":{"$ref":"#/components/schemas/repository-advisory-update"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"add_credit":{"$ref":"#/components/examples/repository-advisory"},"default":{"$ref":"#/components/examples/repository-advisory"}},"schema":{"$ref":"#/components/schemas/repository-advisory"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"content":{"application/json":{"examples":{"invalid_state_transition":{"value":{"message":"Invalid state transition from `published` to `draft`."}},"update_severity_with_cvss_set":{"value":{"message":"Cannot update severity value when CVSS is set."}}},"schema":{"$ref":"#/components/schemas/validation-error"}}},"description":"Validation failed, or the endpoint has been spammed."}}


operation_id: security-advisories/create-repository-advisory-cve-request
path: /repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve
method: POST
summary: Request a CVE for a repository security advisory
auth_scheme_ref: GitHubBearerToken
description:
  If you want a CVE identification number for the security vulnerability in your project, and don't already have one, you can request a CVE identification number from GitHub. For more information see "[Requesting a CVE identification number](https://docs.github.com/code-security/security-advisories/repository-security-advisories/publishing-a-repository-security-advisory#requesting-a-cve-identification-number-optional)."

  You may request a CVE for public repositories, but cannot do so for private repositories.

  In order to request a CVE for a repository security advisory, the authenticated user must be a security manager or administrator of that repository.

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

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

output_schema:
  {"202":{"$ref":"#/components/responses/accepted"},"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: security-advisories/create-fork
path: /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks
method: POST
summary: Create a temporary private fork
auth_scheme_ref: GitHubBearerToken
description:
  Create a temporary private fork to collaborate on fixing a security vulnerability in your repository.

  > [!NOTE]
  > Forking a repository happens asynchronously. You may have to wait up to 5 minutes before you can access the fork.

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

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: activity/list-stargazers-for-repo
path: /repos/{owner}/{repo}/stargazers
method: GET
summary: List stargazers
auth_scheme_ref: GitHubBearerToken
description:
  Lists the people that have starred the repository.

  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.star+json`**: Includes a timestamp of when the star was created.

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

output_schema:
  {"200":{"content":{"application/json":{"examples":{"alternative-response-with-star-creation-timestamps":{"$ref":"#/components/examples/stargazer-items-alternative-response-with-star-creation-timestamps"},"default-response":{"$ref":"#/components/examples/simple-user-items-default-response"}},"schema":{"anyOf":[{"items":{"$ref":"#/components/schemas/simple-user"},"type":"array"},{"items":{"$ref":"#/components/schemas/stargazer"},"type":"array"}]}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: repos/get-code-frequency-stats
path: /repos/{owner}/{repo}/stats/code_frequency
method: GET
summary: Get the weekly commit activity
auth_scheme_ref: GitHubBearerToken
description:
  Returns a weekly aggregate of the number of additions and deletions pushed to a repository.

  > [!NOTE]
  > This endpoint can only be used for repositories with fewer than 10,000 commits. If the repository contains 10,000 or more commits, a 422 status code will be returned.

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

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/code-frequency-stat-items"}},"schema":{"items":{"$ref":"#/components/schemas/code-frequency-stat"},"type":"array"}}},"description":"Returns a weekly aggregate of the number of additions and deletions pushed to a repository."},"202":{"$ref":"#/components/responses/accepted"},"204":{"$ref":"#/components/responses/no_content"},"422":{"description":"Repository contains more than 10,000 commits"}}


operation_id: repos/get-commit-activity-stats
path: /repos/{owner}/{repo}/stats/commit_activity
method: GET
summary: Get the last year of commit activity
auth_scheme_ref: GitHubBearerToken
description:
  Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`.

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

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/commit-activity-items"}},"schema":{"items":{"$ref":"#/components/schemas/commit-activity"},"type":"array"}}},"description":"Response"},"202":{"$ref":"#/components/responses/accepted"},"204":{"$ref":"#/components/responses/no_content"}}


operation_id: repos/get-contributors-stats
path: /repos/{owner}/{repo}/stats/contributors
method: GET
summary: Get all contributor commit activity
auth_scheme_ref: GitHubBearerToken
description:
  Returns the `total` number of commits authored by the contributor. In addition, the response includes a Weekly Hash (`weeks` array) with the following information:

  *   `w` - Start of the week, given as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time).
  *   `a` - Number of additions
  *   `d` - Number of deletions
  *   `c` - Number of commits

  > [!NOTE]
  > This endpoint will return `0` values for all addition and deletion counts in repositories with 10,000 or more commits.

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

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/contributor-activity-items"}},"schema":{"items":{"$ref":"#/components/schemas/contributor-activity"},"type":"array"}}},"description":"Response"},"202":{"$ref":"#/components/responses/accepted"},"204":{"$ref":"#/components/responses/no_content"}}


operation_id: repos/get-participation-stats
path: /repos/{owner}/{repo}/stats/participation
method: GET
summary: Get the weekly commit count
auth_scheme_ref: GitHubBearerToken
description:
  Returns the total commit counts for the `owner` and total commit counts in `all`. `all` is everyone combined, including the `owner` in the last 52 weeks. If you'd like to get the commit counts for non-owners, you can subtract `owner` from `all`.

  The array order is oldest week (index 0) to most recent week.

  The most recent week is seven days ago at UTC midnight to today at UTC midnight.

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

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/participation-stats"}},"schema":{"$ref":"#/components/schemas/participation-stats"}}},"description":"The array order is oldest week (index 0) to most recent week."},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: repos/get-punch-card-stats
path: /repos/{owner}/{repo}/stats/punch_card
method: GET
summary: Get the hourly commit count for each day
auth_scheme_ref: GitHubBearerToken
description:
  Each array contains the day number, hour number, and number of commits:

  *   `0-6`: Sunday - Saturday
  *   `0-23`: Hour of day
  *   Number of commits

  For example, `[2, 14, 25]` indicates that there were 25 total commits, during the 2:00pm hour on Tuesdays. All times are based on the time zone of individual commits.

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

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/code-frequency-stat-items-2"}},"schema":{"items":{"$ref":"#/components/schemas/code-frequency-stat"},"type":"array"}}},"description":"For example, `[2, 14, 25]` indicates that there were 25 total commits, during the 2:00pm hour on Tuesdays. All times are based on the time zone of individual commits."},"204":{"$ref":"#/components/responses/no_content"}}


operation_id: repos/create-commit-status
path: /repos/{owner}/{repo}/statuses/{sha}
method: POST
summary: Create a commit status
auth_scheme_ref: GitHubBearerToken
description:
  Users with push access in a repository can create commit statuses for a given SHA.

  Note: there is a limit of 1000 statuses per `sha` and `context` within a repository. Attempts to create more than 1000 statuses will result in a validation error.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"in":"path","name":"sha","required":true,"schema":{"type":"string"},"style":"simple","x-multi-segment":true}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"context":"continuous-integration/jenkins","description":"The build succeeded!","state":"success","target_url":"https://example.com/build/status"}}},"schema":{"properties":{"context":{"default":"default","description":"A string label to differentiate this status from the status of other systems. This field is case-insensitive.","type":"string"},"description":{"description":"A short description of the status.","nullable":true,"type":"string"},"state":{"description":"The state of the status.","enum":["error","failure","pending","success"],"type":"string"},"target_url":{"description":"The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the source of the status.  \nFor example, if your continuous integration system is posting build status, you would want to provide the deep link for the build output for this specific SHA:  \n`http://ci.example.com/user/repo/build/sha`","nullable":true,"type":"string"}},"required":["state"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/status"}},"schema":{"$ref":"#/components/schemas/status"}}},"description":"Response","headers":{"Location":{"example":"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e","schema":{"type":"string"},"style":"simple"}}}}


operation_id: activity/get-repo-subscription
path: /repos/{owner}/{repo}/subscription
method: GET
summary: Get a repository subscription
description: Gets information about whether the authenticated user is subscribed to the repository.
auth_scheme_ref: GitHubBearerToken
input_schema:
[cell repeats an earlier one in this file: 116 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"response-if-you-subscribe-to-the-repository":{"$ref":"#/components/examples/repository-subscription-response-if-you-subscribe-to-the-repository"}},"schema":{"$ref":"#/components/schemas/repository-subscription"}}},"description":"if you subscribe to the repository"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"description":"Not Found if you don't subscribe to the repository"}}


operation_id: activity/set-repo-subscription
path: /repos/{owner}/{repo}/subscription
method: PUT
summary: Set a repository subscription
auth_scheme_ref: GitHubBearerToken
description:
  If you would like to watch a repository, set `subscribed` to `true`. If you would like to ignore notifications made within a repository, set `ignored` to `true`. If you would like to stop watching a repository, [delete the repository's subscription](https://docs.github.com/rest/activity/watching#delete-a-repository-subscription) completely.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"ignored":false,"subscribed":true}}},"schema":{"properties":{"ignored":{"description":"Determines if all notifications should be blocked from this repository.","type":"boolean"},"subscribed":{"description":"Determines if notifications should be received from this repository.","type":"boolean"}},"type":"object"}}}}}

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


operation_id: activity/delete-repo-subscription
path: /repos/{owner}/{repo}/subscription
method: DELETE
summary: Delete a repository subscription
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  This endpoint should only be used to stop watching a repository. To control whether or not you wish to receive notifications from a repository, [set the repository's subscription manually](https://docs.github.com/rest/activity/watching#set-a-repository-subscription).

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


operation_id: repos/list-tags
path: /repos/{owner}/{repo}/tags
method: GET
summary: List repository tags
auth_scheme_ref: GitHubBearerToken
input_schema:
[cell repeats an earlier one in this file: 200 characters]

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


operation_id: repos/download-tarball-archive
path: /repos/{owner}/{repo}/tarball/{ref}
method: GET
summary: Download a repository archive (tar)
auth_scheme_ref: GitHubBearerToken
description:
  Gets a redirect URL to download a tar archive for a repository. If you omit `:ref`, the repository’s default branch (usually
  `main`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use
  the `Location` header to make a second `GET` request.

  > [!NOTE]
  > For private repositories, these links are temporary and expire after five minutes.

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

output_schema:
  {"302":{"description":"Response","headers":{"Location":{"example":"https://codeload.github.com/me/myprivate/legacy.zip/master?login=me&token=thistokenexpires","schema":{"type":"string"},"style":"simple"}}}}


operation_id: repos/list-teams
path: /repos/{owner}/{repo}/teams
method: GET
summary: List repository teams
auth_scheme_ref: GitHubBearerToken
description:
  Lists the teams that have access to the specified repository and that are also visible to the authenticated user.

  For a public repository, a team is listed only if that team added the public repository explicitly.

  OAuth app tokens and personal access tokens (classic) need the `public_repo` or `repo` scope to use this endpoint with a public repository, and `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/team-items"}},"schema":{"items":{"$ref":"#/components/schemas/team"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: repos/get-all-topics
path: /repos/{owner}/{repo}/topics
method: GET
summary: Get all repository topics
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per-page"}],"requestBody":null}

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


operation_id: repos/replace-all-topics
path: /repos/{owner}/{repo}/topics
method: PUT
summary: Replace all repository topics
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"names":["octocat","atom","electron","api"]}}},"schema":{"properties":{"names":{"description":"An array of topics to add to the repository. Pass one or more topics to _replace_ the set of existing topics. Send an empty array (`[]`) to clear all topics from the repository. **Note:** Topic `names` will be saved as lowercase.","items":{"type":"string"},"type":"array"}},"required":["names"],"type":"object"}}},"required":true}}

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


operation_id: repos/get-clones
path: /repos/{owner}/{repo}/traffic/clones
method: GET
summary: Get repository clones
auth_scheme_ref: GitHubBearerToken
description:
  Get the total number of clones and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday.

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

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


operation_id: repos/get-top-paths
path: /repos/{owner}/{repo}/traffic/popular/paths
method: GET
summary: Get top referral paths
description: Get the top 10 popular contents over the last 14 days.
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/content-traffic-items"}},"schema":{"items":{"$ref":"#/components/schemas/content-traffic"},"type":"array"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"}}


operation_id: repos/get-top-referrers
path: /repos/{owner}/{repo}/traffic/popular/referrers
method: GET
summary: Get top referral sources
description: Get the top 10 referrers over the last 14 days.
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/referrer-traffic-items"}},"schema":{"items":{"$ref":"#/components/schemas/referrer-traffic"},"type":"array"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"}}


operation_id: repos/get-views
path: /repos/{owner}/{repo}/traffic/views
method: GET
summary: Get page views
auth_scheme_ref: GitHubBearerToken
description:
  Get the total number of views and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday.

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

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


operation_id: repos/transfer
path: /repos/{owner}/{repo}/transfer
method: POST
summary: Transfer a repository
auth_scheme_ref: GitHubBearerToken
description:
  A transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original `owner`, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see [about repository transfers](https://docs.github.com/articles/about-repository-transfers/).

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"new_name":"octorepo","new_owner":"github","team_ids":[12,345]}}},"schema":{"properties":{"new_name":{"description":"The new name to be given to the repository.","type":"string"},"new_owner":{"description":"The username or organization name the repository will be transferred to.","type":"string"},"team_ids":{"description":"ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories.","items":{"type":"integer"},"type":"array"}},"required":["new_owner"],"type":"object"}}},"required":true}}

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


operation_id: repos/check-vulnerability-alerts
path: /repos/{owner}/{repo}/vulnerability-alerts
method: GET
summary: Check if vulnerability alerts are enabled for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin read access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)".

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

output_schema:
  {"204":{"description":"Response if repository is enabled with vulnerability alerts"},"404":{"description":"Not Found if repository is not enabled with vulnerability alerts"}}


operation_id: repos/enable-vulnerability-alerts
path: /repos/{owner}/{repo}/vulnerability-alerts
method: PUT
summary: Enable vulnerability alerts
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Enables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)".

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


operation_id: repos/disable-vulnerability-alerts
path: /repos/{owner}/{repo}/vulnerability-alerts
method: DELETE
summary: Disable vulnerability alerts
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Disables dependency alerts and the dependency graph for a repository.
  The authenticated user must have admin access to the repository. For more information,
  see "[About security alerts for vulnerable dependencies](https://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)".

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


operation_id: repos/download-zipball-archive
path: /repos/{owner}/{repo}/zipball/{ref}
method: GET
summary: Download a repository archive (zip)
auth_scheme_ref: GitHubBearerToken
description:
  Gets a redirect URL to download a zip archive for a repository. If you omit `:ref`, the repository’s default branch (usually
  `main`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use
  the `Location` header to make a second `GET` request.

  > [!NOTE]
  > For private repositories, these links are temporary and expire after five minutes. If the repository is empty, you will receive a 404 when you follow the redirect.

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

output_schema:
  {"302":{"description":"Response","headers":{"Location":{"example":"https://codeload.github.com/me/myprivate/legacy.zip/master?login=me&token=thistokenexpires","schema":{"type":"string"},"style":"simple"}}}}


operation_id: repos/create-using-template
path: /repos/{template_owner}/{template_repo}/generate
method: POST
summary: Create a repository using a template
auth_scheme_ref: GitHubBearerToken
description:
  Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. If the repository is not public, the authenticated user must own or be a member of an organization that owns the repository. To check if a repository is available to use as a template, get the repository's information using the [Get a repository](https://docs.github.com/rest/repos/repos#get-a-repository) endpoint and check that the `is_template` key is `true`.

  OAuth app tokens and personal access tokens (classic) need the `public_repo` or `repo` scope to create a public repository, and `repo` scope to create a private repository.

input_schema:
  {"parameters":[{"description":"The account owner of the template repository. The name is not case sensitive.","in":"path","name":"template_owner","required":true,"schema":{"type":"string"},"style":"simple"},{"description":"The name of the template repository without the `.git` extension. The name is not case sensitive.","in":"path","name":"template_repo","required":true,"schema":{"type":"string"},"style":"simple"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"description":"This is your first repository","include_all_branches":false,"name":"Hello-World","owner":"octocat","private":false}}},"schema":{"properties":{"description":{"description":"A short description of the new repository.","type":"string"},"include_all_branches":{"default":false,"description":"Set to `true` to include the directory structure and files from all branches in the template repository, and not just the default branch. Default: `false`.","type":"boolean"},"name":{"description":"The name of the new repository.","type":"string"},"owner":{"description":"The organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization.","type":"string"},"private":{"default":false,"description":"Either `true` to create a new private repository or `false` to create a new public one.","type":"boolean"}},"required":["name"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/full-repository"}},"schema":{"$ref":"#/components/schemas/full-repository"}}},"description":"Response","headers":{"Location":{"example":"https://api.github.com/repos/octocat/Hello-World","schema":{"type":"string"},"style":"simple"}}}}


operation_id: repos/list-public
path: /repositories
method: GET
summary: List public repositories
input_schema: {"parameters":[{"$ref":"#/components/parameters/since-repo"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Lists all public repositories in the order that they were created.

  Note:
  - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise.
  - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of repositories.

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/public-repository-items"}},"schema":{"items":{"$ref":"#/components/schemas/minimal-repository"},"type":"array"}}},"description":"Response","headers":{"Link":{"example":"<https://api.github.com/repositories?since=364>; rel=\"next\"","schema":{"type":"string"},"style":"simple"}}},"304":{"$ref":"#/components/responses/not_modified"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: search/code
path: /search/code
method: GET
summary: Search code
auth_scheme_ref: GitHubBearerToken
description:
  Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api).

  When searching for code, you can get text match metadata for the file **content** and file **path** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/search/search#text-match-metadata).

  For example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this:

  `q=addClass+in:file+language:js+repo:jquery/jquery`

  This query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository.

  Considerations for code search:

  Due to the complexity of searching code, there are a few restrictions on how searches are performed:

  *   Only the _default branch_ is considered. In most cases, this will be the `master` branch.
  *   Only files smaller than 384 KB are searchable.
  *   You must always include at least one search term when searching source code. For example, searching for [`language:go`](https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code) is not valid, while [`amazing
  language:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is.

  > [!NOTE]
  > `repository.description`, `repository.owner.type`, and `repository.owner.node_id` are closing down on this endpoint and will return `null` in a future API version. Use the [Get a repository](https://docs.github.com/rest/repos/repos#get-a-repository) endpoint (`GET /repos/{owner}/{repo}`) to retrieve full repository metadata.

  This endpoint requires you to authenticate and limits you to 10 requests per minute.

input_schema:
  {"parameters":[{"description":"The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/search/search#constructing-a-search-query). See \"[Searching code](https://docs.github.com/search-github/searching-on-github/searching-code)\" for a detailed list of qualifiers.","in":"query","name":"q","required":true,"schema":{"type":"string"},"style":"form"},{"deprecated":true,"description":"**This field is closing down.** Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub search infrastructure. Default: [best match](https://docs.github.com/rest/search/search#ranking-search-results)","in":"query","name":"sort","schema":{"enum":["indexed"],"type":"string"},"style":"form"},{"deprecated":true,"description":"**This field is closing down.** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. ","in":"query","name":"order","schema":{"default":"desc","enum":["desc","asc"],"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/code-search-result-item-paginated"}},"schema":{"properties":{"incomplete_results":{"type":"boolean"},"items":{"items":{"$ref":"#/components/schemas/code-search-result-item"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","incomplete_results","items"],"type":"object"}}},"description":"Response"},"304":{"$ref":"#/components/responses/not_modified"},"403":{"$ref":"#/components/responses/forbidden"},"422":{"$ref":"#/components/responses/validation_failed"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: search/commits
path: /search/commits
method: GET
summary: Search commits
auth_scheme_ref: GitHubBearerToken
description:
  Find commits via various criteria on the default branch (usually `main`). This method returns up to 100 results [per page](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api).

  When searching for commits, you can get text match metadata for the **message** field when you provide the `text-match` media type. For more details about how to receive highlighted search results, see [Text match
  metadata](https://docs.github.com/rest/search/search#text-match-metadata).

  For example, if you want to find commits related to CSS in the [octocat/Spoon-Knife](https://github.com/octocat/Spoon-Knife) repository. Your query would look something like this:

  `q=repo:octocat/Spoon-Knife+css`

input_schema:
  {"parameters":[{"description":"The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/search/search#constructing-a-search-query). See \"[Searching commits](https://docs.github.com/search-github/searching-on-github/searching-commits)\" for a detailed list of qualifiers.","in":"query","name":"q","required":true,"schema":{"type":"string"},"style":"form"},{"description":"Sorts the results of your query by `author-date` or `committer-date`. Default: [best match](https://docs.github.com/rest/search/search#ranking-search-results)","in":"query","name":"sort","schema":{"enum":["author-date","committer-date"],"type":"string"},"style":"form"},{"$ref":"#/components/parameters/order"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/commit-search-result-item-paginated"}},"schema":{"properties":{"incomplete_results":{"type":"boolean"},"items":{"items":{"$ref":"#/components/schemas/commit-search-result-item"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","incomplete_results","items"],"type":"object"}}},"description":"Response"},"304":{"$ref":"#/components/responses/not_modified"}}


operation_id: search/issues-and-pull-requests
path: /search/issues
method: GET
summary: Search issues and pull requests
auth_scheme_ref: GitHubBearerToken
description:
  Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api).

  When searching for issues, you can get text match metadata for the issue **title**, issue **body**, and issue **comment body** fields when you pass the `text-match` media type. For more details about how to receive highlighted
  search results, see [Text match metadata](https://docs.github.com/rest/search/search#text-match-metadata).

  For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this.

  `q=windows+label:bug+language:python+state:open&sort=created&order=asc`

  This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results.

  > [!NOTE]
  > For requests made by GitHub Apps with a user access token, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)."

input_schema:
  {"parameters":[{"description":"The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/search/search#constructing-a-search-query). See \"[Searching issues and pull requests](https://docs.github.com/search-github/searching-on-github/searching-issues-and-pull-requests)\" for a detailed list of qualifiers.","in":"query","name":"q","required":true,"schema":{"type":"string"},"style":"form"},{"description":"Sorts the results of your query by the number of `comments`, `reactions`, `reactions-+1`, `reactions--1`, `reactions-smile`, `reactions-thinking_face`, `reactions-heart`, `reactions-tada`, or `interactions`. You can also sort results by how recently the items were `created` or `updated`, Default: [best match](https://docs.github.com/rest/search/search#ranking-search-results)","in":"query","name":"sort","schema":{"enum":["comments","reactions","reactions-+1","reactions--1","reactions-smile","reactions-thinking_face","reactions-heart","reactions-tada","interactions","created","updated"],"type":"string"},"style":"form"},{"$ref":"#/components/parameters/order"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/issues-advanced-search"},{"$ref":"#/components/parameters/search-type"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/issue-search-result-item-paginated"},"lexical-fallback":{"$ref":"#/components/examples/issue-search-result-item-paginated-lexical-fallback"}},"schema":{"properties":{"incomplete_results":{"type":"boolean"},"items":{"items":{"$ref":"#/components/schemas/issue-search-result-item"},"type":"array"},"lexical_fallback_reason":{"description":"When a semantic or hybrid search falls back to lexical search, this field contains the reasons for the fallback. Only present when a fallback occurred.","items":{"enum":["no_text_terms","quoted_text","non_issue_target","or_boolean_not_supported","no_accessible_repos","server_error","only_non_semantic_fields_requested","service_unavailable"],"type":"string"},"type":"array"},"search_type":{"description":"The type of search that was performed. Possible values are `lexical`, `semantic`, or `hybrid`.","enum":["lexical","semantic","hybrid"],"type":"string"},"total_count":{"type":"integer"}},"required":["total_count","incomplete_results","items","search_type"],"type":"object"}}},"description":"Response"},"304":{"$ref":"#/components/responses/not_modified"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"422":{"$ref":"#/components/responses/validation_failed"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: search/labels
path: /search/labels
method: GET
summary: Search labels
auth_scheme_ref: GitHubBearerToken
description:
  Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api).

  When searching for labels, you can get text match metadata for the label **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/search/search#text-match-metadata).

  For example, if you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this:

  `q=bug+defect+enhancement&repository_id=64778136`

  The labels that best match the query appear first in the search results.

input_schema:
  {"parameters":[{"description":"The id of the repository.","in":"query","name":"repository_id","required":true,"schema":{"type":"integer"},"style":"form"},{"description":"The search keywords. This endpoint does not accept qualifiers in the query. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/search/search#constructing-a-search-query).","in":"query","name":"q","required":true,"schema":{"type":"string"},"style":"form"},{"description":"Sorts the results of your query by when the label was `created` or `updated`. Default: [best match](https://docs.github.com/rest/search/search#ranking-search-results)","in":"query","name":"sort","schema":{"enum":["created","updated"],"type":"string"},"style":"form"},{"$ref":"#/components/parameters/order"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/label-search-result-item-paginated"}},"schema":{"properties":{"incomplete_results":{"type":"boolean"},"items":{"items":{"$ref":"#/components/schemas/label-search-result-item"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","incomplete_results","items"],"type":"object"}}},"description":"Response"},"304":{"$ref":"#/components/responses/not_modified"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: search/repos
path: /search/repositories
method: GET
summary: Search repositories
auth_scheme_ref: GitHubBearerToken
description:
  Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api).

  When searching for repositories, you can get text match metadata for the **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/search/search#text-match-metadata).

  For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this:

  `q=tetris+language:assembly&sort=stars&order=desc`

  This query searches for repositories with the word `tetris` in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results.

input_schema:
  {"parameters":[{"description":"The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/search/search#constructing-a-search-query). See \"[Searching for repositories](https://docs.github.com/articles/searching-for-repositories/)\" for a detailed list of qualifiers.","in":"query","name":"q","required":true,"schema":{"type":"string"},"style":"form"},{"description":"Sorts the results of your query by number of `stars`, `forks`, or `help-wanted-issues` or how recently the items were `updated`. Default: [best match](https://docs.github.com/rest/search/search#ranking-search-results)","in":"query","name":"sort","schema":{"enum":["stars","forks","help-wanted-issues","updated"],"type":"string"},"style":"form"},{"$ref":"#/components/parameters/order"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/repo-search-result-item-paginated"}},"schema":{"properties":{"incomplete_results":{"type":"boolean"},"items":{"items":{"$ref":"#/components/schemas/repo-search-result-item"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","incomplete_results","items"],"type":"object"}}},"description":"Response"},"304":{"$ref":"#/components/responses/not_modified"},"422":{"$ref":"#/components/responses/validation_failed"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: search/topics
path: /search/topics
method: GET
summary: Search topics
auth_scheme_ref: GitHubBearerToken
description:
  Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers.

  When searching for topics, you can get text match metadata for the topic's **short\_description**, **description**, **name**, or **display\_name** field when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/search/search#text-match-metadata).

  For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this:

  `q=ruby+is:featured`

  This query searches for topics with the keyword `ruby` and limits the results to find only topics that are featured. The topics that are the best match for the query appear first in the search results.

input_schema:
  {"parameters":[{"description":"The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/search/search#constructing-a-search-query).","in":"query","name":"q","required":true,"schema":{"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/topic-search-result-item-paginated"}},"schema":{"properties":{"incomplete_results":{"type":"boolean"},"items":{"items":{"$ref":"#/components/schemas/topic-search-result-item"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","incomplete_results","items"],"type":"object"}}},"description":"Response"},"304":{"$ref":"#/components/responses/not_modified"}}


operation_id: search/users
path: /search/users
method: GET
summary: Search users
auth_scheme_ref: GitHubBearerToken
description:
  Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api).

  When searching for users, you can get text match metadata for the issue **login**, public **email**, and **name** fields when you pass the `text-match` media type. For more details about highlighting search results, see [Text match metadata](https://docs.github.com/rest/search/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/search/search#text-match-metadata).

  For example, if you're looking for a list of popular users, you might try this query:

  `q=tom+repos:%3E42+followers:%3E1000`

  This query searches for users with the name `tom`. The results are restricted to users with more than 42 repositories and over 1,000 followers.

  This endpoint does not accept authentication and will only include publicly visible users. As an alternative, you can use the GraphQL API. The GraphQL API requires authentication and will return private users, including Enterprise Managed Users (EMUs), that you are authorized to view. For more information, see "[GraphQL Queries](https://docs.github.com/graphql/reference/queries#search)."

input_schema:
  {"parameters":[{"description":"The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/search/search#constructing-a-search-query). See \"[Searching users](https://docs.github.com/search-github/searching-on-github/searching-users)\" for a detailed list of qualifiers.","in":"query","name":"q","required":true,"schema":{"type":"string"},"style":"form"},{"description":"Sorts the results of your query by number of `followers` or `repositories`, or when the person `joined` GitHub. Default: [best match](https://docs.github.com/rest/search/search#ranking-search-results)","in":"query","name":"sort","schema":{"enum":["followers","repositories","joined"],"type":"string"},"style":"form"},{"$ref":"#/components/parameters/order"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/user-search-result-item-paginated"}},"schema":{"properties":{"incomplete_results":{"type":"boolean"},"items":{"items":{"$ref":"#/components/schemas/user-search-result-item"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","incomplete_results","items"],"type":"object"}}},"description":"Response"},"304":{"$ref":"#/components/responses/not_modified"},"422":{"$ref":"#/components/responses/validation_failed"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: teams/get-legacy
path: /teams/{team_id}
method: GET
summary: Get a team (Legacy)
input_schema: {"parameters":[{"$ref":"#/components/parameters/team-id"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  > [!WARNING]
  > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/teams/teams#get-a-team-by-name) endpoint.

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


operation_id: teams/delete-legacy
path: /teams/{team_id}
method: DELETE
summary: Delete a team (Legacy)
input_schema: {"parameters":[{"$ref":"#/components/parameters/team-id"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  > [!WARNING]
  > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/teams/teams#delete-a-team) endpoint.

  To delete a team, the authenticated user must be an organization owner or team maintainer.

  If you are an organization owner, deleting a parent team will delete all of its child teams as well.

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


operation_id: teams/update-legacy
path: /teams/{team_id}
method: PATCH
summary: Update a team (Legacy)
auth_scheme_ref: GitHubBearerToken
description:
  > [!WARNING]
  > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/teams/teams#update-a-team) endpoint.

  To edit a team, the authenticated user must either be an organization owner or a team maintainer.

  > [!NOTE]
  > With nested teams, the `privacy` for parent teams cannot be `secret`.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/team-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"description":"new team description","name":"new team name","notification_setting":"notifications_enabled","privacy":"closed"}}},"schema":{"properties":{"description":{"description":"The description of the team.","type":"string"},"name":{"description":"The name of the team.","type":"string"},"notification_setting":{"description":"The notification setting the team has chosen. Editing teams without specifying this parameter leaves `notification_setting` intact. The options are: \n * `notifications_enabled` - team members receive notifications when the team is @mentioned.  \n * `notifications_disabled` - no one receives notifications.","enum":["notifications_enabled","notifications_disabled"],"type":"string"},"parent_team_id":{"description":"The ID of a team to set as the parent team.","nullable":true,"type":"integer"},"permission":{"default":"pull","description":"**Closing down notice**. The permission that new repositories will be added to the team with when none is specified.","enum":["pull","push","admin"],"type":"string"},"privacy":{"description":"The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. The options are:  \n**For a non-nested team:**  \n * `secret` - only visible to organization owners and members of this team.  \n * `closed` - visible to all members of this organization.  \n**For a parent or child team:**  \n * `closed` - visible to all members of this organization.","enum":["secret","closed"],"type":"string"}},"required":["name"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/team-full"}},"schema":{"$ref":"#/components/schemas/team-full"}}},"description":"Response when the updated information already exists"},"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/team-full"}},"schema":{"$ref":"#/components/schemas/team-full"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: teams/list-pending-invitations-legacy
path: /teams/{team_id}/invitations
method: GET
summary: List pending team invitations (Legacy)
auth_scheme_ref: GitHubBearerToken
description:
  > [!WARNING]
  > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/teams/members#list-pending-team-invitations) endpoint.

  The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`.

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

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


operation_id: teams/list-members-legacy
path: /teams/{team_id}/members
method: GET
summary: List team members (Legacy)
auth_scheme_ref: GitHubBearerToken
description:
  > [!WARNING]
  > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/teams/members#list-team-members) endpoint.

  Team members will include the members of child teams.

  Each member includes their `role` on the team (`member` or `maintainer`) and an `inherited` flag indicating whether the membership is inherited from a child team (`true`) or is a direct membership (`false`).

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/team-id"},{"description":"Filters members returned by their role in the team.","in":"query","name":"role","schema":{"default":"all","enum":["member","maintainer","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/team-member-items"}},"schema":{"items":{"$ref":"#/components/schemas/team-member"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: teams/get-member-legacy
path: /teams/{team_id}/members/{username}
method: GET
summary: Get team member (Legacy)
output_schema: {"204":{"description":"if user is a member"},"404":{"description":"if user is not a member"}}
auth_scheme_ref: GitHubBearerToken
description:
  The "Get team member" endpoint (described below) is closing down.

  We recommend using the [Get team membership for a user](https://docs.github.com/rest/teams/members#get-team-membership-for-a-user) endpoint instead. It allows you to get both active and pending memberships.

  To list members in a team, the team must be visible to the authenticated user.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/team-id"},{"$ref":"#/components/parameters/username"}],"requestBody":null}


operation_id: teams/add-member-legacy
path: /teams/{team_id}/members/{username}
method: PUT
summary: Add team member (Legacy)
auth_scheme_ref: GitHubBearerToken
description:
  The "Add team member" endpoint (described below) is closing down.

  We recommend using the [Add or update team membership for a user](https://docs.github.com/rest/teams/members#add-or-update-team-membership-for-a-user) endpoint instead. It allows you to invite new organization members to your teams.

  Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

  To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization.

  > [!NOTE]
  > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)."

  Note that 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)."

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/team-id"},{"$ref":"#/components/parameters/username"}],"requestBody":null}

output_schema:
  {"204":{"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"description":"Not Found if team synchronization is set up"},"422":{"description":"Unprocessable Entity if you attempt to add an organization to a team or you attempt to add a user to a team when they are not a member of at least one other team in the same organization"}}


operation_id: teams/remove-member-legacy
path: /teams/{team_id}/members/{username}
method: DELETE
summary: Remove team member (Legacy)
auth_scheme_ref: GitHubBearerToken
description:
  The "Remove team member" endpoint (described below) is closing down.

  We recommend using the [Remove team membership for a user](https://docs.github.com/rest/teams/members#remove-team-membership-for-a-user) endpoint instead. It allows you to remove both active and pending memberships.

  Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

  To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team.

  > [!NOTE]
  > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)."

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/team-id"},{"$ref":"#/components/parameters/username"}],"requestBody":null}

output_schema:
  {"204":{"description":"Response"},"404":{"description":"Not Found if team synchronization is setup"}}


operation_id: teams/get-membership-for-user-legacy
path: /teams/{team_id}/memberships/{username}
method: GET
summary: Get team membership for a user (Legacy)
auth_scheme_ref: GitHubBearerToken
description:
  > [!WARNING]
  > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/teams/members#get-team-membership-for-a-user) endpoint.

  Team members will include the members of child teams.

  To get a user's membership with a team, the team must be visible to the authenticated user.

  **Note:**
  The response contains the `state` of the membership and the member's `role`.

  The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/teams/teams#create-a-team).

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

output_schema:
  {"200":{"content":{"application/json":{"examples":{"response-if-user-is-a-team-maintainer":{"$ref":"#/components/examples/team-membership-response-if-user-is-a-team-maintainer"}},"schema":{"$ref":"#/components/schemas/team-membership"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: teams/add-or-update-membership-for-user-legacy
path: /teams/{team_id}/memberships/{username}
method: PUT
summary: Add or update team membership for a user (Legacy)
auth_scheme_ref: GitHubBearerToken
description:
  > [!WARNING]
  > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/teams/members#add-or-update-team-membership-for-a-user) endpoint.

  Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

  If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer.

  > [!NOTE]
  > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)."

  If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner.

  If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/team-id"},{"$ref":"#/components/parameters/username"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Assign the member role for a user in a team","value":{"role":"member"}}},"schema":{"properties":{"role":{"default":"member","description":"The role that this user should have in the team.","enum":["member","maintainer"],"type":"string"}},"type":"object"}}}}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"response-if-users-membership-with-team-is-now-pending":{"$ref":"#/components/examples/team-membership-response-if-users-membership-with-team-is-now-pending"}},"schema":{"$ref":"#/components/schemas/team-membership"}}},"description":"Response"},"403":{"description":"Forbidden if team synchronization is set up"},"404":{"$ref":"#/components/responses/not_found"},"422":{"description":"Unprocessable Entity if you attempt to add an organization to a team"}}


operation_id: teams/remove-membership-for-user-legacy
path: /teams/{team_id}/memberships/{username}
method: DELETE
summary: Remove team membership for a user (Legacy)
output_schema: {"204":{"description":"Response"},"403":{"description":"if team synchronization is set up"}}
auth_scheme_ref: GitHubBearerToken
description:
  > [!WARNING]
  > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/teams/members#remove-team-membership-for-a-user) endpoint.

  Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

  To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team.

  > [!NOTE]
  > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)."

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


operation_id: teams/list-repos-legacy
path: /teams/{team_id}/repos
method: GET
summary: List team repositories (Legacy)
auth_scheme_ref: GitHubBearerToken
description:
  > [!WARNING]
  > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/teams/teams#list-team-repositories) endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/team-id"},{"$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"}},"schema":{"items":{"$ref":"#/components/schemas/minimal-repository"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: teams/check-permissions-for-repo-legacy
path: /teams/{team_id}/repos/{owner}/{repo}
method: GET
summary: Check team permissions for a repository (Legacy)
auth_scheme_ref: GitHubBearerToken
description:
  > [!WARNING]
  > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-repository) endpoint.

  > [!NOTE]
  > Repositories inherited through a parent team will also be checked.

  You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types/) via the `Accept` header:

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

output_schema:
  {"200":{"content":{"application/json":{"examples":{"alternative-response-with-extra-repository-information":{"$ref":"#/components/examples/team-repository-alternative-response-with-extra-repository-information"}},"schema":{"$ref":"#/components/schemas/team-repository"}}},"description":"Alternative response with extra repository information"},"204":{"description":"Response if repository is managed by this team"},"404":{"description":"Not Found if repository is not managed by this team"}}


operation_id: teams/add-or-update-repo-permissions-legacy
path: /teams/{team_id}/repos/{owner}/{repo}
method: PUT
summary: Add or update team repository permissions (Legacy)
auth_scheme_ref: GitHubBearerToken
description:
  > [!WARNING]
  > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/teams/teams#add-or-update-team-repository-permissions)" endpoint.

  To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization.

  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)."

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/team-id"},{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Example of setting permission to pull","value":{"permission":"push"}}},"schema":{"properties":{"permission":{"description":"The permission to grant the team on this repository. If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository.","enum":["pull","push","admin"],"type":"string"}},"type":"object"}}}}}

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


operation_id: teams/remove-repo-legacy
path: /teams/{team_id}/repos/{owner}/{repo}
method: DELETE
summary: Remove a repository from a team (Legacy)
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  > [!WARNING]
  > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/teams/teams#remove-a-repository-from-a-team) endpoint.

  If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. NOTE: This does not delete the repository, it just removes it from the team.

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


operation_id: teams/list-child-legacy
path: /teams/{team_id}/teams
method: GET
summary: List child teams (Legacy)
auth_scheme_ref: GitHubBearerToken
description:
  > [!WARNING]
  > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/teams/teams#list-child-teams) endpoint.

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

output_schema:
  {"200":{"content":{"application/json":{"examples":{"response-if-child-teams-exist":{"$ref":"#/components/examples/team-items-response-if-child-teams-exist"}},"schema":{"items":{"$ref":"#/components/schemas/team"},"type":"array"}}},"description":"if child teams exist","headers":{"Link":{"$ref":"#/components/headers/link"}}},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: users/get-authenticated
path: /user
method: GET
summary: Get the authenticated user
input_schema: {"parameters":[],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  OAuth app tokens and personal access tokens (classic) need the `user` scope in order for the response to include private profile information.

output_schema:
  {"200":{"content":{"application/json":{"examples":{"response-with-public-and-private-profile-information":{"$ref":"#/components/examples/private-user-response-with-public-and-private-profile-information"},"response-with-public-profile-information":{"$ref":"#/components/examples/private-user-response-with-public-profile-information"}},"schema":{"discriminator":{"mapping":{"private":"#/components/schemas/private-user","public":"#/components/schemas/public-user"},"propertyName":"user_view_type"},"oneOf":[{"$ref":"#/components/schemas/private-user"},{"$ref":"#/components/schemas/public-user"}]}}},"description":"Response"},"304":{"$ref":"#/components/responses/not_modified"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"}}


operation_id: users/update-authenticated
path: /user
method: PATCH
summary: Update the authenticated user
auth_scheme_ref: GitHubBearerToken
description:
  **Note:** If your email is set to private and you send an `email` parameter as part of this request to update your profile, your privacy settings are still enforced: the email address will not be displayed on your public profile or via the API.

input_schema:
  {"parameters":[],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Example of updating blog and name","value":{"blog":"https://github.com/blog","name":"monalisa octocat"}}},"schema":{"properties":{"bio":{"description":"The new short biography of the user.","type":"string"},"blog":{"description":"The new blog URL of the user.","example":"blog.example.com","type":"string"},"company":{"description":"The new company of the user.","example":"Acme corporation","type":"string"},"email":{"description":"The publicly visible email address of the user.","example":"omar@example.com","type":"string"},"hireable":{"description":"The new hiring availability of the user.","type":"boolean"},"location":{"description":"The new location of the user.","example":"Berlin, Germany","type":"string"},"name":{"description":"The new name of the user.","example":"Omar Jahandar","type":"string"},"twitter_username":{"description":"The new Twitter username of the user.","example":"therealomarj","nullable":true,"type":"string"}},"type":"object"}}}}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/private-user"}},"schema":{"$ref":"#/components/schemas/private-user"}}},"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"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: users/list-blocked-by-authenticated-user
path: /user/blocks
method: GET
summary: List users blocked by the authenticated user
description: List the users you've blocked on your personal account.
auth_scheme_ref: GitHubBearerToken
input_schema:
[cell repeats an earlier one in this file: 119 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"},"304":{"$ref":"#/components/responses/not_modified"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: users/check-blocked
path: /user/blocks/{username}
method: GET
summary: Check if a user is blocked by the authenticated user
input_schema: {"parameters":[{"$ref":"#/components/parameters/username"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Returns a 204 if the given user is blocked by the authenticated user. Returns a 404 if the given user is not blocked by the authenticated user, or if the given user account has been identified as spam by GitHub.

output_schema:
  {"204":{"description":"If the user is blocked"},"304":{"$ref":"#/components/responses/not_modified"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/basic-error"}}},"description":"If the user is not blocked"}}


operation_id: users/block
path: /user/blocks/{username}
method: PUT
summary: Block a user
input_schema: {"parameters":[{"$ref":"#/components/parameters/username"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Blocks the given user and returns a 204. If the authenticated user cannot block the given user a 422 is returned.

output_schema:
  {"204":{"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"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: users/unblock
path: /user/blocks/{username}
method: DELETE
summary: Unblock a user
description: Unblocks the given user and returns a 204.
input_schema: {"parameters":[{"$ref":"#/components/parameters/username"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
output_schema:
  {"204":{"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"}}


operation_id: codespaces/list-for-authenticated-user
path: /user/codespaces
method: GET
summary: List codespaces for the authenticated user
auth_scheme_ref: GitHubBearerToken
description:
  Lists the authenticated user's codespaces.

  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/repository-id-in-query"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/codespaces-list"}},"schema":{"properties":{"codespaces":{"items":{"$ref":"#/components/schemas/codespace"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","codespaces"],"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/create-for-authenticated-user
path: /user/codespaces
method: POST
summary: Create a codespace for the authenticated user
auth_scheme_ref: GitHubBearerToken
description:
  Creates a new codespace, owned by the authenticated user.

  This endpoint requires either a `repository_id` OR a `pull_request` but not both.

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

input_schema:
  {"parameters":[],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"geo":"UsWest","ref":"main","repository_id":1}}},"schema":{"oneOf":[{"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"},"repository_id":{"description":"Repository id for this codespace","type":"integer"},"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"}},"required":["repository_id"],"type":"object"},{"properties":{"devcontainer_path":{"description":"Path to devcontainer.json config to use 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"},"pull_request":{"description":"Pull request number for this codespace","properties":{"pull_request_number":{"description":"Pull request number","type":"integer"},"repository_id":{"description":"Repository id for this codespace","type":"integer"}},"required":["pull_request_number","repository_id"],"type":"object"},"working_directory":{"description":"Working directory for this codespace","type":"string"}},"required":["pull_request"],"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"},"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-secrets-for-authenticated-user
path: /user/codespaces/secrets
method: GET
summary: List secrets for the authenticated user
auth_scheme_ref: GitHubBearerToken
description:
  Lists all development environment secrets available for a user's codespaces without revealing their
  encrypted values.

  The authenticated user must have Codespaces access to use this endpoint.

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

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

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/repo-codespaces-secret-paginated"}},"schema":{"properties":{"secrets":{"items":{"$ref":"#/components/schemas/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-public-key-for-authenticated-user
path: /user/codespaces/secrets/public-key
method: GET
summary: Get public key for the authenticated user
input_schema: {"parameters":[],"requestBody":null}
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.

  The authenticated user must have Codespaces access to use this endpoint.

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

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


operation_id: codespaces/get-secret-for-authenticated-user
path: /user/codespaces/secrets/{secret_name}
method: GET
summary: Get a secret for the authenticated user
input_schema: {"parameters":[{"$ref":"#/components/parameters/secret-name"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Gets a development environment secret available to a user's codespaces without revealing its encrypted value.

  The authenticated user must have Codespaces access to use this endpoint.

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

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


operation_id: codespaces/create-or-update-secret-for-authenticated-user
path: /user/codespaces/secrets/{secret_name}
method: PUT
summary: Create or update a secret for the authenticated user
auth_scheme_ref: GitHubBearerToken
description:
  Creates or updates a development environment secret for a user's codespace 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)."

  The authenticated user must have Codespaces access to use this endpoint.

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/secret-name"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"encrypted_value":"c2VjcmV0","key_id":"012345678912345678","selected_repository_ids":["1234567","2345678"]}}},"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 the public key for the authenticated user](https://docs.github.com/rest/codespaces/secrets#get-public-key-for-the-authenticated-user) 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"},"selected_repository_ids":{"description":"An array of repository ids that can access the user secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/codespaces/secrets#list-selected-repositories-for-a-user-secret), [Set selected repositories for a user secret](https://docs.github.com/rest/codespaces/secrets#set-selected-repositories-for-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/codespaces/secrets#remove-a-selected-repository-from-a-user-secret) endpoints.","items":{"anyOf":[{"type":"integer"},{"type":"string"}]},"type":"array"}},"required":["key_id"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{}},"schema":{"$ref":"#/components/schemas/empty-object"}}},"description":"Response after successfully creating a secret"},"204":{"description":"Response after successfully updating a secret"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: codespaces/delete-secret-for-authenticated-user
path: /user/codespaces/secrets/{secret_name}
method: DELETE
summary: Delete a secret for the authenticated user
input_schema: {"parameters":[{"$ref":"#/components/parameters/secret-name"}],"requestBody":null}
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Deletes a development environment secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret.

  The authenticated user must have Codespaces access to use this endpoint.

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


operation_id: codespaces/list-repositories-for-secret-for-authenticated-user
path: /user/codespaces/secrets/{secret_name}/repositories
method: GET
summary: List selected repositories for a user secret
input_schema: {"parameters":[{"$ref":"#/components/parameters/secret-name"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  List the repositories that have been granted the ability to use a user's development environment secret.

  The authenticated user must have Codespaces access to use this endpoint.

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

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/minimal-repository-paginated"}},"schema":{"properties":{"repositories":{"items":{"$ref":"#/components/schemas/minimal-repository"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","repositories"],"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/set-repositories-for-secret-for-authenticated-user
path: /user/codespaces/secrets/{secret_name}/repositories
method: PUT
summary: Set selected repositories for a user secret
auth_scheme_ref: GitHubBearerToken
description:
  Select the repositories that will use a user's development environment secret.

  The authenticated user must have Codespaces access to use this endpoint.

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/secret-name"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"selected_repository_ids":["1296269","1296280"]}}},"schema":{"properties":{"selected_repository_ids":{"description":"An array of repository ids for which a codespace can access the secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/codespaces/secrets#list-selected-repositories-for-a-user-secret), [Add a selected repository to a user secret](https://docs.github.com/rest/codespaces/secrets#add-a-selected-repository-to-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/codespaces/secrets#remove-a-selected-repository-from-a-user-secret) endpoints.","items":{"type":"integer"},"type":"array"}},"required":["selected_repository_ids"],"type":"object"}}},"required":true}}

output_schema:
  {"204":{"description":"No Content when repositories were added to the selected list"},"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/add-repository-for-secret-for-authenticated-user
path: /user/codespaces/secrets/{secret_name}/repositories/{repository_id}
method: PUT
summary: Add a selected repository to a user secret
auth_scheme_ref: GitHubBearerToken
description:
  Adds a repository to the selected repositories for a user's development environment secret.

  The authenticated user must have Codespaces access to use this endpoint.

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/secret-name"},{"in":"path","name":"repository_id","required":true,"schema":{"type":"integer"},"style":"simple"}],"requestBody":null}

output_schema:
  {"204":{"description":"No Content when repository was added to the selected list"},"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/remove-repository-for-secret-for-authenticated-user
path: /user/codespaces/secrets/{secret_name}/repositories/{repository_id}
method: DELETE
summary: Remove a selected repository from a user secret
auth_scheme_ref: GitHubBearerToken
description:
  Removes a repository from the selected repositories for a user's development environment secret.

  The authenticated user must have Codespaces access to use this endpoint.

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/secret-name"},{"in":"path","name":"repository_id","required":true,"schema":{"type":"integer"},"style":"simple"}],"requestBody":null}

output_schema:
  {"204":{"description":"No Content when repository was removed from the selected list"},"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/get-for-authenticated-user
path: /user/codespaces/{codespace_name}
method: GET
summary: Get a codespace for the authenticated user
input_schema: {"parameters":[{"$ref":"#/components/parameters/codespace-name"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Gets information about a user's codespace.

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

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/codespace"}},"schema":{"$ref":"#/components/schemas/codespace"}}},"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"}}


