Skip to main content

RepositoryRuleset

Properties

PropertyTypeAttributesDescription
conditionsRepositoryRulesetConditionsRequiredThe ruleset conditions
namestringRequired, IdentifierThe ruleset name
ownerstringRequired, IdentifierThe owner of the repository
repostringRequired, IdentifierThe repository
rulesRepositoryRulesetRule[]RequiredThe ruleset rules
bypassActorsRepositoryRulesetBypassActor[]Actors that can bypass the ruleset
bypassActorsJsonstringOptional JSON array string for bypass actors (deprecated: use bypassActors)
enforcementstringThe enforcement mode. Common values: active, evaluate
targetstringThe ruleset target. Common value: branch

RepositoryRulesetConditions

PropertyTypeAttributesDescription
refNameRepositoryRulesetRefNameConditionThe ref name condition

RepositoryRulesetRule

PropertyTypeAttributesDescription
typestringRequiredThe ruleset rule type
parametersRepositoryRulesetPullRequestRuleParametersThe ruleset rule parameters

RepositoryRulesetBypassActor

PropertyTypeAttributesDescription
actorIdintThe ID of the actor
actorTypestringThe type of actor (OrganizationAdmin, RepositoryRole, Team, or Integration)
bypassModestringThe bypass mode (always or pull_request)

RepositoryRulesetRefNameCondition

PropertyTypeAttributesDescription
excludestring[]Excluded ref name patterns
includestring[]Included ref name patterns

RepositoryRulesetPullRequestRuleParameters

PropertyTypeAttributesDescription
dismissStaleReviewsOnPushboolWhether stale reviews are dismissed on push
requireCodeOwnerReviewboolWhether code owner reviews are required
requiredApprovingReviewCountintThe required approving review count
requiredReviewThreadResolutionboolWhether review threads must be resolved
requiredStatusChecksRepositoryRulesetStatusCheck[]Status checks that must pass before merging (for required_status_checks rules)
requireLastPushApprovalboolWhether the last push must be approved
strictRequiredStatusChecksPolicyboolWhether the branch must be up to date before merging (for required_status_checks rules)

RepositoryRulesetStatusCheck

PropertyTypeAttributesDescription
contextstringRequiredThe name of the required status check
integrationIdintThe optional integration (GitHub App) ID that must provide the status check