Skip to content
GitmoapAPIBeta
Schema

CreateApprovalRuleRequest

Define an approval rule.

Shape

  • nameApprovalRuleName (string)
  • accept_fromAcceptFrompeople_signed_inpeoplepeople_and_service_accountspeople_and_agentsoptionalWhich kinds of approval count toward a rule.
  • applies_to_branchesBranchPattern (string) or nulloptionalA branch pattern such as main or release/*; absent means every branch.
  • approversarray of ApproverRef or nulloptionalWho may satisfy it. Absent means anyone who may approve merge requests here.
  • enforcementRuleEnforcementdefaultenforcedoptionalenforced applies the rule to everything beneath and lets it only be strengthened there. Only someone who administers access here may define one.
  • requiredinteger · int32optional0–∞Distinct approvals that must count, 1–10.
  • strengthensApprovalRuleId (string · uuid) or nulloptionalAn enforced rule defined above, to strengthen here: this rule then applies in its place, and must be at least as strong in every field.

Example

Synthesized example
{
"name": "payments-api",
"accept_from": "people_signed_in",
"applies_to_branches": "applies-to-branches-b3e2",
"approvers": [
{
"anyone": {}
},
{
"anyone": {}
}
],
"enforcement": "default",
"required": 18,
"strengthens": "7702e7f6-c8bf-44e4-8168-72c11aae5bab"
}

Graph

Used inside

No schema contains this one.

Contains

Used by