Skip to content

GitHub: Repos schemas (part 2)

82 GitHub schemas with complete fields and constraints.

← Repos operations · All schemas

Get a repository rule suite — response body

FieldTypePresenceDescription and constraints
$objectRootResponse
actor_idJSONOptional
actor_id (anyOf 1)JSONAlternative
actor_id (anyOf 1) (anyOf 1)integerAlternativeThe number that identifies the user.
actor_id (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
actor_id (anyOf 2)nullAlternative
actor_nameJSONOptional
actor_name (anyOf 1)stringAlternativeThe handle for the GitHub user account.
actor_name (anyOf 2)nullAlternative
after_shastringOptionalThe new commit SHA of the ref.
before_shastringOptionalThe previous commit SHA of the ref.
evaluation_resultJSONOptional
evaluation_result (anyOf 1)stringAlternativeThe result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`. Null if no rules with `evaluate` enforcement status were run.
Known values: pass, fail, bypass
evaluation_result (anyOf 2)nullAlternative
idJSONOptional
id (anyOf 1)integerAlternativeThe unique identifier of the rule insight.
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
pushed_atstringOptionalFormat: date-time
refstringOptionalThe ref name that the evaluation ran on.
repository_idJSONOptional
repository_id (anyOf 1)integerAlternativeThe ID of the repository associated with the rule evaluation.
repository_id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
repository_namestringOptionalThe name of the repository without the `.git` extension.
resultstringOptionalThe result of the rule evaluations for rules with the `active` enforcement status.
Known values: pass, fail, bypass
rule_evaluationsarrayOptionalDetails on the evaluated rules.
rule_evaluations[]objectEach item
rule_evaluations[].detailsJSONOptional
rule_evaluations[].details (anyOf 1)stringAlternativeThe detailed failure message for the rule. Null if the rule passed.
rule_evaluations[].details (anyOf 2)nullAlternative
rule_evaluations[].enforcementstringOptionalThe enforcement level of this rule source.
Known values: active, evaluate, deleted ruleset
rule_evaluations[].metadataJSONOptional
rule_evaluations[].metadata (anyOf 1)objectAlternativeAdditional metadata about the rule evaluation.
discriminator: {"mapping": {"pull_request": "#/components/schemas/rule-suite-pull-request", "required_status_checks": "#/components/schemas/rule-suite-required-status-checks"}, "propertyName": "rule_type"}
rule_evaluations[].metadata (anyOf 1) (anyOf 1)ModelAlternativeExpand Get a repository rule suite — response body — rule evaluations item metadata Additional metadata about the rule evaluation Pull request rule suite metadata
rule_evaluations[].metadata (anyOf 1) (anyOf 2)ModelAlternativeExpand Get a repository rule suite — response body — rule evaluations item metadata Additional metadata about the rule evaluation Required status checks rule suite metadata
rule_evaluations[].metadata (anyOf 2)nullAlternative
rule_evaluations[].resultstringOptionalThe result of the evaluation of the individual rule.
Known values: pass, fail
rule_evaluations[].rule_sourceobjectOptional
rule_evaluations[].rule_source.idJSONOptional
rule_evaluations[].rule_source.id (anyOf 1)JSONAlternative
rule_evaluations[].rule_source.id (anyOf 1) (anyOf 1)integerAlternativeThe ID of the rule source.
rule_evaluations[].rule_source.id (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
rule_evaluations[].rule_source.id (anyOf 2)nullAlternative
rule_evaluations[].rule_source.nameJSONOptional
rule_evaluations[].rule_source.name (anyOf 1)stringAlternativeThe name of the rule source.
rule_evaluations[].rule_source.name (anyOf 2)nullAlternative
rule_evaluations[].rule_source.typestringOptionalThe type of rule source.
rule_evaluations[].rule_typestringOptionalThe type of rule.

Referenced models: Get a repository rule suite — response body — rule evaluations item metadata Additional metadata about the rule evaluation Pull request rule suite metadata, Get a repository rule suite — response body — rule evaluations item metadata Additional metadata about the rule evaluation Required status checks rule suite metadata

Get a repository rule suite — response body — rule evaluations item metadata Additional metadata about the rule evaluation Pull request rule suite metadata

FieldTypePresenceDescription and constraints
$objectRootMetadata for a pull request rule evaluation result.
pull_requestobjectOptionalThe pull request associated with the rule evaluation.
pull_request.idJSONOptional
pull_request.id (anyOf 1)integerAlternativeThe unique identifier of the pull request.
pull_request.id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
pull_request.numberJSONOptional
pull_request.number (anyOf 1)integerAlternativeThe number of the pull request.
pull_request.number (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
pull_request.proof_of_presenceJSONOptional
pull_request.proof_of_presence (anyOf 1)objectAlternativeThe proof of presence evaluation for the pull request. Null if proof of presence was not evaluated.
pull_request.proof_of_presence (anyOf 1).base_shastringOptionalThe base commit SHA the proof of presence evaluation applies to. Empty if unavailable.
pull_request.proof_of_presence (anyOf 1).codestringOptionalA code describing the reason for the proof of presence state.
pull_request.proof_of_presence (anyOf 1).head_shastringOptionalThe head commit SHA the proof of presence evaluation applies to. Empty if unavailable.
pull_request.proof_of_presence (anyOf 1).required_levelstringOptionalThe authentication level required by the rule. Empty if unavailable.
pull_request.proof_of_presence (anyOf 1).statestringOptionalThe state of the proof of presence evaluation.
pull_request.proof_of_presence (anyOf 1).verified_atstringOptionalThe time proof of presence was verified, in ISO 8601 format. Empty if proof of presence has not been completed.
pull_request.proof_of_presence (anyOf 1).verified_levelstringOptionalThe authentication level that was verified. Empty if proof of presence has not been completed.
pull_request.proof_of_presence (anyOf 1).verifierJSONOptional
pull_request.proof_of_presence (anyOf 1).verifier (anyOf 1)objectAlternativeThe user who provided proof of presence. Null if no proof of presence was recorded.
pull_request.proof_of_presence (anyOf 1).verifier (anyOf 1).idJSONOptional
pull_request.proof_of_presence (anyOf 1).verifier (anyOf 1).id (anyOf 1)integerAlternativeThe unique identifier of the user.
pull_request.proof_of_presence (anyOf 1).verifier (anyOf 1).id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
pull_request.proof_of_presence (anyOf 1).verifier (anyOf 1).loginstringOptionalThe handle for the GitHub user account.
pull_request.proof_of_presence (anyOf 1).verifier (anyOf 1).typestringOptionalThe type of the user.
pull_request.proof_of_presence (anyOf 1).verifier (anyOf 2)nullAlternative
pull_request.proof_of_presence (anyOf 2)nullAlternative
pull_request.reviewsarrayOptionalThe reviews associated with the pull request.
pull_request.reviews[]objectEach item
pull_request.reviews[].idJSONOptional
pull_request.reviews[].id (anyOf 1)integerAlternativeThe unique identifier of the review.
pull_request.reviews[].id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
pull_request.reviews[].statestringOptionalThe state of the review.
pull_request.reviews[].userobjectOptionalThe user who submitted the review.
pull_request.reviews[].user.idJSONOptional
pull_request.reviews[].user.id (anyOf 1)integerAlternativeThe unique identifier of the user.
pull_request.reviews[].user.id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
pull_request.reviews[].user.loginstringOptionalThe handle for the GitHub user account.
pull_request.reviews[].user.typestringOptionalThe type of the user.
pull_request.userobjectOptionalThe user who created the pull request.
pull_request.user.idJSONOptional
pull_request.user.id (anyOf 1)integerAlternativeThe unique identifier of the user.
pull_request.user.id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
pull_request.user.loginstringOptionalThe handle for the GitHub user account.
pull_request.user.typestringOptionalThe type of the user.

Get a repository rule suite — response body — rule evaluations item metadata Additional metadata about the rule evaluation Required status checks rule suite metadata

FieldTypePresenceDescription and constraints
$objectRootMetadata for a required status checks rule evaluation result.
checksarrayOptionalThe status checks associated with the rule evaluation.
checks[]objectEach item
checks[].appJSONOptional
checks[].app (anyOf 1)objectAlternativeThe GitHub App associated with the status check.
checks[].app (anyOf 1).idJSONOptional
checks[].app (anyOf 1).id (anyOf 1)integerAlternativeThe unique identifier of the GitHub App.
checks[].app (anyOf 1).id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
checks[].app (anyOf 1).namestringOptionalThe name of the GitHub App.
checks[].app (anyOf 1).slugstringOptionalThe slug of the GitHub App.
checks[].app (anyOf 2)nullAlternative
checks[].contextstringOptionalThe context name of the status check.
checks[].idJSONOptional
checks[].id (anyOf 1)integerAlternativeThe unique identifier of the status check.
checks[].id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
checks[].statestringOptionalThe state of the status check.
checks[].typestringOptionalThe type of the status check.

Get a repository ruleset — response body

FieldTypePresenceDescription and constraints
$objectRootA set of rules to apply when specified conditions are met.
_linksobjectOptional
_links.htmlJSONOptional
_links.html (anyOf 1)objectAlternative
_links.html (anyOf 1).hrefstringOptionalThe html URL of the ruleset
_links.html (anyOf 2)nullAlternative
_links.selfobjectOptional
_links.self.hrefstringOptionalThe URL of the ruleset
bypass_actorsarrayOptionalThe actors that can bypass the rules in this ruleset
bypass_actors[]ModelEach itemExpand Get a repository ruleset — response body — bypass actors item
conditionsJSONOptional
conditions (anyOf 1)JSONAlternative
conditions (anyOf 1) (anyOf 1)ModelAlternativeExpand Create a repository ruleset — request body — body conditions
conditions (anyOf 1) (anyOf 2)ModelAlternativeExpand Get a repository ruleset — response body — conditions value Organization ruleset conditions
conditions (anyOf 2)nullAlternative
created_atstringOptionalFormat: date-time
current_user_can_bypassstringOptionalThe bypass type of the user making the API request for this ruleset. This field is only returned when
querying the repository-level endpoint.
Known values: always, pull_requests_only, never, exempt
enforcementstringRequired within parentThe enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page (`evaluate` is only available with GitHub Enterprise).
Known values: disabled, active, evaluate
idJSONRequired within parent
id (anyOf 1)integerAlternativeThe ID of the ruleset
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
namestringRequired within parentThe name of the ruleset
node_idstringOptional
rulesarrayOptional
rules[]ModelEach itemExpand Get a repository ruleset — response body — rules item
sourcestringRequired within parentThe name of the source
source_typestringOptionalThe type of the source of the ruleset
Known values: Repository, Organization, Enterprise
targetstringOptionalThe target of the ruleset
Known values: branch, tag, push, repository
updated_atstringOptionalFormat: date-time

Referenced models: Get a repository ruleset — response body — conditions value Organization ruleset conditions, Get a repository ruleset — response body — rules item, Get a repository ruleset — response body — bypass actors item, Create a repository ruleset — request body — body conditions

Get a repository ruleset — response body — bypass actors item

FieldTypePresenceDescription and constraints
$objectRootAn actor that can bypass rules in a ruleset
actor_idJSONOptional
actor_id (anyOf 1)JSONAlternative
actor_id (anyOf 1) (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 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
actor_id (anyOf 2)nullAlternative
actor_typestringRequired within parentThe type of actor that can bypass a ruleset.
Known values: 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.
Known values: always, pull_request, exempt
Default: always

Get a repository ruleset — response body — conditions value Organization ruleset 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`.
$ (anyOf 1)objectAlternativeConditions to target repositories by name and refs by name
$ (anyOf 1) (allOf 1)ModelAll variants applyExpand Create a repository ruleset — request body — body conditions
$ (anyOf 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
$ (anyOf 2)objectAlternativeConditions to target repositories by id and refs by name
$ (anyOf 2) (allOf 1)ModelAll variants applyExpand Create a repository ruleset — request body — body conditions
$ (anyOf 2) (allOf 2)ModelAll variants applyExpand Get a repository Actions policy — response body — conditions value Organization Actions policy conditions repository id, workflow path Repository ruleset conditions for repository I Ds
$ (anyOf 3)objectAlternativeConditions to target repositories by property and refs by name
$ (anyOf 3) (allOf 1)ModelAll variants applyExpand Create a repository ruleset — request body — body conditions
$ (anyOf 3) (allOf 2)ModelAll variants applyExpand Get a repository Actions policy — response body — conditions value Organization Actions policy conditions repository property, workflow path Repository ruleset conditions for repository properties

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

Get a repository ruleset — response body — rules item

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

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

Get a repository ruleset — response 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.
Known values: starts_with, ends_with, contains, regex
parameters.patternstringRequired within parentThe pattern to match with.
typestringRequired within parentKnown values: branch_name_pattern

Get a repository ruleset — response 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_dropJSONOptional
parameters.max_coverage_drop (anyOf 1)numberAlternativeThe 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.max_coverage_drop (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
parameters.minimum_coverageJSONOptional
parameters.minimum_coverage (anyOf 1)numberAlternativeThe 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
parameters.minimum_coverage (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
typestringRequired within parentKnown values: code_coverage

Get a repository ruleset — response 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.
Known values: errors, warnings, notes, all
typestringRequired within parentKnown values: code_quality

Get a repository ruleset — response 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 Get a repository ruleset — response body — rules item code scanning parameters code scanning tools item
typestringRequired within parentKnown values: code_scanning

Referenced models: Get a repository ruleset — response body — rules item code scanning parameters code scanning tools item

Get a repository ruleset — response 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)."
Known values: 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)."
Known values: none, critical, high_or_higher, medium_or_higher, all
toolstringRequired within parentThe name of a code scanning tool

Get a repository ruleset — response 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.
Known values: starts_with, ends_with, contains, regex
parameters.patternstringRequired within parentThe pattern to match with.
typestringRequired within parentKnown values: commit_author_email_pattern

Get a repository ruleset — response 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.
Known values: starts_with, ends_with, contains, regex
parameters.patternstringRequired within parentThe pattern to match with.
typestringRequired within parentKnown values: commit_message_pattern

Get a repository ruleset — response 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.
Known values: starts_with, ends_with, contains, regex
parameters.patternstringRequired within parentThe pattern to match with.
typestringRequired within parentKnown values: committer_email_pattern

Get a repository ruleset — response 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 parentKnown values: copilot_code_review

Get a repository ruleset — response body — rules item creation

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

Get a repository ruleset — response body — rules item deletion

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

Get a repository ruleset — response 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 parentKnown values: file_extension_restriction

Get a repository ruleset — response 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 parentKnown values: file_path_restriction

Get a repository ruleset — response 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 parentKnown values: license_compliance_scanning

Get a repository ruleset — response 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_lengthJSONRequired within parent
parameters.max_file_path_length (anyOf 1)integerAlternativeThe maximum amount of characters allowed in file paths.
Maximum: 32767
Minimum: 1
parameters.max_file_path_length (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
typestringRequired within parentKnown values: max_file_path_length

Get a repository ruleset — response 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_sizeJSONRequired within parent
parameters.max_file_size (anyOf 1)integerAlternativeThe maximum file size allowed in megabytes. This limit does not apply to Git Large File Storage (Git LFS).
Maximum: 100
Minimum: 1
parameters.max_file_size (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
typestringRequired within parentKnown values: max_file_size

Get a repository ruleset — response body — rules item merge queue

FieldTypePresenceDescription and constraints
$objectRootMerges must be performed via a merge queue.
parametersobjectOptional
parameters.check_response_timeout_minutesJSONRequired within parent
parameters.check_response_timeout_minutes (anyOf 1)integerAlternativeMaximum 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.check_response_timeout_minutes (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
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.
Known values: ALLGREEN, HEADGREEN
parameters.max_entries_to_buildJSONRequired within parent
parameters.max_entries_to_build (anyOf 1)integerAlternativeLimit the number of queued pull requests requesting checks and workflow runs at the same time.
Maximum: 100
Minimum: 0
parameters.max_entries_to_build (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
parameters.max_entries_to_mergeJSONRequired within parent
parameters.max_entries_to_merge (anyOf 1)integerAlternativeThe maximum number of PRs that will be merged together in a group.
Maximum: 100
Minimum: 0
parameters.max_entries_to_merge (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
parameters.merge_methodstringRequired within parentMethod to use when merging changes from queued pull requests.
Known values: MERGE, SQUASH, REBASE
parameters.min_entries_to_mergeJSONRequired within parent
parameters.min_entries_to_merge (anyOf 1)integerAlternativeThe minimum number of PRs that will be merged together in a group.
Maximum: 100
Minimum: 0
parameters.min_entries_to_merge (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
parameters.min_entries_to_merge_wait_minutesJSONRequired within parent
parameters.min_entries_to_merge_wait_minutes (anyOf 1)integerAlternativeThe 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
parameters.min_entries_to_merge_wait_minutes (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
typestringRequired within parentKnown values: merge_queue

Get a repository ruleset — response body — rules item non fast forward

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

Get a repository ruleset — response 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 itemKnown values: merge, squash, rebase
parameters.dismiss_stale_reviews_on_pushbooleanRequired within parentNew, reviewable commits pushed will dismiss previous pull request review approvals.
parameters.dismissal_restrictionModelOptionalExpand Get a repository ruleset — response 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_countJSONRequired within parent
parameters.required_approving_review_count (anyOf 1)integerAlternativeThe number of approving reviews that are required before a pull request can be merged.
Maximum: 10
Minimum: 0
parameters.required_approving_review_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
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 Get a repository ruleset — response body — rules item pull request parameters required reviewers item
typestringRequired within parentKnown values: pull_request

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

Get a repository ruleset — response 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 Get a repository ruleset — response body — rules item pull request parameters dismissal restriction allowed actors item
enabledbooleanRequired within parentWhether to restrict review dismissal to specific actors.

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

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

FieldTypePresenceDescription and constraints
$objectRootAn actor allowed to dismiss pull request reviews
idJSONRequired within parent
id (anyOf 1)integerAlternativeID of the actor that can dismiss reviews.
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
typestringRequired within parentThe type of the actor
Known values: User, Team, IntegrationInstallation, RepositoryRole

Get a repository ruleset — response 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_approvalsJSONRequired within parent
minimum_approvals (anyOf 1)integerAlternativeMinimum 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.
minimum_approvals (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
reviewerModelRequired within parentExpand Get a repository ruleset — response body — rules item pull request parameters required reviewers item reviewer

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

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

FieldTypePresenceDescription and constraints
$objectRootA required reviewing team
idJSONRequired within parent
id (anyOf 1)integerAlternativeID of the reviewer which must review changes to matching files.
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
typestringRequired within parentThe type of the reviewer
Known values: Team

Get a repository ruleset — response 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 parentKnown values: required_deployments

Get a repository ruleset — response body — rules item required linear history

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

Get a repository ruleset — response body — rules item required signatures

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

Get a repository ruleset — response 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 Get a repository ruleset — response 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 parentKnown values: required_status_checks

Referenced models: Get a repository ruleset — response body — rules item required status checks parameters required status checks item

Get a repository ruleset — response 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_idJSONOptional
integration_id (anyOf 1)integerAlternativeThe optional integration ID that this status check must originate from.
integration_id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

Get a repository ruleset — response 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.
Known values: starts_with, ends_with, contains, regex
parameters.patternstringRequired within parentThe pattern to match with.
typestringRequired within parentKnown values: tag_name_pattern

Get a repository ruleset — response 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 parentKnown values: update

Get a repository ruleset — response 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 Get a repository ruleset — response body — rules item workflows parameters workflows item
typestringRequired within parentKnown values: workflows

Referenced models: Get a repository ruleset — response body — rules item workflows parameters workflows item

Get a repository ruleset — response 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_idJSONRequired within parent
repository_id (anyOf 1)integerAlternativeThe ID of the repository where the workflow is defined
repository_id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
shastringOptionalThe commit SHA of the workflow file to use

Get a repository webhook — response body

FieldTypePresenceDescription and constraints
$objectRootWebhooks for repositories.
activebooleanRequired within parentDetermines whether the hook is actually triggered on pushes.
configModelRequired within parentExpand Get a webhook configuration for a repository — response body
created_atstringRequired within parentFormat: date-time
deliveries_urlstringOptionalFormat: uri
eventsarrayRequired within parentDetermines what events the hook is triggered for. Default: ['push'].
events[]stringEach item
idJSONRequired within parent
id (anyOf 1)integerAlternativeUnique identifier of the webhook.
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
last_responseModelRequired within parentExpand Get a repository webhook — response body — last response
namestringRequired within parentThe name of a valid service, use 'web' for a webhook.
ping_urlstringRequired within parentFormat: uri
test_urlstringRequired within parentFormat: uri
typestringRequired within parent
updated_atstringRequired within parentFormat: date-time
urlstringRequired within parentFormat: uri

Referenced models: Get a repository webhook — response body — last response, Get a webhook configuration for a repository — response body

Get a repository webhook — response body — last response

FieldTypePresenceDescription and constraints
$objectRoot
codeJSONRequired within parent
code (anyOf 1)JSONAlternative
code (anyOf 1) (anyOf 1)integerAlternative
code (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
code (anyOf 2)nullAlternative
messageJSONRequired within parent
message (anyOf 1)stringAlternative
message (anyOf 2)nullAlternative
statusJSONRequired within parent
status (anyOf 1)stringAlternative
status (anyOf 2)nullAlternative

Get a webhook configuration for a repository — response body

FieldTypePresenceDescription and constraints
$objectRootConfiguration object of the webhook
content_typestringOptionalThe media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`.
insecure_sslModelOptionalExpand Get a webhook configuration for a repository — response body — insecure ssl
secretstringOptionalIf provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/webhooks/event-payloads/#delivery-headers).
urlstringOptionalThe URL to which the payloads will be delivered.
Format: uri

Referenced models: Get a webhook configuration for a repository — response body — insecure ssl

Get a webhook configuration for a repository — response body — insecure ssl

FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)stringAlternativeDetermines whether the SSL certificate of the host for `url` will be verified when delivering payloads. Supported values include `0` (verification is performed) and `1` (verification is not performed). The default is `0`. **We strongly recommend not setting this to `1` as you are subject to man-in-the-middle and other attacks.**
$ (anyOf 2)JSONAlternative
$ (anyOf 2) (anyOf 1)numberAlternative
$ (anyOf 2) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

Get access restrictions — response body

FieldTypePresenceDescription and constraints
$objectRootBranch Restriction Policy
appsarrayRequired within parent
apps[]objectEach item
apps[].client_idstringOptional
apps[].created_atstringOptional
apps[].descriptionstringOptional
apps[].eventsarrayOptional
apps[].events[]stringEach item
apps[].external_urlstringOptional
apps[].html_urlstringOptional
apps[].idJSONOptional
apps[].id (anyOf 1)integerAlternative
apps[].id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
apps[].namestringOptional
apps[].node_idstringOptional
apps[].ownerobjectOptional
apps[].owner.avatar_urlstringOptional
apps[].owner.descriptionstringOptional
apps[].owner.events_urlstringOptional
apps[].owner.followers_urlstringOptional
apps[].owner.following_urlstringOptional
apps[].owner.gists_urlstringOptional
apps[].owner.gravatar_idstringOptional
apps[].owner.hooks_urlstringOptional
apps[].owner.html_urlstringOptional
apps[].owner.idJSONOptional
apps[].owner.id (anyOf 1)integerAlternative
apps[].owner.id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
apps[].owner.issues_urlstringOptional
apps[].owner.loginstringOptional
apps[].owner.members_urlstringOptional
apps[].owner.node_idstringOptional
apps[].owner.organizations_urlstringOptional
apps[].owner.public_members_urlstringOptional
apps[].owner.received_events_urlstringOptional
apps[].owner.repos_urlstringOptional
apps[].owner.site_adminbooleanOptional
apps[].owner.starred_urlstringOptional
apps[].owner.subscriptions_urlstringOptional
apps[].owner.typestringOptional
apps[].owner.urlstringOptional
apps[].owner.user_view_typestringOptional
apps[].permissionsobjectOptional
apps[].permissions.contentsstringOptional
apps[].permissions.issuesstringOptional
apps[].permissions.metadatastringOptional
apps[].permissions.single_filestringOptional
apps[].slugstringOptional
apps[].updated_atstringOptional
apps_urlstringRequired within parentFormat: uri
teamsarrayRequired within parent
teams[]ModelEach itemExpand List teams — response body — item
teams_urlstringRequired within parentFormat: uri
urlstringRequired within parentFormat: uri
usersarrayRequired within parent
users[]objectEach item
users[].avatar_urlstringOptional
users[].events_urlstringOptional
users[].followers_urlstringOptional
users[].following_urlstringOptional
users[].gists_urlstringOptional
users[].gravatar_idstringOptional
users[].html_urlstringOptional
users[].idJSONOptional
users[].id (anyOf 1)integerAlternativeFormat: int64
users[].id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
users[].loginstringOptional
users[].node_idstringOptional
users[].organizations_urlstringOptional
users[].received_events_urlstringOptional
users[].repos_urlstringOptional
users[].site_adminbooleanOptional
users[].starred_urlstringOptional
users[].subscriptions_urlstringOptional
users[].typestringOptional
users[].urlstringOptional
users[].user_view_typestringOptional
users_urlstringRequired within parentFormat: uri

Referenced models: List teams — response body — item

Get admin branch protection — response body

FieldTypePresenceDescription and constraints
$objectRootProtected Branch Admin Enforced
enabledbooleanRequired within parent
urlstringRequired within parentFormat: uri

Get all contributor commit activity — response body — value array item

FieldTypePresenceDescription and constraints
$objectRootContributor Activity
authorModelRequired within parentExpand Get an issue — response body — user
totalJSONRequired within parent
total (anyOf 1)integerAlternative
total (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
weeksarrayRequired within parent
weeks[]objectEach item
weeks[].aJSONOptional
weeks[].a (anyOf 1)integerAlternative
weeks[].a (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
weeks[].cJSONOptional
weeks[].c (anyOf 1)integerAlternative
weeks[].c (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
weeks[].dJSONOptional
weeks[].d (anyOf 1)integerAlternative
weeks[].d (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
weeks[].wJSONOptional
weeks[].w (anyOf 1)integerAlternative
weeks[].w (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

Referenced models: Get an issue — response body — user

Get all custom property values for a repository — response body — 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) (anyOf 1)JSONAlternative
value (anyOf 1) (anyOf 1) (anyOf 1)stringAlternative
value (anyOf 1) (anyOf 1) (anyOf 2)nullAlternative
value (anyOf 1) (anyOf 2)arrayAlternative
value (anyOf 1) (anyOf 2)[]stringEach item
value (anyOf 2)nullAlternative

Get all repository topics — response body

FieldTypePresenceDescription and constraints
$objectRootA topic aggregates entities that are related to a subject.
namesarrayRequired within parent
names[]stringEach item

Get an autolink reference of a repository — response body

FieldTypePresenceDescription and constraints
$objectRootAn autolink reference.
idJSONRequired within parent
id (anyOf 1)integerAlternative
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
is_alphanumericbooleanRequired within parentWhether this autolink reference matches alphanumeric characters. If false, this autolink reference only matches numeric characters.
key_prefixstringRequired within parentThe prefix of a key that is linkified.
updated_atJSONOptional
updated_at (anyOf 1)stringAlternativeFormat: date-time
updated_at (anyOf 2)nullAlternative
url_templatestringRequired within parentA template for the target URL that is generated if a key was found.

Get an environment — response body

FieldTypePresenceDescription and constraints
$objectRootDetails of a deployment environment
created_atstringRequired within parentThe time that the environment was created, in ISO 8601 format.
Format: date-time
deployment_branch_policyModelOptionalExpand Get an environment — response body — deployment branch policy
html_urlstringRequired within parent
idJSONRequired within parent
id (anyOf 1)integerAlternativeThe id of the environment.
Format: int64
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
namestringRequired within parentThe name of the environment.
node_idstringRequired within parent
protection_rulesarrayOptionalBuilt-in deployment protection rules for the environment.
protection_rules[]JSONEach item
protection_rules[] (anyOf 1)objectAlternative
protection_rules[] (anyOf 1).idJSONRequired within parent
protection_rules[] (anyOf 1).id (anyOf 1)integerAlternative
protection_rules[] (anyOf 1).id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
protection_rules[] (anyOf 1).node_idstringRequired within parent
protection_rules[] (anyOf 1).typestringRequired within parent
protection_rules[] (anyOf 1).wait_timerModelOptionalExpand Get an environment — response body — protection rules item id, node id, type, wait timer wait timer
protection_rules[] (anyOf 2)objectAlternative
protection_rules[] (anyOf 2).idJSONRequired within parent
protection_rules[] (anyOf 2).id (anyOf 1)integerAlternative
protection_rules[] (anyOf 2).id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
protection_rules[] (anyOf 2).node_idstringRequired within parent
protection_rules[] (anyOf 2).prevent_self_reviewbooleanOptionalWhether deployments to this environment can be approved by the user who created the deployment.
protection_rules[] (anyOf 2).reviewersarrayOptionalThe people or teams that may approve jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed.
protection_rules[] (anyOf 2).reviewers[]objectEach item
protection_rules[] (anyOf 2).reviewers[].reviewerJSONOptional
protection_rules[] (anyOf 2).reviewers[].reviewer (anyOf 1)ModelAlternativeExpand List users — response body — item
protection_rules[] (anyOf 2).reviewers[].reviewer (anyOf 2)ModelAlternativeExpand List teams — response body — item
protection_rules[] (anyOf 2).reviewers[].typestringOptionalThe type of reviewer.
Known values: User, Team
protection_rules[] (anyOf 2).typestringRequired within parent
protection_rules[] (anyOf 3)objectAlternative
protection_rules[] (anyOf 3).idJSONRequired within parent
protection_rules[] (anyOf 3).id (anyOf 1)integerAlternative
protection_rules[] (anyOf 3).id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
protection_rules[] (anyOf 3).node_idstringRequired within parent
protection_rules[] (anyOf 3).typestringRequired within parent
updated_atstringRequired within parentThe time that the environment was last updated, in ISO 8601 format.
Format: date-time
urlstringRequired within parent

Referenced models: Get an environment — response body — deployment branch policy, List users — response body — item, List teams — response body — item, Get an environment — response body — protection rules item id, node id, type, wait timer wait timer

Get an environment — response body — deployment branch policy

FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)objectAlternativeThe type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`.
$ (anyOf 1).custom_branch_policiesbooleanRequired within parentWhether only branches that match the specified name patterns can deploy to this environment. If `custom_branch_policies` is `true`, `protected_branches` must be `false`; if `custom_branch_policies` is `false`, `protected_branches` must be `true`.
$ (anyOf 1).protected_branchesbooleanRequired within parentWhether only branches with branch protection rules can deploy to this environment. If `protected_branches` is `true`, `custom_branch_policies` must be `false`; if `protected_branches` is `false`, `custom_branch_policies` must be `true`.
$ (anyOf 2)nullAlternative

Get an environment — response body — protection rules item id, node id, type, wait timer wait timer

FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)integerAlternativeThe amount of time to delay a job after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days).
$ (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

Get branch protection — response body

FieldTypePresenceDescription and constraints
$objectRootBranch Protection
allow_deletionsobjectOptional
allow_deletions.enabledbooleanOptional
allow_force_pushesobjectOptional
allow_force_pushes.enabledbooleanOptional
allow_fork_syncingobjectOptionalWhether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing.
allow_fork_syncing.enabledbooleanOptionalDefault: false
block_creationsobjectOptional
block_creations.enabledbooleanOptional
enabledbooleanOptional
enforce_adminsModelOptionalExpand Get admin branch protection — response body
lock_branchobjectOptionalWhether to set the branch as read-only. If this is true, users will not be able to push to the branch.
lock_branch.enabledbooleanOptionalDefault: false
namestringOptional
protection_urlstringOptional
required_conversation_resolutionobjectOptional
required_conversation_resolution.enabledbooleanOptional
required_linear_historyobjectOptional
required_linear_history.enabledbooleanOptional
required_pull_request_reviewsModelOptionalExpand Get pull request review protection — response body
required_signaturesobjectOptional
required_signatures.enabledbooleanRequired within parent
required_signatures.urlstringRequired within parentFormat: uri
required_status_checksModelOptionalExpand Get branch protection — response body — required status checks
restrictionsModelOptionalExpand Get access restrictions — response body
urlstringOptional

Referenced models: Get access restrictions — response body, Get admin branch protection — response body, Get pull request review protection — response body, Get branch protection — response body — required status checks

Get branch protection — response body — required status checks

FieldTypePresenceDescription and constraints
$objectRootProtected Branch Required Status Check
checksarrayRequired within parent
checks[]objectEach item
checks[].app_idJSONRequired within parent
checks[].app_id (anyOf 1)JSONAlternative
checks[].app_id (anyOf 1) (anyOf 1)integerAlternative
checks[].app_id (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
checks[].app_id (anyOf 2)nullAlternative
checks[].contextstringRequired within parent
contextsarrayRequired within parent
contexts[]stringEach item
contexts_urlstringOptional
enforcement_levelstringOptional
strictbooleanOptional
urlstringOptional

Get community profile metrics — response body

FieldTypePresenceDescription and constraints
$objectRootCommunity Profile
content_reports_enabledbooleanOptional
descriptionJSONRequired within parent
description (anyOf 1)stringAlternative
description (anyOf 2)nullAlternative
documentationJSONRequired within parent
documentation (anyOf 1)stringAlternative
documentation (anyOf 2)nullAlternative
filesModelRequired within parentExpand Get community profile metrics — response body — files
health_percentageJSONRequired within parent
health_percentage (anyOf 1)integerAlternative
health_percentage (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
updated_atJSONRequired within parent
updated_at (anyOf 1)stringAlternativeFormat: date-time
updated_at (anyOf 2)nullAlternative

Referenced models: Get community profile metrics — response body — files

Get community profile metrics — response body — files

FieldTypePresenceDescription and constraints
$objectRoot
code_of_conductModelRequired within parentExpand Get community profile metrics — response body — files code of conduct
code_of_conduct_fileModelRequired within parentExpand Get community profile metrics — response body — files readme
contributingModelRequired within parentExpand Get community profile metrics — response body — files readme
issue_templateModelRequired within parentExpand Get community profile metrics — response body — files readme
licenseModelRequired within parentExpand Create a fork — response body — license
pull_request_templateModelRequired within parentExpand Get community profile metrics — response body — files readme
readmeModelRequired within parentExpand Get community profile metrics — response body — files readme

Referenced models: Get community profile metrics — response body — files code of conduct, Get community profile metrics — response body — files readme, Create a fork — response body — license

Get community profile metrics — response body — files code of conduct

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

Get community profile metrics — response body — files readme

FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)objectAlternative
$ (anyOf 1).html_urlstringRequired within parentFormat: uri
$ (anyOf 1).urlstringRequired within parentFormat: uri
$ (anyOf 2)nullAlternative

Get page views — response body

FieldTypePresenceDescription and constraints
$objectRootView Traffic
countJSONRequired within parent
count (anyOf 1)integerAlternative
count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
uniquesJSONRequired within parent
uniques (anyOf 1)integerAlternative
uniques (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
viewsarrayRequired within parent
views[]ModelEach itemExpand Get page views — response body — views item

Referenced models: Get page views — response body — views item

Get page views — response body — views item

FieldTypePresenceDescription and constraints
$objectRoot
countJSONRequired within parent
count (anyOf 1)integerAlternative
count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
timestampstringRequired within parentFormat: date-time
uniquesJSONRequired within parent
uniques (anyOf 1)integerAlternative
uniques (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

Get pull request review protection — response body

FieldTypePresenceDescription and constraints
$objectRootProtected Branch Pull Request Review
bypass_pull_request_allowancesobjectOptionalAllow specific users, teams, or apps to bypass pull request requirements.
bypass_pull_request_allowances.appsarrayOptionalThe list of apps allowed to bypass pull request requirements.
bypass_pull_request_allowances.apps[]ModelEach itemExpand Get an app — response body
bypass_pull_request_allowances.teamsarrayOptionalThe list of teams allowed to bypass pull request requirements.
bypass_pull_request_allowances.teams[]ModelEach itemExpand List teams — response body — item
bypass_pull_request_allowances.usersarrayOptionalThe list of users allowed to bypass pull request requirements.
bypass_pull_request_allowances.users[]ModelEach itemExpand List users — response body — item
dismiss_stale_reviewsbooleanRequired within parent
dismissal_restrictionsobjectOptional
dismissal_restrictions.appsarrayOptionalThe list of apps with review dismissal access.
dismissal_restrictions.apps[]ModelEach itemExpand Get an app — response body
dismissal_restrictions.teamsarrayOptionalThe list of teams with review dismissal access.
dismissal_restrictions.teams[]ModelEach itemExpand List teams — response body — item
dismissal_restrictions.teams_urlstringOptional
dismissal_restrictions.urlstringOptional
dismissal_restrictions.usersarrayOptionalThe list of users with review dismissal access.
dismissal_restrictions.users[]ModelEach itemExpand List users — response body — item
dismissal_restrictions.users_urlstringOptional
require_code_owner_reviewsbooleanRequired within parent
require_last_push_approvalbooleanOptionalWhether the most recent push must be approved by someone other than the person who pushed it.
Default: false
required_approving_review_countJSONOptional
required_approving_review_count (anyOf 1)integerAlternativeMaximum: 6
Minimum: 0
required_approving_review_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
urlstringOptionalFormat: uri

Referenced models: Get an app — response body, List users — response body — item, List teams — response body — item

Get repository clones — response body

FieldTypePresenceDescription and constraints
$objectRootClone Traffic
clonesarrayRequired within parent
clones[]ModelEach itemExpand Get page views — response body — views item
countJSONRequired within parent
count (anyOf 1)integerAlternative
count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
uniquesJSONRequired within parent
uniques (anyOf 1)integerAlternative
uniques (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

Referenced models: Get page views — response body — views item

Get repository content — response body — Content Directory

FieldTypePresenceDescription and constraints
$arrayRootA list of directory items
$[]objectEach item
$[]._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
$[].contentstringOptional
$[].download_urlJSONRequired within parent
$[].download_url (anyOf 1)stringAlternativeFormat: uri
$[].download_url (anyOf 2)nullAlternative
$[].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]+)?$
$[].typestringRequired within parentKnown values: dir, file, submodule, symlink
$[].urlstringRequired within parentFormat: uri

Get repository content — response body — Submodule Content

FieldTypePresenceDescription and constraints
$objectRootAn object describing a submodule
_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
download_urlJSONRequired within parent
download_url (anyOf 1)stringAlternativeFormat: uri
download_url (anyOf 2)nullAlternative
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_urlstringRequired within parentFormat: uri
typestringRequired within parentKnown values: submodule
urlstringRequired within parentFormat: uri

Get repository content — response body — Symlink Content

FieldTypePresenceDescription and constraints
$objectRootAn object describing a symlink
_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
download_urlJSONRequired within parent
download_url (anyOf 1)stringAlternativeFormat: uri
download_url (anyOf 2)nullAlternative
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]+)?$
targetstringRequired within parent
typestringRequired within parentKnown values: symlink
urlstringRequired within parentFormat: uri

Get repository permissions for a user — response body

FieldTypePresenceDescription and constraints
$objectRootRepository Collaborator Permission
permissionstringRequired within parent
role_namestringRequired within parent
userModelRequired within parentExpand Get repository permissions for a user — response body — user

Referenced models: Get repository permissions for a user — response body — user

Get repository permissions for a user — response body — user

FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)ModelAlternativeExpand Get repository permissions for a user — response body — user Collaborator
$ (anyOf 2)nullAlternative

Referenced models: Get repository permissions for a user — response body — user Collaborator

Get repository permissions for a user — response body — user Collaborator

FieldTypePresenceDescription and constraints
$objectRootCollaborator
avatar_urlstringRequired within parentFormat: uri
emailJSONOptional
email (anyOf 1)stringAlternative
email (anyOf 2)nullAlternative
events_urlstringRequired within parent
followers_urlstringRequired within parentFormat: uri
following_urlstringRequired within parent
gists_urlstringRequired within parent
gravatar_idJSONRequired within parent
gravatar_id (anyOf 1)stringAlternative
gravatar_id (anyOf 2)nullAlternative
html_urlstringRequired within parentFormat: uri
idJSONRequired within parent
id (anyOf 1)integerAlternativeFormat: int64
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
loginstringRequired within parent
nameJSONOptional
name (anyOf 1)stringAlternative
name (anyOf 2)nullAlternative
node_idstringRequired within parent
organizations_urlstringRequired within parentFormat: uri
permissionsobjectOptional
permissions.adminbooleanRequired within parent
permissions.maintainbooleanOptional
permissions.pullbooleanRequired within parent
permissions.pushbooleanRequired within parent
permissions.triagebooleanOptional
received_events_urlstringRequired within parentFormat: uri
repos_urlstringRequired within parentFormat: uri
role_namestringRequired within parent
site_adminbooleanRequired within parent
starred_urlstringRequired within parent
subscriptions_urlstringRequired within parentFormat: uri
typestringRequired within parent
urlstringRequired within parentFormat: uri
user_view_typestringOptional

Get repository ruleset history — response body — item

FieldTypePresenceDescription and constraints
$objectRootThe historical version of a ruleset
actorobjectRequired within parentThe actor who updated the ruleset
actor.idJSONOptional
actor.id (anyOf 1)integerAlternative
actor.id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
actor.typestringOptional
updated_atstringRequired within parentFormat: date-time
version_idJSONRequired within parent
version_id (anyOf 1)integerAlternativeThe ID of the previous version of the ruleset
version_id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

Get repository ruleset version — response body

FieldTypePresenceDescription and constraints
$JSONRoot
$ (allOf 1)ModelAll variants applyExpand Get repository ruleset history — response body — item
$ (allOf 2)objectAll variants apply
$ (allOf 2).stateobjectRequired within parentThe state of the ruleset version

Referenced models: Get repository ruleset history — response body — item

Get rules for a branch — response body — item

FieldTypePresenceDescription and constraints
$objectRootA repository rule with ruleset details.
$ (anyOf 1)JSONAlternative
$ (anyOf 1) (allOf 1)ModelAll variants applyExpand Get a repository ruleset — response body — rules item creation
$ (anyOf 1) (allOf 2)ModelAll variants applyExpand Get rules for a branch — response body — item / ruleset_source_type: Repository, Organization, type: update repository ruleset data for rule
$ (anyOf 2)JSONAlternative
$ (anyOf 2) (allOf 1)ModelAll variants applyExpand Get a repository ruleset — response body — rules item update
$ (anyOf 2) (allOf 2)ModelAll variants applyExpand Get rules for a branch — response body — item / ruleset_source_type: Repository, Organization, type: update repository ruleset data for rule
$ (anyOf 3)JSONAlternative
$ (anyOf 3) (allOf 1)ModelAll variants applyExpand Get a repository ruleset — response body — rules item deletion
$ (anyOf 3) (allOf 2)ModelAll variants applyExpand Get rules for a branch — response body — item / ruleset_source_type: Repository, Organization, type: update repository ruleset data for rule
$ (anyOf 4)JSONAlternative
$ (anyOf 4) (allOf 1)ModelAll variants applyExpand Get a repository ruleset — response body — rules item required linear history
$ (anyOf 4) (allOf 2)ModelAll variants applyExpand Get rules for a branch — response body — item / ruleset_source_type: Repository, Organization, type: update repository ruleset data for rule
$ (anyOf 5)JSONAlternative
$ (anyOf 5) (allOf 1)ModelAll variants applyExpand Get a repository ruleset — response body — rules item merge queue
$ (anyOf 5) (allOf 2)ModelAll variants applyExpand Get rules for a branch — response body — item / ruleset_source_type: Repository, Organization, type: update repository ruleset data for rule
$ (anyOf 6)JSONAlternative
$ (anyOf 6) (allOf 1)ModelAll variants applyExpand Get a repository ruleset — response body — rules item required deployments
$ (anyOf 6) (allOf 2)ModelAll variants applyExpand Get rules for a branch — response body — item / ruleset_source_type: Repository, Organization, type: update repository ruleset data for rule
$ (anyOf 7)JSONAlternative
$ (anyOf 7) (allOf 1)ModelAll variants applyExpand Get a repository ruleset — response body — rules item required signatures
$ (anyOf 7) (allOf 2)ModelAll variants applyExpand Get rules for a branch — response body — item / ruleset_source_type: Repository, Organization, type: update repository ruleset data for rule
$ (anyOf 8)JSONAlternative
$ (anyOf 8) (allOf 1)ModelAll variants applyExpand Get a repository ruleset — response body — rules item pull request
$ (anyOf 8) (allOf 2)ModelAll variants applyExpand Get rules for a branch — response body — item / ruleset_source_type: Repository, Organization, type: update repository ruleset data for rule
$ (anyOf 9)JSONAlternative
$ (anyOf 9) (allOf 1)ModelAll variants applyExpand Get a repository ruleset — response body — rules item required status checks
$ (anyOf 9) (allOf 2)ModelAll variants applyExpand Get rules for a branch — response body — item / ruleset_source_type: Repository, Organization, type: update repository ruleset data for rule
$ (anyOf 10)JSONAlternative
$ (anyOf 10) (allOf 1)ModelAll variants applyExpand Get a repository ruleset — response body — rules item non fast forward
$ (anyOf 10) (allOf 2)ModelAll variants applyExpand Get rules for a branch — response body — item / ruleset_source_type: Repository, Organization, type: update repository ruleset data for rule
$ (anyOf 11)JSONAlternative
$ (anyOf 11) (allOf 1)ModelAll variants applyExpand Get a repository ruleset — response body — rules item commit message pattern
$ (anyOf 11) (allOf 2)ModelAll variants applyExpand Get rules for a branch — response body — item / ruleset_source_type: Repository, Organization, type: update repository ruleset data for rule
$ (anyOf 12)JSONAlternative
$ (anyOf 12) (allOf 1)ModelAll variants applyExpand Get a repository ruleset — response body — rules item commit author email pattern
$ (anyOf 12) (allOf 2)ModelAll variants applyExpand Get rules for a branch — response body — item / ruleset_source_type: Repository, Organization, type: update repository ruleset data for rule
$ (anyOf 13)JSONAlternative
$ (anyOf 13) (allOf 1)ModelAll variants applyExpand Get a repository ruleset — response body — rules item committer email pattern
$ (anyOf 13) (allOf 2)ModelAll variants applyExpand Get rules for a branch — response body — item / ruleset_source_type: Repository, Organization, type: update repository ruleset data for rule
$ (anyOf 14)JSONAlternative
$ (anyOf 14) (allOf 1)ModelAll variants applyExpand Get a repository ruleset — response body — rules item branch name pattern
$ (anyOf 14) (allOf 2)ModelAll variants applyExpand Get rules for a branch — response body — item / ruleset_source_type: Repository, Organization, type: update repository ruleset data for rule
$ (anyOf 15)JSONAlternative
$ (anyOf 15) (allOf 1)ModelAll variants applyExpand Get a repository ruleset — response body — rules item tag name pattern
$ (anyOf 15) (allOf 2)ModelAll variants applyExpand Get rules for a branch — response body — item / ruleset_source_type: Repository, Organization, type: update repository ruleset data for rule
$ (anyOf 16)JSONAlternative
$ (anyOf 16) (allOf 1)ModelAll variants applyExpand Get a repository ruleset — response body — rules item workflows
$ (anyOf 16) (allOf 2)ModelAll variants applyExpand Get rules for a branch — response body — item / ruleset_source_type: Repository, Organization, type: update repository ruleset data for rule
$ (anyOf 17)JSONAlternative
$ (anyOf 17) (allOf 1)ModelAll variants applyExpand Get a repository ruleset — response body — rules item code scanning
$ (anyOf 17) (allOf 2)ModelAll variants applyExpand Get rules for a branch — response body — item / ruleset_source_type: Repository, Organization, type: update repository ruleset data for rule
$ (anyOf 18)JSONAlternative
$ (anyOf 18) (allOf 1)ModelAll variants applyExpand Get a repository ruleset — response body — rules item code quality
$ (anyOf 18) (allOf 2)ModelAll variants applyExpand Get rules for a branch — response body — item / ruleset_source_type: Repository, Organization, type: update repository ruleset data for rule
$ (anyOf 19)JSONAlternative
$ (anyOf 19) (allOf 1)ModelAll variants applyExpand Get a repository ruleset — response body — rules item code coverage
$ (anyOf 19) (allOf 2)ModelAll variants applyExpand Get rules for a branch — response body — item / ruleset_source_type: Repository, Organization, type: update repository ruleset data for rule
$ (anyOf 20)JSONAlternative
$ (anyOf 20) (allOf 1)ModelAll variants applyExpand Get a repository ruleset — response body — rules item copilot code review
$ (anyOf 20) (allOf 2)ModelAll variants applyExpand Get rules for a branch — response body — item / ruleset_source_type: Repository, Organization, type: update repository ruleset data for rule
$ (anyOf 21)JSONAlternative
$ (anyOf 21) (allOf 1)ModelAll variants applyExpand Get a repository ruleset — response body — rules item license compliance scanning
$ (anyOf 21) (allOf 2)ModelAll variants applyExpand Get rules for a branch — response body — item / ruleset_source_type: Repository, Organization, type: update repository ruleset data for rule
$ (anyOf 22)JSONAlternative
$ (anyOf 22) (allOf 1)ModelAll variants applyExpand Get a repository ruleset — response body — rules item file path restriction
$ (anyOf 22) (allOf 2)ModelAll variants applyExpand Get rules for a branch — response body — item / ruleset_source_type: Repository, Organization, type: update repository ruleset data for rule
$ (anyOf 23)JSONAlternative
$ (anyOf 23) (allOf 1)ModelAll variants applyExpand Get a repository ruleset — response body — rules item max file path length
$ (anyOf 23) (allOf 2)ModelAll variants applyExpand Get rules for a branch — response body — item / ruleset_source_type: Repository, Organization, type: update repository ruleset data for rule
$ (anyOf 24)JSONAlternative
$ (anyOf 24) (allOf 1)ModelAll variants applyExpand Get a repository ruleset — response body — rules item file extension restriction
$ (anyOf 24) (allOf 2)ModelAll variants applyExpand Get rules for a branch — response body — item / ruleset_source_type: Repository, Organization, type: update repository ruleset data for rule
$ (anyOf 25)JSONAlternative
$ (anyOf 25) (allOf 1)ModelAll variants applyExpand Get a repository ruleset — response body — rules item max file size
$ (anyOf 25) (allOf 2)ModelAll variants applyExpand Get rules for a branch — response body — item / ruleset_source_type: Repository, Organization, type: update repository ruleset data for rule

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

Get rules for a branch — response body — item / ruleset_source_type: Repository, Organization, type: update repository ruleset data for rule

FieldTypePresenceDescription and constraints
$JSONRootUser-defined metadata to store domain-specific information limited to 8 keys with scalar values.
ruleset_idJSONOptional
ruleset_id (anyOf 1)integerAlternativeThe ID of the ruleset that includes this rule.
ruleset_id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
ruleset_sourcestringOptionalThe name of the source of the ruleset that includes this rule.
ruleset_source_typestringOptionalThe type of source for the ruleset that includes this rule.
Known values: Repository, Organization

Get status checks protection — response body

FieldTypePresenceDescription and constraints
$objectRootStatus Check Policy
checksarrayRequired within parent
checks[]objectEach item
checks[].app_idJSONRequired within parent
checks[].app_id (anyOf 1)JSONAlternative
checks[].app_id (anyOf 1) (anyOf 1)integerAlternative
checks[].app_id (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
checks[].app_id (anyOf 2)nullAlternative
checks[].contextstringRequired within parent
contextsarrayRequired within parent
contexts[]stringEach item
contexts_urlstringRequired within parentFormat: uri
strictbooleanRequired within parent
urlstringRequired within parentFormat: uri

Get the combined status for a specific reference — response body

FieldTypePresenceDescription and constraints
$objectRootCombined Commit Status
commit_urlstringRequired within parentFormat: uri
repositoryModelRequired within parentExpand Transfer a repository — response body
shastringRequired within parent
statestringRequired within parent
statusesarrayRequired within parent
statuses[]ModelEach itemExpand Get the combined status for a specific reference — response body — statuses item
total_countJSONRequired within parent
total_count (anyOf 1)integerAlternative
total_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
urlstringRequired within parentFormat: uri

Referenced models: Transfer a repository — response body, Get the combined status for a specific reference — response body — statuses item

Get the combined status for a specific reference — response body — statuses item

FieldTypePresenceDescription and constraints
$objectRoot
avatar_urlJSONRequired within parent
avatar_url (anyOf 1)stringAlternativeFormat: uri
avatar_url (anyOf 2)nullAlternative
contextstringRequired within parent
created_atstringRequired within parentFormat: date-time
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
requiredJSONOptional
required (anyOf 1)booleanAlternative
required (anyOf 2)nullAlternative
statestringRequired within parent
target_urlJSONRequired within parent
target_url (anyOf 1)stringAlternativeFormat: uri
target_url (anyOf 2)nullAlternative
updated_atstringRequired within parentFormat: date-time
urlstringRequired within parentFormat: uri

Get the hash algorithm for a repository — response body

FieldTypePresenceDescription and constraints
$objectRootRepository hash algorithm
hash_algorithmstringRequired within parentThe Git hash algorithm used by this repository.
Known values: sha1, sha256

Get the hourly commit count for each day — response body — array item

FieldTypePresenceDescription and constraints
$arrayRootCode Frequency Stat
$[]JSONEach item
$[] (anyOf 1)integerAlternative
$[] (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

Get the last year of commit activity — response body — value array item

FieldTypePresenceDescription and constraints
$objectRootCommit Activity
daysarrayRequired within parent
days[]JSONEach item
days[] (anyOf 1)integerAlternative
days[] (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
totalJSONRequired within parent
total (anyOf 1)integerAlternative
total (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
weekJSONRequired within parent
week (anyOf 1)integerAlternative
week (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

Get the status of a Git Hub Pages deployment — response body

FieldTypePresenceDescription and constraints
$objectRoot
statusstringOptionalThe current status of the deployment.
Known values: deployment_in_progress, syncing_files, finished_file_sync, updating_pages, purging_cdn, deployment_cancelled, deployment_failed, deployment_content_failed, deployment_attempt_error, deployment_lost, succeed

Get the weekly commit count — response body

FieldTypePresenceDescription and constraints
$objectRoot
allarrayRequired within parent
all[]JSONEach item
all[] (anyOf 1)integerAlternative
all[] (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
ownerarrayRequired within parent
owner[]JSONEach item
owner[] (anyOf 1)integerAlternative
owner[] (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

Get top referral paths — response body — item

FieldTypePresenceDescription and constraints
$objectRootContent Traffic
countJSONRequired within parent
count (anyOf 1)integerAlternative
count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
pathstringRequired within parent
titlestringRequired within parent
uniquesJSONRequired within parent
uniques (anyOf 1)integerAlternative
uniques (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

Get top referral sources — response body — item

FieldTypePresenceDescription and constraints
$objectRootReferrer Traffic
countJSONRequired within parent
count (anyOf 1)integerAlternative
count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
referrerstringRequired within parent
uniquesJSONRequired within parent
uniques (anyOf 1)integerAlternative
uniques (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

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.