Merge gates
Requirements every pull request must meet, written in plain words, and the Axon Shaft / gates check that can block merging.
A merge gate is a requirement written in plain words, such as "A migration has a rollback" or "A new API route has a test". Each review says whether every gate is met, not met or doesn't apply, with a one-line reason.
Writing gates
Gates are the gates setting, in the Merge gates section of the account's or the project's settings.
- Up to 10 gates, each up to 200 characters. Blank ones are dropped.
- Write one requirement per gate, as something the model can check against the diff.
- A project's own list replaces the account's. An empty list set on a project turns the account's gates off there.
The account's admin sets the account's gates. The account's admin, or someone with the Admin or Maintain role on the repo, sets a project's.
What the review posts
- The summary comment gets a Merge gates part under the card: each gate with ✓ (met), ✗ (not met) or – (doesn't apply), and the reason.
- A check run named
Axon Shaft / gateson the reviewed commit, with the same table as its summary. It fails when a gate isn't met, or when the review didn't report on one. A gate that doesn't apply passes.
Only the model can judge a gate, so a project with gates always gets a model call, even on a pull request where no checklist runs.
Blocking merges
Add Axon Shaft / gates to the required status checks in the branch's protection rule or ruleset. A pull request then can't merge until every gate is met or doesn't apply.
- The check needs the app's Checks (write) permission. Until the installation approves it, the review still posts, and the job log warns that the check couldn't be posted.
- A pull request that Axon Shaft skipped gets no gates check, so a required one waits. Comment
/reviewto review it. - A dry run logs the conclusion and posts nothing.
Gates need action 1.4 or later.
Last updated on