ApprovalRule
An approval rule.
Shape
- accept_fromAcceptFrompeople_signed_inpeoplepeople_and_service_accountspeople_and_agentsWhich kinds of approval count toward a rule.
- approversarray of ApproverRef
- created_atstring · date-time
defined_atAccessScopeThe group or repository that defines it.
- The AccessScope schema
- full_pathstring
- idstring
- typeScopeTypegrouprepository
- enforcementRuleEnforcementdefaultenforcedWhether the scopes beneath may replace a rule, or only strengthen it.
- namestring
- requiredinteger · int320–∞Distinct approvals that must count, 1–10.
- rule_idApprovalRuleId (string · uuid)
- updated_atstring · date-time
- applies_to_branchesBranchPattern (string) or nulloptionalThe branches whose merge requests this rule applies to; absent means every branch.
- strengthensApprovalRuleId (string · uuid) or nulloptionalThe enforced rule above this one that it strengthens, in whose place it applies here and beneath.
Example
Synthesized example{
"accept_from": "people_signed_in",
"approvers": [
{
"anyone": {}
},
{
"anyone": {}
}
],
"created_at": "2026-10-09T21:17:09Z",
"defined_at": {
"full_path": "acme/payments-api",
"id": "id-229b",
"type": "group"
},
"enforcement": "default",
"name": "payments-api",
"required": 17,
"rule_id": "96c3d60f-e247-4cb2-afcb-07261821f805",
"updated_at": "2026-10-14T08:52:14Z",
"applies_to_branches": "applies-to-branches-f15d",
"strengthens": "72565b03-17b2-487d-bc09-06e8ef0c7620"
}
Graph
Used inside
Contains
Used by
Sent by 0 operations
No operation takes it as a request body.