Skip to content

GitHub: Repos schemas (part 1)

73 GitHub schemas with complete fields and constraints.

← Repos operations · All schemas

Check if Dependabot security updates are enabled for a repository — response body

FieldTypePresenceDescription and constraints
$objectRootCheck Dependabot security updates
enabledbooleanRequired within parentWhether Dependabot security updates are enabled for the repository.
pausedbooleanRequired within parentWhether Dependabot security updates are paused for the repository.

Check if immutable releases are enabled for a repository — response body

FieldTypePresenceDescription and constraints
$objectRootCheck immutable releases
enabledbooleanRequired within parentWhether immutable releases are enabled for the repository.
enforced_by_ownerbooleanRequired within parentWhether immutable releases are enforced by the repository owner.

Compare two commits — response body

FieldTypePresenceDescription and constraints
$objectRootCommit Comparison
ahead_byJSONRequired within parent
ahead_by (anyOf 1)integerAlternative
ahead_by (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
base_commitModelRequired within parentExpand Get a commit — response body
behind_byJSONRequired within parent
behind_by (anyOf 1)integerAlternative
behind_by (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
commitsarrayRequired within parent
commits[]ModelEach itemExpand Get a commit — response body
diff_urlstringRequired within parentFormat: uri
filesarrayOptional
files[]ModelEach itemExpand List pull requests files — response body — item
html_urlstringRequired within parentFormat: uri
merge_base_commitModelRequired within parentExpand Get a commit — response body
patch_urlstringRequired within parentFormat: uri
permalink_urlstringRequired within parentFormat: uri
statusstringRequired within parentKnown values: diverged, ahead, behind, identical
total_commitsJSONRequired within parent
total_commits (anyOf 1)integerAlternative
total_commits (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
urlstringRequired within parentFormat: uri

Referenced models: Get a commit — response body, List pull requests files — response body — item

Create a Git Hub Pages deployment — response body

FieldTypePresenceDescription and constraints
$objectRootThe GitHub Pages deployment status.
idJSONRequired within parentThe ID of the GitHub Pages deployment. This is the Git SHA of the deployed commit.
id (anyOf 1)JSONAlternative
id (anyOf 1) (anyOf 1)integerAlternative
id (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
id (anyOf 2)stringAlternative
page_urlstringRequired within parentThe URI to the deployed GitHub Pages.
Format: uri
preview_urlstringOptionalThe URI to the deployed GitHub Pages preview.
Format: uri
status_urlstringRequired within parentThe URI to monitor GitHub Pages deployment status.
Format: uri

Create a commit status — response body

FieldTypePresenceDescription and constraints
$objectRootThe status of a commit.
avatar_urlJSONRequired within parent
avatar_url (anyOf 1)stringAlternative
avatar_url (anyOf 2)nullAlternative
contextstringRequired within parent
created_atstringRequired within parent
creatorModelRequired within parentExpand Get an issue — response body — user
descriptionJSONRequired within parent
description (anyOf 1)stringAlternative
description (anyOf 2)nullAlternative
idJSONRequired within parent
id (anyOf 1)integerAlternative
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
node_idstringRequired within parent
statestringRequired within parent
target_urlJSONRequired within parent
target_url (anyOf 1)stringAlternative
target_url (anyOf 2)nullAlternative
updated_atstringRequired within parent
urlstringRequired within parent

Referenced models: Get an issue — response body — user

Create a deployment branch policy — request body — body

FieldTypePresenceDescription and constraints
$objectRoot
namestringRequired within parentThe name pattern that branches or tags must match in order to deploy to the environment.

Wildcard characters will not match `/`. For example, to match branches that begin with `release/` and contain an additional single slash, use `release/*/*`.
For more information about pattern matching syntax, see the [Ruby File.fnmatch documentation](https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch).
typestringOptionalWhether this rule targets a branch or tag
One of: branch, tag

Create a fork — response body

FieldTypePresenceDescription and constraints
$objectRootFull Repository
allow_auto_mergebooleanOptional
allow_forkingbooleanOptional
allow_merge_commitbooleanOptional
allow_rebase_mergebooleanOptional
allow_squash_mergebooleanOptional
allow_update_branchbooleanOptional
anonymous_access_enabledbooleanOptionalWhether anonymous git access is allowed.
Default: true
archive_urlstringRequired within parent
archivedbooleanRequired within parent
assignees_urlstringRequired within parent
blobs_urlstringRequired within parent
branches_urlstringRequired within parent
clone_urlstringRequired within parent
code_of_conductModelOptionalExpand Create a fork — response body — code of conduct
collaborators_urlstringRequired within parent
comments_urlstringRequired within parent
commits_urlstringRequired within parent
compare_urlstringRequired within parent
contents_urlstringRequired within parent
contributors_urlstringRequired within parentFormat: uri
created_atstringRequired within parentFormat: date-time
custom_propertiesobjectOptionalThe custom properties that were defined for the repository. The keys are the custom property names, and the values are the corresponding custom property values.
Additional keys: allowed
default_branchstringRequired within parent
delete_branch_on_mergebooleanOptional
deployments_urlstringRequired within parentFormat: uri
descriptionJSONRequired within parent
description (anyOf 1)stringAlternative
description (anyOf 2)nullAlternative
disabledbooleanRequired within parentReturns whether or not this repository disabled.
downloads_urlstringRequired within parentFormat: uri
events_urlstringRequired within parentFormat: uri
forkbooleanRequired within parent
forksJSONRequired within parent
forks (anyOf 1)integerAlternative
forks (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
forks_countJSONRequired within parent
forks_count (anyOf 1)integerAlternative
forks_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
forks_urlstringRequired within parentFormat: uri
full_namestringRequired within parent
git_commits_urlstringRequired within parent
git_refs_urlstringRequired within parent
git_tags_urlstringRequired within parent
git_urlstringRequired within parent
has_discussionsbooleanRequired within parent
has_issuesbooleanRequired within parent
has_pagesbooleanRequired within parent
has_projectsbooleanRequired within parent
has_pull_requestsbooleanOptional
has_wikibooleanRequired within parent
homepageJSONRequired within parent
homepage (anyOf 1)stringAlternativeFormat: uri
homepage (anyOf 2)nullAlternative
hooks_urlstringRequired within parentFormat: uri
html_urlstringRequired within parentFormat: uri
idJSONRequired within parent
id (anyOf 1)integerAlternativeFormat: int64
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
is_templatebooleanOptional
issue_comment_urlstringRequired within parent
issue_events_urlstringRequired within parent
issues_urlstringRequired within parent
keys_urlstringRequired within parent
labels_urlstringRequired within parent
languageJSONRequired within parent
language (anyOf 1)stringAlternative
language (anyOf 2)nullAlternative
languages_urlstringRequired within parentFormat: uri
licenseModelRequired within parentExpand Create a fork — response body — license
master_branchstringOptional
merge_commit_messagestringOptionalThe 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.
Known values: PR_BODY, PR_TITLE, BLANK
merge_commit_titlestringOptionalThe 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).
Known values: PR_TITLE, MERGE_MESSAGE
merges_urlstringRequired within parentFormat: uri
milestones_urlstringRequired within parent
mirror_urlJSONRequired within parent
mirror_url (anyOf 1)stringAlternativeFormat: uri
mirror_url (anyOf 2)nullAlternative
namestringRequired within parent
network_countJSONRequired within parent
network_count (anyOf 1)integerAlternative
network_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
node_idstringRequired within parent
notifications_urlstringRequired within parent
open_issuesJSONRequired within parent
open_issues (anyOf 1)integerAlternative
open_issues (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
open_issues_countJSONRequired within parent
open_issues_count (anyOf 1)integerAlternative
open_issues_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
organizationModelOptionalExpand Get an issue — response body — user
ownerModelRequired within parentExpand List users — response body — item
parentModelOptionalExpand List repositories for the authenticated user — response body — item
permissionsobjectOptional
permissions.adminbooleanRequired within parent
permissions.maintainbooleanOptional
permissions.pullbooleanRequired within parent
permissions.pushbooleanRequired within parent
permissions.triagebooleanOptional
privatebooleanRequired within parent
pull_request_creation_policystringOptionalThe policy controlling who can create pull requests: all or collaborators_only.
Known values: all, collaborators_only
pulls_urlstringRequired within parent
pushed_atstringRequired within parentFormat: date-time
releases_urlstringRequired within parent
security_and_analysisModelOptionalExpand Create a fork — response body — security and analysis
sizeJSONRequired within parent
size (anyOf 1)integerAlternativeThe size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0.
size (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
sourceModelOptionalExpand List repositories for the authenticated user — response body — item
squash_merge_commit_messagestringOptionalThe 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.
Known values: PR_BODY, COMMIT_MESSAGES, BLANK
squash_merge_commit_titlestringOptionalThe 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).
Known values: PR_TITLE, COMMIT_OR_PR_TITLE
ssh_urlstringRequired within parent
stargazers_countJSONRequired within parent
stargazers_count (anyOf 1)integerAlternative
stargazers_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
stargazers_urlstringRequired within parentFormat: uri
statuses_urlstringRequired within parent
subscribers_countJSONRequired within parent
subscribers_count (anyOf 1)integerAlternative
subscribers_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
subscribers_urlstringRequired within parentFormat: uri
subscription_urlstringRequired within parentFormat: uri
svn_urlstringRequired within parentFormat: uri
tags_urlstringRequired within parentFormat: uri
teams_urlstringRequired within parentFormat: uri
temp_clone_tokenJSONOptional
temp_clone_token (anyOf 1)stringAlternativeWhen present and non-empty, a temporary credential for read-only Git access to this repository.
It expires five minutes after generation and cannot be used to push changes.
Treat this value as sensitive and avoid recording it in logs.
temp_clone_token (anyOf 2)nullAlternative
template_repositoryModelOptionalExpand Create a fork — response body — template repository
topicsarrayOptional
topics[]stringEach item
trees_urlstringRequired within parent
updated_atstringRequired within parentFormat: date-time
urlstringRequired within parentFormat: uri
visibilitystringOptionalThe repository visibility: public, private, or internal.
watchersJSONRequired within parent
watchers (anyOf 1)integerAlternative
watchers (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
watchers_countJSONRequired within parent
watchers_count (anyOf 1)integerAlternative
watchers_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
web_commit_signoff_requiredbooleanOptional

Referenced models: Create a fork — response body — code of conduct, Create a fork — response body — license, Create a fork — response body — template repository, Get an issue — response body — user, List repositories for the authenticated user — response body — item, Create a fork — response body — security and analysis, List users — response body — item

Create a fork — response body — code of conduct

FieldTypePresenceDescription and constraints
$objectRootCode of Conduct Simple
html_urlJSONRequired within parent
html_url (anyOf 1)stringAlternativeFormat: uri
html_url (anyOf 2)nullAlternative
keystringRequired within parent
namestringRequired within parent
urlstringRequired within parentFormat: uri

Create a fork — response body — license

FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)objectAlternativeLicense Simple
$ (anyOf 1).html_urlstringOptionalFormat: uri
$ (anyOf 1).keystringRequired within parent
$ (anyOf 1).namestringRequired within parent
$ (anyOf 1).node_idstringRequired within parent
$ (anyOf 1).spdx_idJSONRequired within parent
$ (anyOf 1).spdx_id (anyOf 1)stringAlternative
$ (anyOf 1).spdx_id (anyOf 2)nullAlternative
$ (anyOf 1).urlJSONRequired within parent
$ (anyOf 1).url (anyOf 1)stringAlternativeFormat: uri
$ (anyOf 1).url (anyOf 2)nullAlternative
$ (anyOf 2)nullAlternative

Create a fork — response body — security and analysis

FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)objectAlternative
$ (anyOf 1).advanced_securityobjectOptionalEnable or disable GitHub Advanced Security for the repository.

For standalone Code Scanning or Secret Protection products, this parameter cannot be used.
$ (anyOf 1).advanced_security.statusstringOptionalKnown values: enabled, disabled
$ (anyOf 1).code_securityobjectOptional
$ (anyOf 1).code_security.statusstringOptionalKnown values: enabled, disabled
$ (anyOf 1).dependabot_security_updatesobjectOptionalEnable or disable Dependabot security updates for the repository.
$ (anyOf 1).dependabot_security_updates.statusstringOptionalThe enablement status of Dependabot security updates for the repository.
Known values: enabled, disabled
$ (anyOf 1).secret_scanningobjectOptional
$ (anyOf 1).secret_scanning.statusstringOptionalKnown values: enabled, disabled
$ (anyOf 1).secret_scanning_ai_detectionobjectOptional
$ (anyOf 1).secret_scanning_ai_detection.statusstringOptionalKnown values: enabled, disabled
$ (anyOf 1).secret_scanning_delegated_alert_dismissalobjectOptional
$ (anyOf 1).secret_scanning_delegated_alert_dismissal.statusstringOptionalKnown values: enabled, disabled
$ (anyOf 1).secret_scanning_delegated_bypassobjectOptional
$ (anyOf 1).secret_scanning_delegated_bypass.statusstringOptionalKnown values: enabled, disabled
$ (anyOf 1).secret_scanning_delegated_bypass_optionsobjectOptional
$ (anyOf 1).secret_scanning_delegated_bypass_options.reviewersarrayOptionalThe bypass reviewers for secret scanning delegated bypass
$ (anyOf 1).secret_scanning_delegated_bypass_options.reviewers[]objectEach item
$ (anyOf 1).secret_scanning_delegated_bypass_options.reviewers[].modestringOptionalThe bypass mode for the reviewer
Known values: ALWAYS, EXEMPT
Default: ALWAYS
$ (anyOf 1).secret_scanning_delegated_bypass_options.reviewers[].reviewer_idJSONRequired within parent
$ (anyOf 1).secret_scanning_delegated_bypass_options.reviewers[].reviewer_id (anyOf 1)integerAlternativeThe ID of the team or role selected as a bypass reviewer
$ (anyOf 1).secret_scanning_delegated_bypass_options.reviewers[].reviewer_id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
$ (anyOf 1).secret_scanning_delegated_bypass_options.reviewers[].reviewer_typestringRequired within parentThe type of the bypass reviewer
Known values: TEAM, ROLE
$ (anyOf 1).secret_scanning_non_provider_patternsobjectOptional
$ (anyOf 1).secret_scanning_non_provider_patterns.statusstringOptionalKnown values: enabled, disabled
$ (anyOf 1).secret_scanning_push_protectionobjectOptional
$ (anyOf 1).secret_scanning_push_protection.statusstringOptionalKnown values: enabled, disabled
$ (anyOf 2)nullAlternative

Create a fork — response body — template repository

FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)ModelAlternativeExpand Create a fork — response body — template_repository / merge_commit_message: PR BODY, PR TITLE, BLANK, merge commit title: PR TITLE, MERGE MESSAGE, pull request creation policy: all, collaborators only, squash merge commit message: PR BODY, COMMIT MESSAGES, BLANK, squash merge commit title: PR TITLE, COMMIT OR PR TITLE
$ (anyOf 2)nullAlternative

Referenced models: Create a fork — response body — template_repository / merge_commit_message: PR BODY, PR TITLE, BLANK, merge commit title: PR TITLE, MERGE MESSAGE, pull request creation policy: all, collaborators only, squash merge commit message: PR BODY, COMMIT MESSAGES, BLANK, squash merge commit title: PR TITLE, COMMIT OR PR TITLE

Create a fork — response body — template_repository / merge_commit_message: PR BODY, PR TITLE, BLANK, merge commit title: PR TITLE, MERGE MESSAGE, pull request creation policy: all, collaborators only, squash merge commit message: PR BODY, COMMIT MESSAGES, BLANK, squash merge commit title: PR TITLE, COMMIT OR PR TITLE

FieldTypePresenceDescription and constraints
$objectRootA repository on GitHub.
allow_auto_mergebooleanOptionalWhether to allow Auto-merge to be used on pull requests.
Default: false
allow_forkingbooleanOptionalWhether to allow forking this repo
allow_merge_commitbooleanOptionalWhether to allow merge commits for pull requests.
Default: true
allow_rebase_mergebooleanOptionalWhether to allow rebase merges for pull requests.
Default: true
allow_squash_mergebooleanOptionalWhether to allow squash merges for pull requests.
Default: true
allow_update_branchbooleanOptionalWhether 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.
Default: false
anonymous_access_enabledbooleanOptionalWhether anonymous git access is enabled for this repository
archive_urlstringRequired within parent
archivedbooleanRequired within parentWhether the repository is archived.
Default: false
assignees_urlstringRequired within parent
blobs_urlstringRequired within parent
branches_urlstringRequired within parent
clone_urlstringRequired within parent
code_search_index_statusobjectOptionalThe status of the code search index for this repository
code_search_index_status.lexical_commit_shastringOptional
code_search_index_status.lexical_search_okbooleanOptional
collaborators_urlstringRequired within parent
comments_urlstringRequired within parent
commits_urlstringRequired within parent
compare_urlstringRequired within parent
contents_urlstringRequired within parent
contributors_urlstringRequired within parentFormat: uri
created_atJSONRequired within parent
created_at (anyOf 1)stringAlternativeFormat: date-time
created_at (anyOf 2)nullAlternative
default_branchstringRequired within parentThe default branch of the repository.
delete_branch_on_mergebooleanOptionalWhether to delete head branches when pull requests are merged
Default: false
deployments_urlstringRequired within parentFormat: uri
descriptionJSONRequired within parent
description (anyOf 1)stringAlternative
description (anyOf 2)nullAlternative
disabledbooleanRequired within parentReturns whether or not this repository disabled.
downloads_urlstringRequired within parentFormat: uri
events_urlstringRequired within parentFormat: uri
forkbooleanRequired within parent
forksJSONRequired within parent
forks (anyOf 1)integerAlternative
forks (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
forks_countJSONRequired within parent
forks_count (anyOf 1)integerAlternative
forks_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
forks_urlstringRequired within parentFormat: uri
full_namestringRequired within parent
git_commits_urlstringRequired within parent
git_refs_urlstringRequired within parent
git_tags_urlstringRequired within parent
git_urlstringRequired within parent
has_discussionsbooleanOptionalWhether discussions are enabled.
Default: false
has_issuesbooleanRequired within parentWhether issues are enabled.
Default: true
has_pagesbooleanRequired within parent
has_projectsbooleanRequired within parentWhether projects are enabled.
Default: true
has_pull_requestsbooleanOptionalWhether pull requests are enabled.
Default: true
has_wikibooleanRequired within parentWhether the wiki is enabled.
Default: true
homepageJSONRequired within parent
homepage (anyOf 1)stringAlternativeFormat: uri
homepage (anyOf 2)nullAlternative
hooks_urlstringRequired within parentFormat: uri
html_urlstringRequired within parentFormat: uri
idJSONRequired within parent
id (anyOf 1)integerAlternativeUnique identifier of the repository
Format: int64
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
is_templatebooleanOptionalWhether this repository acts as a template that can be used to generate new repositories.
Default: false
issue_comment_urlstringRequired within parent
issue_events_urlstringRequired within parent
issues_urlstringRequired within parent
keys_urlstringRequired within parent
labels_urlstringRequired within parent
languageJSONRequired within parent
language (anyOf 1)stringAlternative
language (anyOf 2)nullAlternative
languages_urlstringRequired within parentFormat: uri
licenseModelRequired within parentExpand Create a fork — response body — license
merge_commit_messagestringOptionalThe 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.
Known values: PR_BODY, PR_TITLE, BLANK
merge_commit_titlestringOptionalThe 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).
Known values: PR_TITLE, MERGE_MESSAGE
merges_urlstringRequired within parentFormat: uri
milestones_urlstringRequired within parent
mirror_urlJSONRequired within parent
mirror_url (anyOf 1)stringAlternativeFormat: uri
mirror_url (anyOf 2)nullAlternative
namestringRequired within parentThe name of the repository.
node_idstringRequired within parent
notifications_urlstringRequired within parent
open_issuesJSONRequired within parent
open_issues (anyOf 1)integerAlternative
open_issues (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
open_issues_countJSONRequired within parent
open_issues_count (anyOf 1)integerAlternative
open_issues_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
ownerModelRequired within parentExpand List users — response body — item
permissionsobjectOptional
permissions.adminbooleanRequired within parent
permissions.maintainbooleanOptional
permissions.pullbooleanRequired within parent
permissions.pushbooleanRequired within parent
permissions.triagebooleanOptional
privatebooleanRequired within parentWhether the repository is private or public.
Default: false
pull_request_creation_policystringOptionalThe policy controlling who can create pull requests: all or collaborators_only.
Known values: all, collaborators_only
pulls_urlstringRequired within parent
pushed_atJSONRequired within parent
pushed_at (anyOf 1)stringAlternativeFormat: date-time
pushed_at (anyOf 2)nullAlternative
releases_urlstringRequired within parent
sizeJSONRequired within parent
size (anyOf 1)integerAlternativeThe size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0.
size (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
squash_merge_commit_messagestringOptionalThe 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.
Known values: PR_BODY, COMMIT_MESSAGES, BLANK
squash_merge_commit_titlestringOptionalThe 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).
Known values: PR_TITLE, COMMIT_OR_PR_TITLE
ssh_urlstringRequired within parent
stargazers_countJSONRequired within parent
stargazers_count (anyOf 1)integerAlternative
stargazers_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
stargazers_urlstringRequired within parentFormat: uri
starred_atstringOptional
statuses_urlstringRequired within parent
subscribers_urlstringRequired within parentFormat: uri
subscription_urlstringRequired within parentFormat: uri
svn_urlstringRequired within parentFormat: uri
tags_urlstringRequired within parentFormat: uri
teams_urlstringRequired within parentFormat: uri
temp_clone_tokenstringOptionalWhen present and non-empty, a temporary credential for read-only Git access to this repository.
It expires five minutes after generation and cannot be used to push changes.
Treat this value as sensitive and avoid recording it in logs.
topicsarrayOptional
topics[]stringEach item
trees_urlstringRequired within parent
updated_atJSONRequired within parent
updated_at (anyOf 1)stringAlternativeFormat: date-time
updated_at (anyOf 2)nullAlternative
urlstringRequired within parentFormat: uri
visibilitystringOptionalThe repository visibility: public, private, or internal.
Default: public
watchersJSONRequired within parent
watchers (anyOf 1)integerAlternative
watchers (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
watchers_countJSONRequired within parent
watchers_count (anyOf 1)integerAlternative
watchers_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
web_commit_signoff_requiredbooleanOptionalWhether to require contributors to sign off on web-based commits
Default: false

Referenced models: Create a fork — response body — license, List users — response body — item

Create a repository ruleset — request body — body bypass actors item

FieldTypePresenceDescription and constraints
$objectRootAn actor that can bypass rules in a ruleset
actor_idJSONOptional
actor_id (anyOf 1)integerAlternativeThe ID of the actor that can bypass a ruleset. Required for `Integration`, `RepositoryRole`, `Team`, and `User` actor types. If `actor_type` is `OrganizationAdmin`, `actor_id` is ignored. If `actor_type` is `DeployKey`, this should be null. `OrganizationAdmin` is not applicable for personal repositories.
actor_id (anyOf 2)nullAlternative
actor_typestringRequired within parentThe type of actor that can bypass a ruleset.
One of: Integration, OrganizationAdmin, RepositoryRole, Team, DeployKey, User
bypass_modestringOptionalWhen the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests. `pull_request` is not applicable for the `DeployKey` actor type. Also, `pull_request` is only applicable to branch rulesets. When `bypass_mode` is `exempt`, rules will not be run for that actor and a bypass audit entry will not be created.
Default: always
One of: always, pull_request, exempt

Create a repository ruleset — request body — body conditions

FieldTypePresenceDescription and constraints
$objectRootParameters for a repository ruleset ref name condition
ref_nameobjectOptional
ref_name.excludearrayOptionalArray of ref names or patterns to exclude. The condition will not pass if any of these patterns match.
ref_name.exclude[]stringEach item
ref_name.includearrayOptionalArray of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches.
ref_name.include[]stringEach item

Create a repository ruleset — request body — body rules item

FieldTypePresenceDescription and constraints
$objectRootA repository rule.
$ (oneOf 1)ModelAlternativeExpand Create a repository ruleset — request body — body rules item creation
$ (oneOf 2)ModelAlternativeExpand Create a repository ruleset — request body — body rules item update
$ (oneOf 3)ModelAlternativeExpand Create a repository ruleset — request body — body rules item deletion
$ (oneOf 4)ModelAlternativeExpand Create a repository ruleset — request body — body rules item required linear history
$ (oneOf 5)ModelAlternativeExpand Create a repository ruleset — request body — body rules item merge queue
$ (oneOf 6)ModelAlternativeExpand Create a repository ruleset — request body — body rules item required deployments
$ (oneOf 7)ModelAlternativeExpand Create a repository ruleset — request body — body rules item required signatures
$ (oneOf 8)ModelAlternativeExpand Create a repository ruleset — request body — body rules item pull request
$ (oneOf 9)ModelAlternativeExpand Create a repository ruleset — request body — body rules item required status checks
$ (oneOf 10)ModelAlternativeExpand Create a repository ruleset — request body — body rules item non fast forward
$ (oneOf 11)ModelAlternativeExpand Create a repository ruleset — request body — body rules item commit message pattern
$ (oneOf 12)ModelAlternativeExpand Create a repository ruleset — request body — body rules item commit author email pattern
$ (oneOf 13)ModelAlternativeExpand Create a repository ruleset — request body — body rules item committer email pattern
$ (oneOf 14)ModelAlternativeExpand Create a repository ruleset — request body — body rules item branch name pattern
$ (oneOf 15)ModelAlternativeExpand Create a repository ruleset — request body — body rules item tag name pattern
$ (oneOf 16)ModelAlternativeExpand Create a repository ruleset — request body — body rules item workflows
$ (oneOf 17)ModelAlternativeExpand Create a repository ruleset — request body — body rules item code scanning
$ (oneOf 18)ModelAlternativeExpand Create a repository ruleset — request body — body rules item code quality
$ (oneOf 19)ModelAlternativeExpand Create a repository ruleset — request body — body rules item code coverage
$ (oneOf 20)ModelAlternativeExpand Create a repository ruleset — request body — body rules item copilot code review
$ (oneOf 21)ModelAlternativeExpand Create a repository ruleset — request body — body rules item license compliance scanning
$ (oneOf 22)ModelAlternativeExpand Create a repository ruleset — request body — body rules item file path restriction
$ (oneOf 23)ModelAlternativeExpand Create a repository ruleset — request body — body rules item max file path length
$ (oneOf 24)ModelAlternativeExpand Create a repository ruleset — request body — body rules item file extension restriction
$ (oneOf 25)ModelAlternativeExpand Create a repository ruleset — request body — body rules item max file size

Referenced models: Create a repository ruleset — request body — body rules item branch name pattern, Create a repository ruleset — request body — body rules item code coverage, Create a repository ruleset — request body — body rules item code quality, Create a repository ruleset — request body — body rules item code scanning, Create a repository ruleset — request body — body rules item commit author email pattern, Create a repository ruleset — request body — body rules item commit message pattern, Create a repository ruleset — request body — body rules item committer email pattern, Create a repository ruleset — request body — body rules item copilot code review, Create a repository ruleset — request body — body rules item creation, Create a repository ruleset — request body — body rules item deletion, Create a repository ruleset — request body — body rules item file extension restriction, Create a repository ruleset — request body — body rules item file path restriction, Create a repository ruleset — request body — body rules item license compliance scanning, Create a repository ruleset — request body — body rules item max file path length, Create a repository ruleset — request body — body rules item max file size, Create a repository ruleset — request body — body rules item merge queue, Create a repository ruleset — request body — body rules item non fast forward, Create a repository ruleset — request body — body rules item pull request, Create a repository ruleset — request body — body rules item required deployments, Create a repository ruleset — request body — body rules item required linear history, Create a repository ruleset — request body — body rules item required signatures, Create a repository ruleset — request body — body rules item required status checks, Create a repository ruleset — request body — body rules item tag name pattern, Create a repository ruleset — request body — body rules item update, Create a repository ruleset — request body — body rules item workflows

Create a repository ruleset — request body — body rules item branch name pattern

FieldTypePresenceDescription and constraints
$objectRootParameters to be used for the branch_name_pattern rule
parametersobjectOptional
parameters.namestringOptionalHow this rule appears when configuring it.
parameters.negatebooleanOptionalIf true, the rule will fail if the pattern matches.
parameters.operatorstringRequired within parentThe operator to use for matching.
One of: starts_with, ends_with, contains, regex
parameters.patternstringRequired within parentThe pattern to match with.
typestringRequired within parentOne of: branch_name_pattern

Create a repository ruleset — request body — body rules item code coverage

FieldTypePresenceDescription and constraints
$objectRootEnforce minimum line coverage thresholds on pull requests. This rule evaluates uploaded coverage data but does not wait for coverage uploads. To ensure coverage is evaluated before merging, make each status check associated with a coverage upload a required status check.
parametersobjectOptional
parameters.max_coverage_dropnumberOptionalThe maximum percentage points that line coverage may drop relative to the default branch. Pull requests that reduce line coverage by more than this amount will be blocked.
Format: float
Maximum: 100.0
Minimum: 0.0
parameters.minimum_coveragenumberOptionalThe absolute minimum line coverage percentage required. Pull requests with line coverage below this threshold will be blocked.
Format: float
Maximum: 100.0
Minimum: 0.0
typestringRequired within parentOne of: code_coverage

Create a repository ruleset — request body — body rules item code quality

FieldTypePresenceDescription and constraints
$objectRootChoose which severity levels of code quality results should block pull request merges. When configured, a code quality analysis must be done on the pull request before the changes can be merged.
parametersobjectOptional
parameters.severitystringRequired within parentThe lowest severity level at which code quality reviews need to be resolved before commits can be merged.
One of: errors, warnings, notes, all
typestringRequired within parentOne of: code_quality

Create a repository ruleset — request body — body rules item code scanning

FieldTypePresenceDescription and constraints
$objectRootChoose which tools must provide code scanning results before the reference is updated. When configured, code scanning must be enabled and have results for both the commit and the reference being updated.
parametersobjectOptional
parameters.code_scanning_toolsarrayRequired within parentTools that must provide code scanning results for this rule to pass.
parameters.code_scanning_tools[]ModelEach itemExpand Create a repository ruleset — request body — body rules item code scanning parameters code scanning tools item
typestringRequired within parentOne of: code_scanning

Referenced models: Create a repository ruleset — request body — body rules item code scanning parameters code scanning tools item

Create a repository ruleset — request body — body rules item code scanning parameters code scanning tools item

FieldTypePresenceDescription and constraints
$objectRootA tool that must provide code scanning results for this rule to pass.
alerts_thresholdstringRequired within parentThe severity level at which code scanning results that raise alerts block a reference update. For more information on alert severity levels, see "[About code scanning alerts](https://docs.github.com/code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts#about-alert-severity-and-security-severity-levels)."
One of: none, errors, errors_and_warnings, all
security_alerts_thresholdstringRequired within parentThe severity level at which code scanning results that raise security alerts block a reference update. For more information on security severity levels, see "[About code scanning alerts](https://docs.github.com/code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts#about-alert-severity-and-security-severity-levels)."
One of: none, critical, high_or_higher, medium_or_higher, all
toolstringRequired within parentThe name of a code scanning tool

Create a repository ruleset — request body — body rules item commit author email pattern

FieldTypePresenceDescription and constraints
$objectRootParameters to be used for the commit_author_email_pattern rule
parametersobjectOptional
parameters.namestringOptionalHow this rule appears when configuring it.
parameters.negatebooleanOptionalIf true, the rule will fail if the pattern matches.
parameters.operatorstringRequired within parentThe operator to use for matching.
One of: starts_with, ends_with, contains, regex
parameters.patternstringRequired within parentThe pattern to match with.
typestringRequired within parentOne of: commit_author_email_pattern

Create a repository ruleset — request body — body rules item commit message pattern

FieldTypePresenceDescription and constraints
$objectRootParameters to be used for the commit_message_pattern rule
parametersobjectOptional
parameters.namestringOptionalHow this rule appears when configuring it.
parameters.negatebooleanOptionalIf true, the rule will fail if the pattern matches.
parameters.operatorstringRequired within parentThe operator to use for matching.
One of: starts_with, ends_with, contains, regex
parameters.patternstringRequired within parentThe pattern to match with.
typestringRequired within parentOne of: commit_message_pattern

Create a repository ruleset — request body — body rules item committer email pattern

FieldTypePresenceDescription and constraints
$objectRootParameters to be used for the committer_email_pattern rule
parametersobjectOptional
parameters.namestringOptionalHow this rule appears when configuring it.
parameters.negatebooleanOptionalIf true, the rule will fail if the pattern matches.
parameters.operatorstringRequired within parentThe operator to use for matching.
One of: starts_with, ends_with, contains, regex
parameters.patternstringRequired within parentThe pattern to match with.
typestringRequired within parentOne of: committer_email_pattern

Create a repository ruleset — request body — body rules item copilot code review

FieldTypePresenceDescription and constraints
$objectRootRequest Copilot code review for new pull requests automatically if the author has access to Copilot code review and AI credits.
parametersobjectOptional
parameters.review_draft_pull_requestsbooleanOptionalCopilot automatically reviews draft pull requests before they are marked as ready for review.
parameters.review_on_pushbooleanOptionalCopilot automatically reviews each new push to the pull request.
typestringRequired within parentOne of: copilot_code_review

Create a repository ruleset — request body — body rules item creation

FieldTypePresenceDescription and constraints
$objectRootOnly allow users with bypass permission to create matching refs.
typestringRequired within parentOne of: creation

Create a repository ruleset — request body — body rules item deletion

FieldTypePresenceDescription and constraints
$objectRootOnly allow users with bypass permissions to delete matching refs.
typestringRequired within parentOne of: deletion

Create a repository ruleset — request body — body rules item file extension restriction

FieldTypePresenceDescription and constraints
$objectRootPrevent commits that include files with specified file extensions from being pushed to the commit graph.
parametersobjectOptional
parameters.restricted_file_extensionsarrayRequired within parentThe file extensions that are restricted from being pushed to the commit graph.
parameters.restricted_file_extensions[]stringEach item
typestringRequired within parentOne of: file_extension_restriction

Create a repository ruleset — request body — body rules item file path restriction

FieldTypePresenceDescription and constraints
$objectRootPrevent commits that include changes in specified file and folder paths from being pushed to the commit graph. This includes absolute paths that contain file names.
parametersobjectOptional
parameters.ignored_file_pathsarrayOptionalFiles matching these patterns are allowed even when they also match a restricted path.
parameters.ignored_file_paths[]stringEach item
parameters.restricted_file_pathsarrayRequired within parentThe file paths that are restricted from being pushed to the commit graph.
parameters.restricted_file_paths[]stringEach item
typestringRequired within parentOne of: file_path_restriction

Create a repository ruleset — request body — body rules item license compliance scanning

FieldTypePresenceDescription and constraints
$objectRootEnforce any added or changed dependencies to comply with the organization's license policy.
typestringRequired within parentOne of: license_compliance_scanning

Create a repository ruleset — request body — body rules item max file path length

FieldTypePresenceDescription and constraints
$objectRootPrevent commits that include file paths that exceed the specified character limit from being pushed to the commit graph.
parametersobjectOptional
parameters.max_file_path_lengthintegerRequired within parentThe maximum amount of characters allowed in file paths.
Maximum: 32767
Minimum: 1
typestringRequired within parentOne of: max_file_path_length

Create a repository ruleset — request body — body rules item max file size

FieldTypePresenceDescription and constraints
$objectRootPrevent commits with individual files that exceed the specified limit from being pushed to the commit graph.
parametersobjectOptional
parameters.ignored_file_pathsarrayOptionalFiles matching these patterns may exceed the maximum size.
parameters.ignored_file_paths[]stringEach item
parameters.max_file_sizeintegerRequired within parentThe maximum file size allowed in megabytes. This limit does not apply to Git Large File Storage (Git LFS).
Maximum: 100
Minimum: 1
typestringRequired within parentOne of: max_file_size

Create a repository ruleset — request body — body rules item merge queue

FieldTypePresenceDescription and constraints
$objectRootMerges must be performed via a merge queue.
parametersobjectOptional
parameters.check_response_timeout_minutesintegerRequired within parentMaximum time for a required status check to report a conclusion. After this much time has elapsed, checks that have not reported a conclusion will be assumed to have failed
Maximum: 360
Minimum: 1
parameters.grouping_strategystringRequired within parentWhen set to ALLGREEN, the merge commit created by merge queue for each PR in the group must pass all required checks to merge. When set to HEADGREEN, only the commit at the head of the merge group, i.e. the commit containing changes from all of the PRs in the group, must pass its required checks to merge.
One of: ALLGREEN, HEADGREEN
parameters.max_entries_to_buildintegerRequired within parentLimit the number of queued pull requests requesting checks and workflow runs at the same time.
Maximum: 100
Minimum: 0
parameters.max_entries_to_mergeintegerRequired within parentThe maximum number of PRs that will be merged together in a group.
Maximum: 100
Minimum: 0
parameters.merge_methodstringRequired within parentMethod to use when merging changes from queued pull requests.
One of: MERGE, SQUASH, REBASE
parameters.min_entries_to_mergeintegerRequired within parentThe minimum number of PRs that will be merged together in a group.
Maximum: 100
Minimum: 0
parameters.min_entries_to_merge_wait_minutesintegerRequired within parentThe time merge queue should wait after the first PR is added to the queue for the minimum group size to be met. After this time has elapsed, the minimum group size will be ignored and a smaller group will be merged.
Maximum: 360
Minimum: 0
typestringRequired within parentOne of: merge_queue

Create a repository ruleset — request body — body rules item non fast forward

FieldTypePresenceDescription and constraints
$objectRootPrevent users with push access from force pushing to refs.
typestringRequired within parentOne of: non_fast_forward

Create a repository ruleset — request body — body rules item pull request

FieldTypePresenceDescription and constraints
$objectRootRequire all commits be made to a non-target branch and submitted via a pull request before they can be merged.
parametersobjectOptional
parameters.allowed_merge_methodsarrayOptionalArray of allowed merge methods. Allowed values include `merge`, `squash`, and `rebase`. At least one option must be enabled.
parameters.allowed_merge_methods[]stringEach itemOne of: merge, squash, rebase
parameters.dismiss_stale_reviews_on_pushbooleanRequired within parentNew, reviewable commits pushed will dismiss previous pull request review approvals.
parameters.dismissal_restrictionModelOptionalExpand Create a repository ruleset — request body — body rules item pull request parameters dismissal restriction
parameters.require_code_owner_reviewbooleanRequired within parentRequire an approving review in pull requests that modify files that have a designated code owner.
parameters.require_extra_approval_for_unattributed_changesbooleanOptionalWhen Copilot opens a pull request without a human collaborator, require one more approving review if a non-zero approval count is required.
parameters.require_last_push_approvalbooleanRequired within parentWhether the most recent reviewable push must be approved by someone other than the person who pushed it.
parameters.required_approving_review_countintegerRequired within parentThe number of approving reviews that are required before a pull request can be merged.
Maximum: 10
Minimum: 0
parameters.required_review_thread_resolutionbooleanRequired within parentAll conversations on code must be resolved before a pull request can be merged.
parameters.required_reviewersarrayOptionalA collection of reviewers and associated file patterns. Each reviewer has a list of file patterns which determine the files that reviewer is required to review.
parameters.required_reviewers[]ModelEach itemExpand Create a repository ruleset — request body — body rules item pull request parameters required reviewers item
typestringRequired within parentOne of: pull_request

Referenced models: Create a repository ruleset — request body — body rules item pull request parameters dismissal restriction, Create a repository ruleset — request body — body rules item pull request parameters required reviewers item

Create a repository ruleset — request body — body rules item pull request parameters dismissal restriction

FieldTypePresenceDescription and constraints
$objectRootSpecify people, teams, or apps allowed to dismiss pull request reviews.
allowed_actorsarrayOptionalSpecify people, teams, or apps allowed to dismiss pull request reviews.
allowed_actors[]ModelEach itemExpand Create a repository ruleset — request body — body rules item pull request parameters dismissal restriction allowed actors item
enabledbooleanRequired within parentWhether to restrict review dismissal to specific actors.

Referenced models: Create a repository ruleset — request body — body rules item pull request parameters dismissal restriction allowed actors item

Create a repository ruleset — request body — body rules item pull request parameters dismissal restriction allowed actors item

FieldTypePresenceDescription and constraints
$objectRootAn actor allowed to dismiss pull request reviews
idintegerRequired within parentID of the actor that can dismiss reviews.
typestringRequired within parentThe type of the actor
One of: User, Team, IntegrationInstallation, RepositoryRole

Create a repository ruleset — request body — body rules item pull request parameters required reviewers item

FieldTypePresenceDescription and constraints
$objectRootA reviewing team, and file patterns describing which files they must approve changes to.
file_patternsarrayRequired within parentArray of file patterns. Pull requests which change matching files must be approved by the specified team. File patterns use fnmatch syntax.
file_patterns[]stringEach item
minimum_approvalsintegerRequired within parentMinimum number of approvals required from the specified team. If set to zero, the team will be added to the pull request but approval is optional.
reviewerModelRequired within parentExpand Create a repository ruleset — request body — body rules item pull request parameters required reviewers item reviewer

Referenced models: Create a repository ruleset — request body — body rules item pull request parameters required reviewers item reviewer

Create a repository ruleset — request body — body rules item pull request parameters required reviewers item reviewer

FieldTypePresenceDescription and constraints
$objectRootA required reviewing team
idintegerRequired within parentID of the reviewer which must review changes to matching files.
typestringRequired within parentThe type of the reviewer
One of: Team

Create a repository ruleset — request body — body rules item required deployments

FieldTypePresenceDescription and constraints
$objectRootChoose which environments must be successfully deployed to before refs can be pushed into a ref that matches this rule.
parametersobjectOptional
parameters.required_deployment_environmentsarrayRequired within parentThe environments that must be successfully deployed to before branches can be merged.
parameters.required_deployment_environments[]stringEach item
typestringRequired within parentOne of: required_deployments

Create a repository ruleset — request body — body rules item required linear history

FieldTypePresenceDescription and constraints
$objectRootPrevent merge commits from being pushed to matching refs.
typestringRequired within parentOne of: required_linear_history

Create a repository ruleset — request body — body rules item required signatures

FieldTypePresenceDescription and constraints
$objectRootCommits pushed to matching refs must have verified signatures.
typestringRequired within parentOne of: required_signatures

Create a repository ruleset — request body — body rules item required status checks

FieldTypePresenceDescription and constraints
$objectRootChoose which status checks must pass before the ref is updated. When enabled, commits must first be pushed to another ref where the checks pass.
parametersobjectOptional
parameters.do_not_enforce_on_createbooleanOptionalAllow repositories and branches to be created if a check would otherwise prohibit it.
parameters.required_status_checksarrayRequired within parentStatus checks that are required.
parameters.required_status_checks[]ModelEach itemExpand Create a repository ruleset — request body — body rules item required status checks parameters required status checks item
parameters.strict_required_status_checks_policybooleanRequired within parentWhether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled.
typestringRequired within parentOne of: required_status_checks

Referenced models: Create a repository ruleset — request body — body rules item required status checks parameters required status checks item

Create a repository ruleset — request body — body rules item required status checks parameters required status checks item

FieldTypePresenceDescription and constraints
$objectRootRequired status check
contextstringRequired within parentThe status check context name that must be present on the commit.
integration_idintegerOptionalThe optional integration ID that this status check must originate from.

Create a repository ruleset — request body — body rules item tag name pattern

FieldTypePresenceDescription and constraints
$objectRootParameters to be used for the tag_name_pattern rule
parametersobjectOptional
parameters.namestringOptionalHow this rule appears when configuring it.
parameters.negatebooleanOptionalIf true, the rule will fail if the pattern matches.
parameters.operatorstringRequired within parentThe operator to use for matching.
One of: starts_with, ends_with, contains, regex
parameters.patternstringRequired within parentThe pattern to match with.
typestringRequired within parentOne of: tag_name_pattern

Create a repository ruleset — request body — body rules item update

FieldTypePresenceDescription and constraints
$objectRootOnly allow users with bypass permission to update matching refs.
parametersobjectOptional
parameters.update_allows_fetch_and_mergebooleanRequired within parentBranch can pull changes from its upstream repository
typestringRequired within parentOne of: update

Create a repository ruleset — request body — body rules item workflows

FieldTypePresenceDescription and constraints
$objectRootRequire all changes made to a targeted branch to pass the specified workflows before they can be merged.
parametersobjectOptional
parameters.do_not_enforce_on_createbooleanOptionalAllow repositories and branches to be created if a check would otherwise prohibit it.
parameters.workflowsarrayRequired within parentWorkflows that must pass for this rule to pass.
parameters.workflows[]ModelEach itemExpand Create a repository ruleset — request body — body rules item workflows parameters workflows item
typestringRequired within parentOne of: workflows

Referenced models: Create a repository ruleset — request body — body rules item workflows parameters workflows item

Create a repository ruleset — request body — body rules item workflows parameters workflows item

FieldTypePresenceDescription and constraints
$objectRootA workflow that must run for this rule to pass
pathstringRequired within parentThe path to the workflow file
refstringOptionalThe ref (branch or tag) of the workflow file to use
repository_idintegerRequired within parentThe ID of the repository where the workflow is defined
shastringOptionalThe commit SHA of the workflow file to use

Create an organization repository ruleset — request body — body conditions

FieldTypePresenceDescription and constraints
$objectRootConditions for an organization ruleset.
The branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.
The push rulesets conditions object does not require the `ref_name` property.
For repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`.
$ (oneOf 1)objectAlternativeConditions to target repositories by name and refs by name
$ (oneOf 1) (allOf 1)ModelAll variants applyExpand Create a repository ruleset — request body — body conditions
$ (oneOf 1) (allOf 2)ModelAll variants applyExpand Create an organization Actions policy — request body — body conditions repository name, workflow path Repository ruleset conditions for repository names
$ (oneOf 2)objectAlternativeConditions to target repositories by id and refs by name
$ (oneOf 2) (allOf 1)ModelAll variants applyExpand Create a repository ruleset — request body — body conditions
$ (oneOf 2) (allOf 2)ModelAll variants applyExpand Create an organization Actions policy — request body — body conditions repository id, workflow path Repository ruleset conditions for repository I Ds
$ (oneOf 3)objectAlternativeConditions to target repositories by property and refs by name
$ (oneOf 3) (allOf 1)ModelAll variants applyExpand Create a repository ruleset — request body — body conditions
$ (oneOf 3) (allOf 2)ModelAll variants applyExpand Create an organization Actions policy — request body — body conditions repository property, workflow path Repository ruleset conditions for repository properties

Referenced models: Create a repository ruleset — request body — body conditions, Create an organization Actions policy — request body — body conditions repository name, workflow path Repository ruleset conditions for repository names, Create an organization Actions policy — request body — body conditions repository id, workflow path Repository ruleset conditions for repository I Ds, Create an organization Actions policy — request body — body conditions repository property, workflow path Repository ruleset conditions for repository properties

Create an organization repository ruleset — request body — body rules item

FieldTypePresenceDescription and constraints
$objectRootA repository rule.
$ (oneOf 1)ModelAlternativeExpand Create a repository ruleset — request body — body rules item creation
$ (oneOf 2)ModelAlternativeExpand Create a repository ruleset — request body — body rules item update
$ (oneOf 3)ModelAlternativeExpand Create a repository ruleset — request body — body rules item deletion
$ (oneOf 4)ModelAlternativeExpand Create a repository ruleset — request body — body rules item required linear history
$ (oneOf 5)ModelAlternativeExpand Create a repository ruleset — request body — body rules item required deployments
$ (oneOf 6)ModelAlternativeExpand Create a repository ruleset — request body — body rules item required signatures
$ (oneOf 7)ModelAlternativeExpand Create a repository ruleset — request body — body rules item pull request
$ (oneOf 8)ModelAlternativeExpand Create a repository ruleset — request body — body rules item required status checks
$ (oneOf 9)ModelAlternativeExpand Create a repository ruleset — request body — body rules item non fast forward
$ (oneOf 10)ModelAlternativeExpand Create a repository ruleset — request body — body rules item commit message pattern
$ (oneOf 11)ModelAlternativeExpand Create a repository ruleset — request body — body rules item commit author email pattern
$ (oneOf 12)ModelAlternativeExpand Create a repository ruleset — request body — body rules item committer email pattern
$ (oneOf 13)ModelAlternativeExpand Create a repository ruleset — request body — body rules item branch name pattern
$ (oneOf 14)ModelAlternativeExpand Create a repository ruleset — request body — body rules item tag name pattern
$ (oneOf 15)ModelAlternativeExpand Create a repository ruleset — request body — body rules item file path restriction
$ (oneOf 16)ModelAlternativeExpand Create a repository ruleset — request body — body rules item max file path length
$ (oneOf 17)ModelAlternativeExpand Create a repository ruleset — request body — body rules item file extension restriction
$ (oneOf 18)ModelAlternativeExpand Create a repository ruleset — request body — body rules item max file size
$ (oneOf 19)ModelAlternativeExpand Create a repository ruleset — request body — body rules item workflows
$ (oneOf 20)ModelAlternativeExpand Create a repository ruleset — request body — body rules item code scanning
$ (oneOf 21)ModelAlternativeExpand Create a repository ruleset — request body — body rules item copilot code review

Referenced models: Create a repository ruleset — request body — body rules item branch name pattern, Create a repository ruleset — request body — body rules item code scanning, Create a repository ruleset — request body — body rules item commit author email pattern, Create a repository ruleset — request body — body rules item commit message pattern, Create a repository ruleset — request body — body rules item committer email pattern, Create a repository ruleset — request body — body rules item copilot code review, Create a repository ruleset — request body — body rules item creation, Create a repository ruleset — request body — body rules item deletion, Create a repository ruleset — request body — body rules item file extension restriction, Create a repository ruleset — request body — body rules item file path restriction, Create a repository ruleset — request body — body rules item max file path length, Create a repository ruleset — request body — body rules item max file size, Create a repository ruleset — request body — body rules item non fast forward, Create a repository ruleset — request body — body rules item pull request, Create a repository ruleset — request body — body rules item required deployments, Create a repository ruleset — request body — body rules item required linear history, Create a repository ruleset — request body — body rules item required signatures, Create a repository ruleset — request body — body rules item required status checks, Create a repository ruleset — request body — body rules item tag name pattern, Create a repository ruleset — request body — body rules item update, Create a repository ruleset — request body — body rules item workflows

Create or update custom property values for a repository — request body — body properties item

FieldTypePresenceDescription and constraints
$objectRootCustom property name and associated value
property_namestringRequired within parentThe name of the property
valueJSONRequired within parent
value (anyOf 1)JSONAlternativeThe value assigned to the property
value (anyOf 1) (oneOf 1)JSONAlternative
value (anyOf 1) (oneOf 1) (anyOf 1)stringAlternative
value (anyOf 1) (oneOf 1) (anyOf 2)nullAlternative
value (anyOf 1) (oneOf 2)arrayAlternative
value (anyOf 1) (oneOf 2)[]stringEach item
value (anyOf 2)nullAlternative

Delete a file — response body

FieldTypePresenceDescription and constraints
$objectRootFile Commit
commitModelRequired within parentExpand Delete a file — response body — commit
contentJSONRequired within parent
content (anyOf 1)objectAlternative
content (anyOf 1)._linksobjectOptional
content (anyOf 1)._links.gitstringOptional
content (anyOf 1)._links.htmlstringOptional
content (anyOf 1)._links.selfstringOptional
content (anyOf 1).download_urlstringOptional
content (anyOf 1).git_urlstringOptional
content (anyOf 1).html_urlstringOptional
content (anyOf 1).namestringOptional
content (anyOf 1).pathstringOptional
content (anyOf 1).shastringOptional
content (anyOf 1).sizeJSONOptional
content (anyOf 1).size (anyOf 1)integerAlternative
content (anyOf 1).size (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
content (anyOf 1).typestringOptional
content (anyOf 1).urlstringOptional
content (anyOf 2)nullAlternative

Referenced models: Delete a file — response body — commit

Delete a file — response body — commit

FieldTypePresenceDescription and constraints
$objectRoot
authorobjectOptional
author.datestringOptional
author.emailstringOptional
author.namestringOptional
committerobjectOptional
committer.datestringOptional
committer.emailstringOptional
committer.namestringOptional
html_urlstringOptional
messagestringOptional
node_idstringOptional
parentsarrayOptional
parents[]objectEach item
parents[].html_urlstringOptional
parents[].shastringOptional
parents[].urlstringOptional
shastringOptional
treeobjectOptional
tree.shastringOptional
tree.urlstringOptional
urlstringOptional
verificationobjectOptional
verification.payloadJSONOptional
verification.payload (anyOf 1)stringAlternative
verification.payload (anyOf 2)nullAlternative
verification.reasonstringOptional
verification.signatureJSONOptional
verification.signature (anyOf 1)stringAlternative
verification.signature (anyOf 2)nullAlternative
verification.verifiedbooleanOptional
verification.verified_atJSONOptional
verification.verified_at (anyOf 1)stringAlternative
verification.verified_at (anyOf 2)nullAlternative

Generate release notes content for a release — response body

FieldTypePresenceDescription and constraints
$objectRootGenerated name and body describing a release
bodystringRequired within parentThe generated body describing the contents of the release supporting markdown formatting
namestringRequired within parentThe generated name of the release

Get Git Hub Pages build — response body

FieldTypePresenceDescription and constraints
$objectRootPage Build
commitstringRequired within parent
created_atstringRequired within parentFormat: date-time
durationJSONRequired within parent
duration (anyOf 1)integerAlternative
duration (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
errorobjectRequired within parent
error.messageJSONRequired within parent
error.message (anyOf 1)stringAlternative
error.message (anyOf 2)nullAlternative
pusherModelRequired within parentExpand Get an issue — response body — user
statusstringRequired within parent
updated_atstringRequired within parentFormat: date-time
urlstringRequired within parentFormat: uri

Referenced models: Get an issue — response body — user

Get a DNS health check for Git Hub Pages — response body — Pages Health Check Status

FieldTypePresenceDescription and constraints
$objectRootPages Health Check Status
alt_domainJSONOptional
alt_domain (anyOf 1)ModelAlternativeExpand Get a DNS health check for Git Hub Pages — response body — Pages Health Check Status domain
alt_domain (anyOf 2)nullAlternative
domainModelOptionalExpand Get a DNS health check for Git Hub Pages — response body — Pages Health Check Status domain

Referenced models: Get a DNS health check for Git Hub Pages — response body — Pages Health Check Status domain

Get a DNS health check for Git Hub Pages — response body — Pages Health Check Status domain

FieldTypePresenceDescription and constraints
$objectRoot
caa_errorJSONOptional
caa_error (anyOf 1)stringAlternative
caa_error (anyOf 2)nullAlternative
dns_resolvesbooleanOptional
enforces_httpsbooleanOptional
has_cname_recordJSONOptional
has_cname_record (anyOf 1)booleanAlternative
has_cname_record (anyOf 2)nullAlternative
has_mx_records_presentJSONOptional
has_mx_records_present (anyOf 1)booleanAlternative
has_mx_records_present (anyOf 2)nullAlternative
hoststringOptional
https_errorJSONOptional
https_error (anyOf 1)stringAlternative
https_error (anyOf 2)nullAlternative
is_a_recordJSONOptional
is_a_record (anyOf 1)booleanAlternative
is_a_record (anyOf 2)nullAlternative
is_apex_domainbooleanOptional
is_cloudflare_ipJSONOptional
is_cloudflare_ip (anyOf 1)booleanAlternative
is_cloudflare_ip (anyOf 2)nullAlternative
is_cname_to_fastlyJSONOptional
is_cname_to_fastly (anyOf 1)booleanAlternative
is_cname_to_fastly (anyOf 2)nullAlternative
is_cname_to_github_user_domainJSONOptional
is_cname_to_github_user_domain (anyOf 1)booleanAlternative
is_cname_to_github_user_domain (anyOf 2)nullAlternative
is_cname_to_pages_dot_github_dot_comJSONOptional
is_cname_to_pages_dot_github_dot_com (anyOf 1)booleanAlternative
is_cname_to_pages_dot_github_dot_com (anyOf 2)nullAlternative
is_fastly_ipJSONOptional
is_fastly_ip (anyOf 1)booleanAlternative
is_fastly_ip (anyOf 2)nullAlternative
is_https_eligibleJSONOptional
is_https_eligible (anyOf 1)booleanAlternative
is_https_eligible (anyOf 2)nullAlternative
is_non_github_pages_ip_presentJSONOptional
is_non_github_pages_ip_present (anyOf 1)booleanAlternative
is_non_github_pages_ip_present (anyOf 2)nullAlternative
is_old_ip_addressJSONOptional
is_old_ip_address (anyOf 1)booleanAlternative
is_old_ip_address (anyOf 2)nullAlternative
is_pages_domainbooleanOptional
is_pointed_to_github_pages_ipJSONOptional
is_pointed_to_github_pages_ip (anyOf 1)booleanAlternative
is_pointed_to_github_pages_ip (anyOf 2)nullAlternative
is_proxiedJSONOptional
is_proxied (anyOf 1)booleanAlternative
is_proxied (anyOf 2)nullAlternative
is_served_by_pagesJSONOptional
is_served_by_pages (anyOf 1)booleanAlternative
is_served_by_pages (anyOf 2)nullAlternative
is_validbooleanOptional
is_valid_domainbooleanOptional
nameserversstringOptional
reasonJSONOptional
reason (anyOf 1)stringAlternative
reason (anyOf 2)nullAlternative
responds_to_httpsbooleanOptional
should_be_a_recordJSONOptional
should_be_a_record (anyOf 1)booleanAlternative
should_be_a_record (anyOf 2)nullAlternative
uristringOptional

Get a Git Hub Pages site — response body

FieldTypePresenceDescription and constraints
$objectRootThe configuration for GitHub Pages for a repository.
build_typeJSONOptional
build_type (anyOf 1)stringAlternativeThe process in which the Page will be built.
Known values: legacy, workflow
build_type (anyOf 2)nullAlternative
cnameJSONRequired within parent
cname (anyOf 1)stringAlternativeThe Pages site's custom domain
cname (anyOf 2)nullAlternative
custom_404booleanRequired within parentWhether the Page has a custom 404 page.
Default: false
html_urlstringOptionalThe web address the Page can be accessed from.
Format: uri
https_certificateModelOptionalExpand Get a Git Hub Pages site — response body — https certificate
https_enforcedbooleanOptionalWhether https is enabled on the domain
pending_domain_unverified_atJSONOptional
pending_domain_unverified_at (anyOf 1)stringAlternativeThe timestamp when a pending domain becomes unverified.
Format: date-time
pending_domain_unverified_at (anyOf 2)nullAlternative
protected_domain_stateJSONOptional
protected_domain_state (anyOf 1)stringAlternativeThe state if the domain is verified
Known values: pending, verified, unverified
protected_domain_state (anyOf 2)nullAlternative
publicbooleanRequired within parentWhether the GitHub Pages site is publicly visible. If set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site.
sourceModelOptionalExpand Get a Git Hub Pages site — response body — source
statusJSONRequired within parent
status (anyOf 1)stringAlternativeThe status of the most recent build of the Page.
Known values: built, building, errored
status (anyOf 2)nullAlternative
urlstringRequired within parentThe API address for accessing this Page resource.
Format: uri

Referenced models: Get a Git Hub Pages site — response body — https certificate, Get a Git Hub Pages site — response body — source

Get a Git Hub Pages site — response body — https certificate

FieldTypePresenceDescription and constraints
$objectRoot
descriptionstringRequired within parent
domainsarrayRequired within parentArray of the domain set and its alternate name (if it is configured)
domains[]stringEach item
expires_atstringOptionalFormat: date
statestringRequired within parentKnown values: new, authorization_created, authorization_pending, authorized, authorization_revoked, issued, uploaded, approved, errored, bad_authz, destroy_pending, dns_changed

Get a Git Hub Pages site — response body — source

FieldTypePresenceDescription and constraints
$objectRoot
branchstringRequired within parent
pathstringRequired within parent

Get a branch — response body

FieldTypePresenceDescription and constraints
$objectRootBranch With Protection
_linksobjectRequired within parent
_links.htmlstringRequired within parent
_links.selfstringRequired within parentFormat: uri
commitModelRequired within parentExpand Get a commit — response body
namestringRequired within parent
patternstringOptional
protectedbooleanRequired within parent
protectionModelRequired within parentExpand Get branch protection — response body
protection_urlstringRequired within parentFormat: uri
required_approving_review_countJSONOptional
required_approving_review_count (anyOf 1)integerAlternative
required_approving_review_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

Referenced models: Get branch protection — response body, Get a commit — response body

Get a commit comment — response body

FieldTypePresenceDescription and constraints
$objectRootCommit Comment
author_associationstringRequired within parentHow the author is associated with the repository.
Known values: COLLABORATOR, CONTRIBUTOR, FIRST_TIMER, FIRST_TIME_CONTRIBUTOR, MANNEQUIN, MEMBER, NONE, OWNER
bodystringRequired within parent
commit_idstringRequired within parent
created_atstringRequired within parentFormat: date-time
html_urlstringRequired within parentFormat: uri
idJSONRequired within parent
id (anyOf 1)integerAlternative
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
lineJSONRequired within parent
line (anyOf 1)JSONAlternative
line (anyOf 1) (anyOf 1)integerAlternative
line (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
line (anyOf 2)nullAlternative
node_idstringRequired within parent
pathJSONRequired within parent
path (anyOf 1)stringAlternative
path (anyOf 2)nullAlternative
positionJSONRequired within parent
position (anyOf 1)JSONAlternative
position (anyOf 1) (anyOf 1)integerAlternative
position (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
position (anyOf 2)nullAlternative
reactionsModelOptionalExpand Get an issue — response body — reactions
updated_atstringRequired within parentFormat: date-time
urlstringRequired within parentFormat: uri
userModelRequired within parentExpand Get an issue — response body — user

Referenced models: Get an issue — response body — user, Get an issue — response body — reactions

Get a commit — response body

FieldTypePresenceDescription and constraints
$objectRootCommit
authorJSONRequired within parent
author (anyOf 1)JSONAlternative
author (anyOf 1) (anyOf 1)ModelAlternativeExpand List users — response body — item
author (anyOf 1) (anyOf 2)ModelAlternativeExpand Re-run a workflow — response body
author (anyOf 2)nullAlternative
comments_urlstringRequired within parentFormat: uri
commitobjectRequired within parent
commit.authorModelRequired within parentExpand Get a commit — response body — commit author
commit.comment_countJSONRequired within parent
commit.comment_count (anyOf 1)integerAlternative
commit.comment_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
commit.committerModelRequired within parentExpand Get a commit — response body — commit author
commit.messagestringRequired within parent
commit.treeobjectRequired within parent
commit.tree.shastringRequired within parent
commit.tree.urlstringRequired within parentFormat: uri
commit.urlstringRequired within parentFormat: uri
commit.verificationModelOptionalExpand Get a tag — response body — verification
committerJSONRequired within parent
committer (anyOf 1)JSONAlternative
committer (anyOf 1) (anyOf 1)ModelAlternativeExpand List users — response body — item
committer (anyOf 1) (anyOf 2)ModelAlternativeExpand Re-run a workflow — response body
committer (anyOf 2)nullAlternative
filesarrayOptional
files[]ModelEach itemExpand List pull requests files — response body — item
html_urlstringRequired within parentFormat: uri
node_idstringRequired within parent
parentsarrayRequired within parent
parents[]objectEach item
parents[].html_urlstringOptionalFormat: uri
parents[].shastringRequired within parent
parents[].urlstringRequired within parentFormat: uri
shastringRequired within parent
statsobjectOptional
stats.additionsJSONOptional
stats.additions (anyOf 1)integerAlternative
stats.additions (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
stats.deletionsJSONOptional
stats.deletions (anyOf 1)integerAlternative
stats.deletions (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
stats.totalJSONOptional
stats.total (anyOf 1)integerAlternative
stats.total (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
urlstringRequired within parentFormat: uri

Referenced models: List pull requests files — response body — item, Re-run a workflow — response body, Get a commit — response body — commit author, List users — response body — item, Get a tag — response body — verification

Get a commit — response body — commit author

FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)objectAlternativeMetaproperties for Git author/committer information.
$ (anyOf 1).datestringOptionalFormat: date-time
$ (anyOf 1).emailstringOptional
$ (anyOf 1).namestringOptional
$ (anyOf 2)nullAlternative

Get a custom deployment protection rule — response body

FieldTypePresenceDescription and constraints
$objectRootDeployment protection rule
appModelRequired within parentExpand Get a custom deployment protection rule — response body — app
enabledbooleanRequired within parentWhether the deployment protection rule is enabled for the environment.
idJSONRequired within parent
id (anyOf 1)integerAlternativeThe unique identifier for the deployment protection rule.
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
node_idstringRequired within parentThe node ID for the deployment protection rule.

Referenced models: Get a custom deployment protection rule — response body — app

Get a custom deployment protection rule — response body — app

FieldTypePresenceDescription and constraints
$objectRootA GitHub App that is providing a custom deployment protection rule.
idJSONRequired within parent
id (anyOf 1)integerAlternativeThe unique identifier of the deployment protection rule integration.
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
integration_urlstringRequired within parentThe URL for the endpoint to get details about the app.
node_idstringRequired within parentThe node ID for the deployment protection rule integration.
slugstringRequired within parentThe slugified name of the deployment protection rule integration.

Get a delivery for a repository webhook — response body

FieldTypePresenceDescription and constraints
$objectRootDelivery made by a webhook.
actionJSONRequired within parent
action (anyOf 1)stringAlternativeThe type of activity for the event that triggered the delivery.
action (anyOf 2)nullAlternative
delivered_atstringRequired within parentTime when the delivery was delivered.
Format: date-time
durationJSONRequired within parent
duration (anyOf 1)numberAlternativeTime spent delivering.
duration (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
eventstringRequired within parentThe event that triggered the delivery.
guidstringRequired within parentUnique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event).
idJSONRequired within parent
id (anyOf 1)integerAlternativeUnique identifier of the delivery.
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
installation_idJSONRequired within parent
installation_id (anyOf 1)JSONAlternative
installation_id (anyOf 1) (anyOf 1)integerAlternativeThe id of the GitHub App installation associated with this event.
installation_id (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
installation_id (anyOf 2)nullAlternative
redeliverybooleanRequired within parentWhether the delivery is a redelivery.
repository_idJSONRequired within parent
repository_id (anyOf 1)JSONAlternative
repository_id (anyOf 1) (anyOf 1)integerAlternativeThe id of the repository associated with this event.
repository_id (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
repository_id (anyOf 2)nullAlternative
requestobjectRequired within parent
request.headersJSONRequired within parent
request.headers (anyOf 1)objectAlternativeThe request headers sent with the webhook delivery.
Additional keys: allowed
request.headers (anyOf 2)nullAlternative
request.payloadJSONRequired within parent
request.payload (anyOf 1)objectAlternativeThe webhook payload.
Additional keys: allowed
request.payload (anyOf 2)nullAlternative
responseobjectRequired within parent
response.headersJSONRequired within parent
response.headers (anyOf 1)objectAlternativeThe response headers received when the delivery was made.
Additional keys: allowed
response.headers (anyOf 2)nullAlternative
response.payloadJSONRequired within parent
response.payload (anyOf 1)stringAlternativeThe response payload received.
Additional keys: allowed
response.payload (anyOf 2)nullAlternative
statusstringRequired within parentDescription of the status of the attempted delivery
status_codeJSONRequired within parent
status_code (anyOf 1)integerAlternativeStatus code received when delivery was made.
status_code (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
throttled_atJSONOptional
throttled_at (anyOf 1)stringAlternativeTime when the webhook delivery was throttled.
Format: date-time
throttled_at (anyOf 2)nullAlternative
urlstringOptionalThe URL target of the delivery.

Get a deploy key — response body

FieldTypePresenceDescription and constraints
$objectRootAn SSH key granting access to a single repository.
added_byJSONOptional
added_by (anyOf 1)stringAlternative
added_by (anyOf 2)nullAlternative
created_atstringRequired within parent
enabledbooleanOptional
idJSONRequired within parent
id (anyOf 1)integerAlternative
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
keystringRequired within parent
last_usedJSONOptional
last_used (anyOf 1)stringAlternativeFormat: date-time
last_used (anyOf 2)nullAlternative
read_onlybooleanRequired within parent
titlestringRequired within parent
urlstringRequired within parent
verifiedbooleanRequired within parent

Get a deployment branch policy — response body

FieldTypePresenceDescription and constraints
$objectRootDetails of a deployment branch or tag policy.
idJSONOptional
id (anyOf 1)integerAlternativeThe unique identifier of the branch or tag policy.
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
namestringOptionalThe name pattern that branches or tags must match in order to deploy to the environment.
node_idstringOptional
typestringOptionalWhether this rule targets a branch or tag.
Known values: branch, tag

Get a deployment status — response body

FieldTypePresenceDescription and constraints
$objectRootThe status of a deployment.
created_atstringRequired within parentFormat: date-time
creatorModelRequired within parentExpand Get an issue — response body — user
deployment_urlstringRequired within parentFormat: uri
descriptionstringRequired within parentA short description of the status.
Default:
Maximum length: 140
environmentstringOptionalThe environment of the deployment that the status is for.
Default:
environment_urlstringOptionalThe URL for accessing your environment.
Default:
Format: uri
idJSONRequired within parent
id (anyOf 1)integerAlternativeFormat: int64
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
log_urlstringOptionalThe URL to associate with this status.
Default:
Format: uri
node_idstringRequired within parent
performed_via_github_appModelOptionalExpand Get an app — response body
repository_urlstringRequired within parentFormat: uri
statestringRequired within parentThe state of the status.
Known values: error, failure, inactive, pending, success, queued, in_progress
target_urlstringRequired within parentClosing down notice: the URL to associate with this status.
Default:
Format: uri
updated_atstringRequired within parentFormat: date-time
urlstringRequired within parentFormat: uri

Referenced models: Get an app — response body, Get an issue — response body — user

Get a deployment — response body

FieldTypePresenceDescription and constraints
$objectRootA request for a specific ref(branch,sha,tag) to be deployed
created_atstringRequired within parentFormat: date-time
creatorModelRequired within parentExpand Get an issue — response body — user
descriptionJSONRequired within parent
description (anyOf 1)stringAlternative
description (anyOf 2)nullAlternative
environmentstringRequired within parentName for the target deployment environment.
idJSONRequired within parent
id (anyOf 1)integerAlternativeUnique identifier of the deployment
Format: int64
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
node_idstringRequired within parent
original_environmentstringOptional
payloadJSONRequired within parent
payload (anyOf 1)objectAlternativeAdditional keys: allowed
payload (anyOf 2)stringAlternative
performed_via_github_appModelOptionalExpand Get an app — response body
production_environmentbooleanOptionalSpecifies if the given environment is one that end-users directly interact with. Default: false.
refstringRequired within parentThe ref to deploy. This can be a branch, tag, or sha.
repository_urlstringRequired within parentFormat: uri
shastringRequired within parent
statuses_urlstringRequired within parentFormat: uri
taskstringRequired within parentParameter to specify a task to execute
transient_environmentbooleanOptionalSpecifies if the given environment is will no longer exist at some point in the future. Default: false.
updated_atstringRequired within parentFormat: date-time
urlstringRequired within parentFormat: uri

Referenced models: Get an app — response body, Get an issue — response body — user

Get a release asset — response body

FieldTypePresenceDescription and constraints
$objectRootData related to a release.
browser_download_urlstringRequired within parentFormat: uri
content_typestringRequired within parent
created_atstringRequired within parentFormat: date-time
digestJSONRequired within parent
digest (anyOf 1)stringAlternative
digest (anyOf 2)nullAlternative
download_countJSONRequired within parent
download_count (anyOf 1)integerAlternative
download_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
idJSONRequired within parent
id (anyOf 1)integerAlternative
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
labelJSONRequired within parent
label (anyOf 1)stringAlternative
label (anyOf 2)nullAlternative
namestringRequired within parentThe file name of the asset.
node_idstringRequired within parent
sizeJSONRequired within parent
size (anyOf 1)integerAlternative
size (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
statestringRequired within parentState of the release asset.
Known values: uploaded, open
updated_atstringRequired within parentFormat: date-time
uploaderModelRequired within parentExpand Get an issue — response body — user
urlstringRequired within parentFormat: uri

Referenced models: Get an issue — response body — user

Get a release — response body

FieldTypePresenceDescription and constraints
$objectRootA release.
assetsarrayRequired within parent
assets[]ModelEach itemExpand Get a release asset — response body
assets_urlstringRequired within parentFormat: uri
authorModelRequired within parentExpand List users — response body — item
bodyJSONOptional
body (anyOf 1)stringAlternative
body (anyOf 2)nullAlternative
body_htmlstringOptional
body_textstringOptional
created_atstringRequired within parentFormat: date-time
discussion_urlstringOptionalThe URL of the release discussion.
Format: uri
draftbooleanRequired within parenttrue to create a draft (unpublished) release, false to create a published one.
html_urlstringRequired within parentFormat: uri
idJSONRequired within parent
id (anyOf 1)integerAlternative
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
immutablebooleanOptionalWhether or not the release is immutable.
mentions_countJSONOptional
mentions_count (anyOf 1)integerAlternative
mentions_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
nameJSONRequired within parent
name (anyOf 1)stringAlternative
name (anyOf 2)nullAlternative
node_idstringRequired within parent
prereleasebooleanRequired within parentWhether to identify the release as a prerelease or a full release.
published_atJSONRequired within parent
published_at (anyOf 1)stringAlternativeFormat: date-time
published_at (anyOf 2)nullAlternative
reactionsModelOptionalExpand Get an issue — response body — reactions
tag_namestringRequired within parentThe name of the tag.
tarball_urlJSONRequired within parent
tarball_url (anyOf 1)stringAlternativeFormat: uri
tarball_url (anyOf 2)nullAlternative
target_commitishstringRequired within parentSpecifies the commitish value that determines where the Git tag is created from.
updated_atJSONOptional
updated_at (anyOf 1)stringAlternativeFormat: date-time
updated_at (anyOf 2)nullAlternative
upload_urlstringRequired within parent
urlstringRequired within parentFormat: uri
zipball_urlJSONRequired within parent
zipball_url (anyOf 1)stringAlternativeFormat: uri
zipball_url (anyOf 2)nullAlternative

Referenced models: Get an issue — response body — reactions, Get a release asset — response body, List users — response body — item

Get a repository README — response body

FieldTypePresenceDescription and constraints
$objectRootContent File
_linksobjectRequired within parent
_links.gitJSONRequired within parent
_links.git (anyOf 1)stringAlternativeFormat: uri
_links.git (anyOf 2)nullAlternative
_links.htmlJSONRequired within parent
_links.html (anyOf 1)stringAlternativeFormat: uri
_links.html (anyOf 2)nullAlternative
_links.selfstringRequired within parentFormat: uri
contentstringRequired within parent
download_urlJSONRequired within parent
download_url (anyOf 1)stringAlternativeFormat: uri
download_url (anyOf 2)nullAlternative
encodingstringRequired within parent
git_urlJSONRequired within parent
git_url (anyOf 1)stringAlternativeFormat: uri
git_url (anyOf 2)nullAlternative
html_urlJSONRequired within parent
html_url (anyOf 1)stringAlternativeFormat: uri
html_url (anyOf 2)nullAlternative
namestringRequired within parent
pathstringRequired within parent
shastringRequired within parent
sizeJSONRequired within parent
size (anyOf 1)integerAlternative
size (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
submodule_git_urlstringOptional
targetstringOptional
typestringRequired within parentKnown values: file
urlstringRequired within parentFormat: uri

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.