RepositoryRuleset
Properties
| Property | Type | Attributes | Description |
|---|---|---|---|
conditions | RepositoryRulesetConditions | Required | The ruleset conditions |
name | string | Required, Identifier | The ruleset name |
owner | string | Required, Identifier | The owner of the repository |
repo | string | Required, Identifier | The repository |
rules | RepositoryRulesetRule[] | Required | The ruleset rules |
bypassActors | RepositoryRulesetBypassActor[] | Actors that can bypass the ruleset | |
bypassActorsJson | string | Optional JSON array string for bypass actors (deprecated: use bypassActors) | |
enforcement | string | The enforcement mode. Common values: active, evaluate | |
target | string | The ruleset target. Common value: branch |
RepositoryRulesetConditions
| Property | Type | Attributes | Description |
|---|---|---|---|
refName | RepositoryRulesetRefNameCondition | The ref name condition |
RepositoryRulesetRule
| Property | Type | Attributes | Description |
|---|---|---|---|
type | string | Required | The ruleset rule type |
parameters | RepositoryRulesetPullRequestRuleParameters | The ruleset rule parameters |
RepositoryRulesetBypassActor
| Property | Type | Attributes | Description |
|---|---|---|---|
actorId | int | The ID of the actor | |
actorType | string | The type of actor (OrganizationAdmin, RepositoryRole, Team, or Integration) | |
bypassMode | string | The bypass mode (always or pull_request) |
RepositoryRulesetRefNameCondition
| Property | Type | Attributes | Description |
|---|---|---|---|
exclude | string[] | Excluded ref name patterns | |
include | string[] | Included ref name patterns |
RepositoryRulesetPullRequestRuleParameters
| Property | Type | Attributes | Description |
|---|---|---|---|
dismissStaleReviewsOnPush | bool | Whether stale reviews are dismissed on push | |
requireCodeOwnerReview | bool | Whether code owner reviews are required | |
requiredApprovingReviewCount | int | The required approving review count | |
requiredReviewThreadResolution | bool | Whether review threads must be resolved | |
requiredStatusChecks | RepositoryRulesetStatusCheck[] | Status checks that must pass before merging (for required_status_checks rules) | |
requireLastPushApproval | bool | Whether the last push must be approved | |
strictRequiredStatusChecksPolicy | bool | Whether the branch must be up to date before merging (for required_status_checks rules) |
RepositoryRulesetStatusCheck
| Property | Type | Attributes | Description |
|---|---|---|---|
context | string | Required | The name of the required status check |
integrationId | int | The optional integration (GitHub App) ID that must provide the status check |