Skip to content

The merge queue

There is no git merge and no merge button. You enqueue a pull request and the server lands it.

Terminal window
garden pr merge 42
  1. The server validates mergeability. If the PR isn’t ready, the blockers are reported and nothing is queued.
  2. The queue rebases it onto the current head of trunk.
  3. It re-runs CI against that rebase — not the stale base the author tested.
  4. Green, it lands. Not green, it’s kicked back out.

Step 3 is why the queue exists: two PRs that are each green in isolation can break trunk together, and testing after the rebase catches that before it lands.

Gate Cleared by
Owner approval An eligible non-author owner approved — see Code ownership
Green CI Every required check passes on the head revision — see CI
All threads resolved No open review threads, including ci-bot’s — see Code review

garden pr view 42 shows what’s outstanding.

Terminal window
garden queue # what's queued right now
garden pr checks 42 # this PR's checks
garden pr wait 42 --for merged --timeout 30m

garden pr wait exits 0 when the condition is met, 124 on timeout, and 1 if the PR can’t be reached — usable directly in a script or agent loop. It also waits --for review, attention, ci, mergeable, or closed.

Terminal window
garden pr merge 42 --cancel # remove from the queue
garden pr merge 42 -p 10 # higher priority merges first

Each commit in a stack is its own PR, and a child’s diff is defined against its parent, so the queue lands them in order.

Terminal window
garden pr merge 42 --skip-review

A fast-forward “direct push”: it still opens the PR for the record, then lands it without review or CI. Requires the repository’s merge-without-review policy and that your change sits on the current head — otherwise garden pull and try again.