Check branch merge eligibility

branchMergeEligibility(branchId: ID!): BranchMergeEligibility!

Requires project.read.

Arguments

ArgumentTypeRequiredDescription
branchIdID!YesBranch to check. A missing branch and one the caller cannot read are both not found.

Response

Returns BranchMergeEligibility!. Open the type for its fields and nested types.

FieldTypeDescription
canMergeBoolean!
applicablePolicies[BranchPolicy!]!Enabled policies that match the branch.
approvals[BranchApproval!]!Approvals that still count.
statusChecks[BranchStatusCheck!]!
blockers[BranchMergeBlocker!]!Reasons the branch cannot merge; empty when it can.

Types marked with ! cannot be null. Lists use [Type] notation. The type index lists all published input and response types.

Example

graphql
query BranchMergeEligibility($branchId: ID!) {
  branchMergeEligibility(branchId: $branchId) {
    canMerge
  }
}
json
{
  "branchId": "00000000-0000-4000-8000-000000000001"
}