Skip to content

BranchProtectionRules Object ​



id
string
REQUIRED · 

The unique identifier for the protection rule

name
string

The name or description of the protection rule

repos
object[]
REQUIRED · 

The repositories this rule applies to

id
string
pattern
string
REQUIRED · 

The branch/ref pattern this rule applies to

is_active
boolean

Whether this protection rule is currently active

require_owner_approval
boolean

Require approval from designated owners

required_checks
object[]

List of required validations/checks

name
string
context
string
require_up_to_date
boolean
access_restrictions
object

Restrictions on who can write to the branch

is_active
boolean

Whether write restrictions are active

allowed_users
object[]

List of user IDs allowed to write

id
string
allowed_groups
object[]

List of group/team IDs allowed to write

id
string
allowed_roles
object[]

List of role names allowed to write

id
string
integration_restrictions
object

Restrictions on who can integrate/merge changes

is_active
boolean

Whether integration restrictions are active

allowed_users
object[]

List of user IDs allowed to integrate

id
string
allowed_groups
object[]

List of group/team IDs allowed to integrate

id
string
allowed_roles
object[]

List of role names allowed to integrate

id
string
allow_branch_deletion
boolean

Allow the branch to be deleted

created_by
object

User who created this protection rule

id
string
username
string
created_at
string · date-time

When the rule was created

updated_at
string · date-time

When the rule was last updated

remote_data
object

Raw data returned from the remote API call.