---
title: "Get a code scanning alert"
method: GET
path: "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}"
tags: ["code-scanning"]
---

# Get a code scanning alert

`GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}`

Gets a single code scanning alert.

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

## Path parameters

- `owner` string, required
- `repo` string, required
- `alert_number` integer, required — The security alert number.

## Response `200`

Response

- CodeScanningAlert
  - `number` integer, required — The security alert number.
  - `created_at` string, date-time, required — The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.
  - `updated_at` string, date-time — The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.
  - `url` string, uri, required — The REST API URL of the alert resource.
  - `html_url` string, uri, required — The GitHub URL of the alert resource.
  - `instances_url` string, uri, required — The REST API URL for fetching the list of instances for an alert.
  - `state` 'open' | 'dismissed' | 'fixed', nullable, required — State of a code scanning alert.
  - `fixed_at` string, date-time, nullable — The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.
  - `dismissed_by` NullableSimpleUser, nullable, required — A GitHub user.
    - `name` string, nullable
    - `email` string, nullable
    - `login` string, required
    - `id` integer, required
    - `node_id` string, required
    - `avatar_url` string, uri, required
    - `gravatar_id` string, nullable, required
    - `url` string, uri, required
    - `html_url` string, uri, required
    - `followers_url` string, uri, required
    - `following_url` string, required
    - `gists_url` string, required
    - `starred_url` string, required
    - `subscriptions_url` string, uri, required
    - `organizations_url` string, uri, required
    - `repos_url` string, uri, required
    - `events_url` string, required
    - `received_events_url` string, uri, required
    - `type` string, required
    - `site_admin` boolean, required
    - `starred_at` string
    - `user_view_type` string
  - `dismissed_at` string, date-time, nullable, required — The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.
  - `dismissed_reason` 'false positive' | 'won't fix' | 'used in tests', nullable, required — **Required when the state is dismissed.** The reason for dismissing or closing the alert.
  - `dismissed_comment` string, nullable — The dismissal comment associated with the dismissal of the alert.
  - `rule` CodeScanningAlertRule, required
    - `id` string, nullable — A unique identifier for the rule used to detect the alert.
    - `name` string — The name of the rule used to detect the alert.
    - `severity` 'none' | 'note' | 'warning' | 'error', nullable — The severity of the alert.
    - `security_severity_level` 'low' | 'medium' | 'high' | 'critical', nullable — The security severity of the alert.
    - `description` string — A short description of the rule used to detect the alert.
    - `full_description` string — A description of the rule used to detect the alert.
    - `tags` string[], nullable — A set of tags applicable for the rule.
    - `help` string, nullable — Detailed documentation for the rule as GitHub Flavored Markdown.
    - `help_uri` string, nullable — A link to the documentation for the rule used to detect the alert.
  - `tool` CodeScanningAnalysisTool, required
    - `name` string — The name of the tool used to generate the code scanning analysis.
    - `version` string, nullable — The version of the tool used to generate the code scanning analysis.
    - `guid` string, nullable — The GUID of the tool used to generate the code scanning analysis, if provided in the uploaded SARIF data.
  - `most_recent_instance` CodeScanningAlertInstance, required
    - `ref` string — The Git reference, formatted as `refs/pull/<number>/merge`, `refs/pull/<number>/head`, `refs/heads/<branch name>` or simply `<branch name>`.
    - `analysis_key` string — Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name.
    - `environment` string — Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed.
    - `category` string — Identifies the configuration under which the analysis was executed. Used to distinguish between multiple analyses for the same tool and commit, but performed on different languages or different parts of the code.
    - `state` 'open' | 'dismissed' | 'fixed', nullable — State of a code scanning alert.
    - `commit_sha` string
    - `message` object
      - `text` string
      - `markdown` string — The message text as GitHub-flavored Markdown, with placeholder links for related locations replaced by links to the relevant code. Only populated when related locations are available for the alert instance.
    - `location` CodeScanningAlertLocation — Describe a region within a file for the alert.
      - `path` string
      - `start_line` integer
      - `end_line` integer
      - `start_column` integer
      - `end_column` integer
    - `html_url` string
    - `classifications` CodeScanningAlertClassification[] — Classifications that have been applied to the file that triggered the alert. For example identifying it as documentation, or a generated file.
  - `dismissal_approved_by` NullableSimpleUser, nullable — A GitHub user.
    - `name` string, nullable
    - `email` string, nullable
    - `login` string, required
    - `id` integer, required
    - `node_id` string, required
    - `avatar_url` string, uri, required
    - `gravatar_id` string, nullable, required
    - `url` string, uri, required
    - `html_url` string, uri, required
    - `followers_url` string, uri, required
    - `following_url` string, required
    - `gists_url` string, required
    - `starred_url` string, required
    - `subscriptions_url` string, uri, required
    - `organizations_url` string, uri, required
    - `repos_url` string, uri, required
    - `events_url` string, required
    - `received_events_url` string, uri, required
    - `type` string, required
    - `site_admin` boolean, required
    - `starred_at` string
    - `user_view_type` string
  - `assignees` SimpleUser[]
    - `name` string, nullable
    - `email` string, nullable
    - `login` string, required
    - `id` integer, required
    - `node_id` string, required
    - `avatar_url` string, uri, required
    - `gravatar_id` string, nullable, required
    - `url` string, uri, required
    - `html_url` string, uri, required
    - `followers_url` string, uri, required
    - `following_url` string, required
    - `gists_url` string, required
    - `starred_url` string, required
    - `subscriptions_url` string, uri, required
    - `organizations_url` string, uri, required
    - `repos_url` string, uri, required
    - `events_url` string, required
    - `received_events_url` string, uri, required
    - `type` string, required
    - `site_admin` boolean, required
    - `starred_at` string
    - `user_view_type` string
  - `linked_pull_requests` PullRequestSimple[] — Pull requests linked to this alert.
    - `url` string, uri, required
    - `id` integer, required
    - `node_id` string, required
    - `html_url` string, uri, required
    - `diff_url` string, uri, required
    - `patch_url` string, uri, required
    - `issue_url` string, uri, required
    - `commits_url` string, uri, required
    - `review_comments_url` string, uri, required
    - `review_comment_url` string, required
    - `comments_url` string, uri, required
    - `statuses_url` string, uri, required
    - `number` integer, required
    - `state` string, required
    - `locked` boolean, required
    - `title` string, required
    - `user` NullableSimpleUser, nullable, required — A GitHub user.
      - `name` string, nullable
      - `email` string, nullable
      - `login` string, required
      - `id` integer, required
      - `node_id` string, required
      - `avatar_url` string, uri, required
      - `gravatar_id` string, nullable, required
      - `url` string, uri, required
      - `html_url` string, uri, required
      - `followers_url` string, uri, required
      - `following_url` string, required
      - `gists_url` string, required
      - `starred_url` string, required
      - `subscriptions_url` string, uri, required
      - `organizations_url` string, uri, required
      - `repos_url` string, uri, required
      - `events_url` string, required
      - `received_events_url` string, uri, required
      - `type` string, required
      - `site_admin` boolean, required
      - `starred_at` string
      - `user_view_type` string
    - `body` string, nullable, required
    - `labels` object[], required
      - `id` integer, required
      - `node_id` string, required
      - `url` string, required
      - `name` string, required
      - `description` string, required
      - `color` string, required
      - `default` boolean, required
    - `milestone` NullableMilestone, nullable, required — A collection of related issues and pull requests.
      - `url` string, uri, required
      - `html_url` string, uri, required
      - `labels_url` string, uri, required
      - `id` integer, required
      - `node_id` string, required
      - `number` integer, required — The number of the milestone.
      - `state` 'open' | 'closed', required — The state of the milestone.
      - `title` string, required — The title of the milestone.
      - `description` string, nullable, required
      - `creator` NullableSimpleUser, nullable, required — A GitHub user.
        - `name` string, nullable
        - `email` string, nullable
        - `login` string, required
        - `id` integer, required
        - `node_id` string, required
        - `avatar_url` string, uri, required
        - `gravatar_id` string, nullable, required
        - `url` string, uri, required
        - `html_url` string, uri, required
        - `followers_url` string, uri, required
        - `following_url` string, required
        - `gists_url` string, required
        - `starred_url` string, required
        - `subscriptions_url` string, uri, required
        - `organizations_url` string, uri, required
        - `repos_url` string, uri, required
        - `events_url` string, required
        - `received_events_url` string, uri, required
        - `type` string, required
        - `site_admin` boolean, required
        - `starred_at` string
        - `user_view_type` string
      - `open_issues` integer, required
      - `closed_issues` integer, required
      - `created_at` string, date-time, required
      - `updated_at` string, date-time, required
      - `closed_at` string, date-time, nullable, required
      - `due_on` string, date-time, nullable, required
    - `active_lock_reason` string, nullable
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
    - `closed_at` string, date-time, nullable, required
    - `merged_at` string, date-time, nullable, required
    - `merge_commit_sha` string, nullable, required
    - `assignee` NullableSimpleUser, nullable, required — A GitHub user.
      - `name` string, nullable
      - `email` string, nullable
      - `login` string, required
      - `id` integer, required
      - `node_id` string, required
      - `avatar_url` string, uri, required
      - `gravatar_id` string, nullable, required
      - `url` string, uri, required
      - `html_url` string, uri, required
      - `followers_url` string, uri, required
      - `following_url` string, required
      - `gists_url` string, required
      - `starred_url` string, required
      - `subscriptions_url` string, uri, required
      - `organizations_url` string, uri, required
      - `repos_url` string, uri, required
      - `events_url` string, required
      - `received_events_url` string, uri, required
      - `type` string, required
      - `site_admin` boolean, required
      - `starred_at` string
      - `user_view_type` string
    - `assignees` SimpleUser[]
      - `name` string, nullable
      - `email` string, nullable
      - `login` string, required
      - `id` integer, required
      - `node_id` string, required
      - `avatar_url` string, uri, required
      - `gravatar_id` string, nullable, required
      - `url` string, uri, required
      - `html_url` string, uri, required
      - `followers_url` string, uri, required
      - `following_url` string, required
      - `gists_url` string, required
      - `starred_url` string, required
      - `subscriptions_url` string, uri, required
      - `organizations_url` string, uri, required
      - `repos_url` string, uri, required
      - `events_url` string, required
      - `received_events_url` string, uri, required
      - `type` string, required
      - `site_admin` boolean, required
      - `starred_at` string
      - `user_view_type` string
    - `requested_reviewers` SimpleUser[]
      - `name` string, nullable
      - `email` string, nullable
      - `login` string, required
      - `id` integer, required
      - `node_id` string, required
      - `avatar_url` string, uri, required
      - `gravatar_id` string, nullable, required
      - `url` string, uri, required
      - `html_url` string, uri, required
      - `followers_url` string, uri, required
      - `following_url` string, required
      - `gists_url` string, required
      - `starred_url` string, required
      - `subscriptions_url` string, uri, required
      - `organizations_url` string, uri, required
      - `repos_url` string, uri, required
      - `events_url` string, required
      - `received_events_url` string, uri, required
      - `type` string, required
      - `site_admin` boolean, required
      - `starred_at` string
      - `user_view_type` string
    - `requested_teams` Team[]
      - `id` integer, required
      - `node_id` string, required
      - `name` string, required
      - `slug` string, required
      - `description` string, nullable, required
      - `privacy` string
      - `notification_setting` string
      - `permission` string, required
      - `permissions` object
        - `pull` boolean, required
        - `triage` boolean, required
        - `push` boolean, required
        - `maintain` boolean, required
        - `admin` boolean, required
      - `url` string, uri, required
      - `html_url` string, uri, required
      - `members_url` string, required
      - `repositories_url` string, uri, required
      - `type` 'enterprise' | 'organization', required — The ownership type of the team
      - `access_source` 'direct' | 'organization' | 'enterprise' — How the team's access to the repository was granted. This property is only present when the team is returned in a repository context, such as `GET /repos/{owner}/{repo}/teams`.
      - `organization_id` integer — Unique identifier of the organization to which this team belongs
      - `enterprise_id` integer — Unique identifier of the enterprise to which this team belongs
      - `parent` NullableTeamSimple, nullable, required — Groups of organization members that gives permissions on specified repositories.
        - `id` integer, required — Unique identifier of the team
        - `node_id` string, required
        - `url` string, uri, required — URL for the team
        - `members_url` string, required
        - `name` string, required — Name of the team
        - `description` string, nullable, required — Description of the team
        - `permission` string, required — Permission that the team will have for its repositories
        - `privacy` string — The level of privacy this team should have
        - `notification_setting` string — The notification setting the team has set
        - `html_url` string, uri, required
        - `repositories_url` string, uri, required
        - `slug` string, required
        - `ldap_dn` string — Distinguished Name (DN) that team maps to within LDAP environment
        - `type` 'enterprise' | 'organization', required — The ownership type of the team
        - `organization_id` integer — Unique identifier of the organization to which this team belongs
        - `enterprise_id` integer — Unique identifier of the enterprise to which this team belongs
    - `head` object, required
      - `label` string, required
      - `ref` string, required
      - `repo` Repository, required — A repository on GitHub.
        - `id` integer, required — Unique identifier of the repository
        - `node_id` string, required
        - `name` string, required — The name of the repository.
        - `full_name` string, required
        - `license` NullableLicenseSimple, nullable, required — License Simple
          - `key` string, required
          - `name` string, required
          - `url` string, uri, nullable, required
          - `spdx_id` string, nullable, required
          - `node_id` string, required
          - `html_url` string, uri
        - `forks` integer, required
        - `permissions` object
          - `admin` boolean, required
          - `pull` boolean, required
          - `triage` boolean
          - `push` boolean, required
          - `maintain` boolean
        - `owner` SimpleUser, required — A GitHub user.
          - `name` string, nullable
          - `email` string, nullable
          - `login` string, required
          - `id` integer, required
          - `node_id` string, required
          - `avatar_url` string, uri, required
          - `gravatar_id` string, nullable, required
          - `url` string, uri, required
          - `html_url` string, uri, required
          - `followers_url` string, uri, required
          - `following_url` string, required
          - `gists_url` string, required
          - `starred_url` string, required
          - `subscriptions_url` string, uri, required
          - `organizations_url` string, uri, required
          - `repos_url` string, uri, required
          - `events_url` string, required
          - `received_events_url` string, uri, required
          - `type` string, required
          - `site_admin` boolean, required
          - `starred_at` string
          - `user_view_type` string
        - `private` boolean, required — Whether the repository is private or public.
        - `html_url` string, uri, required
        - `description` string, nullable, required
        - `fork` boolean, required
        - `url` string, uri, required
        - `archive_url` string, required
        - `assignees_url` string, required
        - `blobs_url` string, required
        - `branches_url` string, required
        - `collaborators_url` string, required
        - `comments_url` string, required
        - `commits_url` string, required
        - `compare_url` string, required
        - `contents_url` string, required
        - `contributors_url` string, uri, required
        - `deployments_url` string, uri, required
        - `downloads_url` string, uri, required
        - `events_url` string, uri, required
        - `forks_url` string, uri, required
        - `git_commits_url` string, required
        - `git_refs_url` string, required
        - `git_tags_url` string, required
        - `git_url` string, required
        - `issue_comment_url` string, required
        - `issue_events_url` string, required
        - `issues_url` string, required
        - `keys_url` string, required
        - `labels_url` string, required
        - `languages_url` string, uri, required
        - `merges_url` string, uri, required
        - `milestones_url` string, required
        - `notifications_url` string, required
        - `pulls_url` string, required
        - `releases_url` string, required
        - `ssh_url` string, required
        - `stargazers_url` string, uri, required
        - `statuses_url` string, required
        - `subscribers_url` string, uri, required
        - `subscription_url` string, uri, required
        - `tags_url` string, uri, required
        - `teams_url` string, uri, required
        - `trees_url` string, required
        - `clone_url` string, required
        - `mirror_url` string, uri, nullable, required
        - `hooks_url` string, uri, required
        - `svn_url` string, uri, required
        - `homepage` string, uri, nullable, required
        - `language` string, nullable, required
        - `forks_count` integer, required
        - `stargazers_count` integer, required
        - `watchers_count` integer, required
        - `size` integer, required — The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0.
        - `default_branch` string, required — The default branch of the repository.
        - `open_issues_count` integer, required
        - `is_template` boolean — Whether this repository acts as a template that can be used to generate new repositories.
        - `topics` string[]
        - `has_issues` boolean, required — Whether issues are enabled.
        - `has_projects` boolean, required — Whether projects are enabled.
        - `has_wiki` boolean, required — Whether the wiki is enabled.
        - `has_pages` boolean, required
        - `has_downloads` boolean, required — Whether downloads are enabled.
        - `has_discussions` boolean — Whether discussions are enabled.
        - `has_pull_requests` boolean — Whether pull requests are enabled.
        - `pull_request_creation_policy` 'all' | 'collaborators_only' — The policy controlling who can create pull requests: all or collaborators_only.
        - `archived` boolean, required — Whether the repository is archived.
        - `disabled` boolean, required — Returns whether or not this repository disabled.
        - `visibility` string — The repository visibility: public, private, or internal.
        - `pushed_at` string, date-time, nullable, required
        - `created_at` string, date-time, nullable, required
        - `updated_at` string, date-time, nullable, required
        - `allow_rebase_merge` boolean — Whether to allow rebase merges for pull requests.
        - `temp_clone_token` string
        - `allow_squash_merge` boolean — Whether to allow squash merges for pull requests.
        - `allow_auto_merge` boolean — Whether to allow Auto-merge to be used on pull requests.
        - `delete_branch_on_merge` boolean — Whether to delete head branches when pull requests are merged
        - `allow_update_branch` boolean — Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging.
        - `use_squash_pr_title_as_default` boolean — Whether a squash merge commit can use the pull request title as default. **This property is closing down. Please use `squash_merge_commit_title` instead.
        - `squash_merge_commit_title` 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' — The default value for a squash merge commit title: - `PR_TITLE` - default to the pull request's title. - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit).
        - `squash_merge_commit_message` 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' — The default value for a squash merge commit message: - `PR_BODY` - default to the pull request's body. - `COMMIT_MESSAGES` - default to the branch's commit messages. - `BLANK` - default to a blank commit message.
        - `merge_commit_title` 'PR_TITLE' | 'MERGE_MESSAGE' — The default value for a merge commit title. - `PR_TITLE` - default to the pull request's title. - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name).
        - `merge_commit_message` 'PR_BODY' | 'PR_TITLE' | 'BLANK' — The default value for a merge commit message. - `PR_TITLE` - default to the pull request's title. - `PR_BODY` - default to the pull request's body. - `BLANK` - default to a blank commit message.
        - `allow_merge_commit` boolean — Whether to allow merge commits for pull requests.
        - `allow_forking` boolean — Whether to allow forking this repo
        - `web_commit_signoff_required` boolean — Whether to require contributors to sign off on web-based commits
        - `open_issues` integer, required
        - `watchers` integer, required
        - `master_branch` string
        - `starred_at` string
        - `anonymous_access_enabled` boolean — Whether anonymous git access is enabled for this repository
        - `code_search_index_status` object — The status of the code search index for this repository
          - `lexical_search_ok` boolean
          - `lexical_commit_sha` string
      - `sha` string, required
      - `user` NullableSimpleUser, nullable, required — A GitHub user.
        - `name` string, nullable
        - `email` string, nullable
        - `login` string, required
        - `id` integer, required
        - `node_id` string, required
        - `avatar_url` string, uri, required
        - `gravatar_id` string, nullable, required
        - `url` string, uri, required
        - `html_url` string, uri, required
        - `followers_url` string, uri, required
        - `following_url` string, required
        - `gists_url` string, required
        - `starred_url` string, required
        - `subscriptions_url` string, uri, required
        - `organizations_url` string, uri, required
        - `repos_url` string, uri, required
        - `events_url` string, required
        - `received_events_url` string, uri, required
        - `type` string, required
        - `site_admin` boolean, required
        - `starred_at` string
        - `user_view_type` string
    - `base` object, required
      - `label` string, required
      - `ref` string, required
      - `repo` Repository, required — A repository on GitHub.
        - `id` integer, required — Unique identifier of the repository
        - `node_id` string, required
        - `name` string, required — The name of the repository.
        - `full_name` string, required
        - `license` NullableLicenseSimple, nullable, required — License Simple
          - `key` string, required
          - `name` string, required
          - `url` string, uri, nullable, required
          - `spdx_id` string, nullable, required
          - `node_id` string, required
          - `html_url` string, uri
        - `forks` integer, required
        - `permissions` object
          - `admin` boolean, required
          - `pull` boolean, required
          - `triage` boolean
          - `push` boolean, required
          - `maintain` boolean
        - `owner` SimpleUser, required — A GitHub user.
          - `name` string, nullable
          - `email` string, nullable
          - `login` string, required
          - `id` integer, required
          - `node_id` string, required
          - `avatar_url` string, uri, required
          - `gravatar_id` string, nullable, required
          - `url` string, uri, required
          - `html_url` string, uri, required
          - `followers_url` string, uri, required
          - `following_url` string, required
          - `gists_url` string, required
          - `starred_url` string, required
          - `subscriptions_url` string, uri, required
          - `organizations_url` string, uri, required
          - `repos_url` string, uri, required
          - `events_url` string, required
          - `received_events_url` string, uri, required
          - `type` string, required
          - `site_admin` boolean, required
          - `starred_at` string
          - `user_view_type` string
        - `private` boolean, required — Whether the repository is private or public.
        - `html_url` string, uri, required
        - `description` string, nullable, required
        - `fork` boolean, required
        - `url` string, uri, required
        - `archive_url` string, required
        - `assignees_url` string, required
        - `blobs_url` string, required
        - `branches_url` string, required
        - `collaborators_url` string, required
        - `comments_url` string, required
        - `commits_url` string, required
        - `compare_url` string, required
        - `contents_url` string, required
        - `contributors_url` string, uri, required
        - `deployments_url` string, uri, required
        - `downloads_url` string, uri, required
        - `events_url` string, uri, required
        - `forks_url` string, uri, required
        - `git_commits_url` string, required
        - `git_refs_url` string, required
        - `git_tags_url` string, required
        - `git_url` string, required
        - `issue_comment_url` string, required
        - `issue_events_url` string, required
        - `issues_url` string, required
        - `keys_url` string, required
        - `labels_url` string, required
        - `languages_url` string, uri, required
        - `merges_url` string, uri, required
        - `milestones_url` string, required
        - `notifications_url` string, required
        - `pulls_url` string, required
        - `releases_url` string, required
        - `ssh_url` string, required
        - `stargazers_url` string, uri, required
        - `statuses_url` string, required
        - `subscribers_url` string, uri, required
        - `subscription_url` string, uri, required
        - `tags_url` string, uri, required
        - `teams_url` string, uri, required
        - `trees_url` string, required
        - `clone_url` string, required
        - `mirror_url` string, uri, nullable, required
        - `hooks_url` string, uri, required
        - `svn_url` string, uri, required
        - `homepage` string, uri, nullable, required
        - `language` string, nullable, required
        - `forks_count` integer, required
        - `stargazers_count` integer, required
        - `watchers_count` integer, required
        - `size` integer, required — The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0.
        - `default_branch` string, required — The default branch of the repository.
        - `open_issues_count` integer, required
        - `is_template` boolean — Whether this repository acts as a template that can be used to generate new repositories.
        - `topics` string[]
        - `has_issues` boolean, required — Whether issues are enabled.
        - `has_projects` boolean, required — Whether projects are enabled.
        - `has_wiki` boolean, required — Whether the wiki is enabled.
        - `has_pages` boolean, required
        - `has_downloads` boolean, required — Whether downloads are enabled.
        - `has_discussions` boolean — Whether discussions are enabled.
        - `has_pull_requests` boolean — Whether pull requests are enabled.
        - `pull_request_creation_policy` 'all' | 'collaborators_only' — The policy controlling who can create pull requests: all or collaborators_only.
        - `archived` boolean, required — Whether the repository is archived.
        - `disabled` boolean, required — Returns whether or not this repository disabled.
        - `visibility` string — The repository visibility: public, private, or internal.
        - `pushed_at` string, date-time, nullable, required
        - `created_at` string, date-time, nullable, required
        - `updated_at` string, date-time, nullable, required
        - `allow_rebase_merge` boolean — Whether to allow rebase merges for pull requests.
        - `temp_clone_token` string
        - `allow_squash_merge` boolean — Whether to allow squash merges for pull requests.
        - `allow_auto_merge` boolean — Whether to allow Auto-merge to be used on pull requests.
        - `delete_branch_on_merge` boolean — Whether to delete head branches when pull requests are merged
        - `allow_update_branch` boolean — Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging.
        - `use_squash_pr_title_as_default` boolean — Whether a squash merge commit can use the pull request title as default. **This property is closing down. Please use `squash_merge_commit_title` instead.
        - `squash_merge_commit_title` 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' — The default value for a squash merge commit title: - `PR_TITLE` - default to the pull request's title. - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit).
        - `squash_merge_commit_message` 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' — The default value for a squash merge commit message: - `PR_BODY` - default to the pull request's body. - `COMMIT_MESSAGES` - default to the branch's commit messages. - `BLANK` - default to a blank commit message.
        - `merge_commit_title` 'PR_TITLE' | 'MERGE_MESSAGE' — The default value for a merge commit title. - `PR_TITLE` - default to the pull request's title. - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name).
        - `merge_commit_message` 'PR_BODY' | 'PR_TITLE' | 'BLANK' — The default value for a merge commit message. - `PR_TITLE` - default to the pull request's title. - `PR_BODY` - default to the pull request's body. - `BLANK` - default to a blank commit message.
        - `allow_merge_commit` boolean — Whether to allow merge commits for pull requests.
        - `allow_forking` boolean — Whether to allow forking this repo
        - `web_commit_signoff_required` boolean — Whether to require contributors to sign off on web-based commits
        - `open_issues` integer, required
        - `watchers` integer, required
        - `master_branch` string
        - `starred_at` string
        - `anonymous_access_enabled` boolean — Whether anonymous git access is enabled for this repository
        - `code_search_index_status` object — The status of the code search index for this repository
          - `lexical_search_ok` boolean
          - `lexical_commit_sha` string
      - `sha` string, required
      - `user` NullableSimpleUser, nullable, required — A GitHub user.
        - `name` string, nullable
        - `email` string, nullable
        - `login` string, required
        - `id` integer, required
        - `node_id` string, required
        - `avatar_url` string, uri, required
        - `gravatar_id` string, nullable, required
        - `url` string, uri, required
        - `html_url` string, uri, required
        - `followers_url` string, uri, required
        - `following_url` string, required
        - `gists_url` string, required
        - `starred_url` string, required
        - `subscriptions_url` string, uri, required
        - `organizations_url` string, uri, required
        - `repos_url` string, uri, required
        - `events_url` string, required
        - `received_events_url` string, uri, required
        - `type` string, required
        - `site_admin` boolean, required
        - `starred_at` string
        - `user_view_type` string
    - `_links` object, required
      - `comments` Link, required — Hypermedia Link
        - `href` string, required
      - `commits` Link, required — Hypermedia Link
        - `href` string, required
      - `statuses` Link, required — Hypermedia Link
        - `href` string, required
      - `html` Link, required — Hypermedia Link
        - `href` string, required
      - `issue` Link, required — Hypermedia Link
        - `href` string, required
      - `review_comments` Link, required — Hypermedia Link
        - `href` string, required
      - `review_comment` Link, required — Hypermedia Link
        - `href` string, required
      - `self` Link, required — Hypermedia Link
        - `href` string, required
    - `author_association` 'COLLABORATOR' | 'CONTRIBUTOR' | 'FIRST_TIMER' | 'FIRST_TIME_CONTRIBUTOR' | 'MANNEQUIN' | 'MEMBER' | 'NONE' | 'OWNER', required — How the author is associated with the repository.
    - `auto_merge` AutoMerge, nullable, required — The status of auto merging a pull request.
      - `enabled_by` SimpleUser, required — A GitHub user.
        - `name` string, nullable
        - `email` string, nullable
        - `login` string, required
        - `id` integer, required
        - `node_id` string, required
        - `avatar_url` string, uri, required
        - `gravatar_id` string, nullable, required
        - `url` string, uri, required
        - `html_url` string, uri, required
        - `followers_url` string, uri, required
        - `following_url` string, required
        - `gists_url` string, required
        - `starred_url` string, required
        - `subscriptions_url` string, uri, required
        - `organizations_url` string, uri, required
        - `repos_url` string, uri, required
        - `events_url` string, required
        - `received_events_url` string, uri, required
        - `type` string, required
        - `site_admin` boolean, required
        - `starred_at` string
        - `user_view_type` string
      - `merge_method` 'merge' | 'squash' | 'rebase', required — The merge method to use.
      - `commit_title` string, required — Title for the merge commit message.
      - `commit_message` string, required — Commit message for the merge commit.
    - `stack` PullRequestStack, nullable — The stack information associated with a pull request.
      - `base` object, required
        - `ref` string, required — The base ref of the stack this pull request belongs to.
        - `sha` string, required — The base SHA of the stack this pull request belongs to.
      - `size` integer — The total number of pull requests in the stack.
      - `position` integer — The one-based position of this pull request within the stack, where 1 is the bottom of the stack.
      - `id` integer — The ID of the stack that this pull request belongs to.
      - `number` integer — The number of the stack that this pull request belongs to.
    - `draft` boolean — Indicates whether or not the pull request is a draft.

## Other responses

- `304` — Not modified
- `403` — Response if GitHub Advanced Security is not enabled for this repository
- `404` — Resource not found
- `503` — Service unavailable

---

[API](https://skmtc.net/github/apis/rest-api.md) · [All operations](https://skmtc.net/github/apis/rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/rest-api/versions/80850db290cd/schema)
