Skip to content

Properties

idstring
required·

The unique identifier for the protection rule

patternstring
required·

The branch/ref pattern this rule applies to

reposobject[]
required·

The repositories this rule applies to

idstring
access_restrictionsobject

Restrictions on who can write to the branch

allowed_groupsobject[]

List of group/team IDs allowed to write

1 property
idstring
allowed_rolesobject[]

List of role names allowed to write

1 property
idstring
allowed_usersobject[]

List of user IDs allowed to write

1 property
idstring
is_activeboolean

Whether write restrictions are active

allow_branch_deletionboolean

Allow the branch to be deleted

created_atstring · date-time

When the rule was created

created_byobject

User who created this protection rule

idstring
usernamestring
integration_restrictionsobject

Restrictions on who can integrate/merge changes

allowed_groupsobject[]

List of group/team IDs allowed to integrate

1 property
idstring
allowed_rolesobject[]

List of role names allowed to integrate

1 property
idstring
allowed_usersobject[]

List of user IDs allowed to integrate

1 property
idstring
is_activeboolean

Whether integration restrictions are active

is_activeboolean

Whether this protection rule is currently active

namestring

The name or description of the protection rule

remote_dataRecord<string, any>

Raw data returned from the remote API call.

require_owner_approvalboolean

Require approval from designated owners

required_checksobject[]

List of required validations/checks

contextstring
namestring
require_up_to_dateboolean
updated_atstring · date-time

When the rule was last updated