MergeRamp / Guides / Field Guide 02
Auto-merge vs merge queue
Auto-merge is on, but your team still has to update branches and wait for CI again. Where does a merge queue help?
You enable auto-merge on an approved PR and return to your next task. Then a teammate merges first. If your repository requires branches to be up to date, your PR now needs another update and another CI run. Someone has to come back and move it along.
Once in a while, that is a small chore. On a busy branch, it becomes a cycle: leave your work, update the PR, wait for checks, and hope another merge does not put you behind again. Auto-merge handles the final merge. A queue can handle the coordination leading up to it.
The short answer
Auto-merge completes a PR when its merge requirements are met. A merge queue coordinates validation and merging across waiting PRs. Use the first to stop watching a merge button; consider the second when keeping branches current becomes a recurring job.
What each one handles
GitHub auto-merge waits for required reviews and checks, then completes the PR. It must be enabled in the repository settings. GitHub’s auto-merge documentation explains its availability and behavior.
| Responsibility | Auto-merge alone | A merge queue |
|---|---|---|
| Completing a ready PR | Automatic, once requirements pass. | Handled by the queue or delegated to GitHub. |
| Coordinating waiting PRs | No ordered queue of its own. | Manages which changes advance and in what order. |
| Keeping validation current | Depends on branch protection and branch updates. | Coordinates validation against the base and preceding changes. |
| Testing strategy | Uses the PR’s required checks. | May be serial, speculative, or batched; check the implementation. |
GitHub’s native queue tests a merge group containing the base branch and changes ahead in the line. It is one implementation of a queue; third-party tools can use different mechanisms. How GitHub’s queue works.
What happens after main moves?
Suppose PR A and PR B both pass CI against the same version of main. A merges first. B’s passing result does not tell you whether its changes work with A’s changes.
- 01A lands. B is now behind.
Auto-merge is enabled for B, but its branch needs updating.
- 02A developer updates B and CI runs again.
If C lands in the meantime, the cycle can repeat.
- 03A queue takes over the coordination.
It manages the next candidate and the checks needed to advance it.
With strict required checks, GitHub requires an up-to-date branch before merging. Loose checks allow an outdated branch to merge. Auto-merge follows the configured requirements; it does not replace them. Read about strict and loose status checks.
A queue can remove repeated manual coordination. It cannot detect an incompatibility your tests do not cover, and it does not make a weak test suite comprehensive.
Start with the bottleneck
Auto-merge may be enough
Choose it when you mainly want to leave a PR after approval and let CI finish. If ready-to-merge PRs rarely overlap, occasional manual branch updates may cost less effort than adopting another tool.
Add a queue when coordination becomes work
Consider a queue when people repeatedly update branches, several PRs are ready at once, or ownership of the next merge is unclear. Track a week of interruptions and repeated CI runs before choosing an implementation.
Match the queue to the workload
A serial queue is straightforward to follow but waits for one candidate’s CI before advancing the next. If merge demand routinely exceeds that capacity, compare batching and parallel validation. More concurrency can also consume more runner capacity.
Start with GitHub auto-merge
A repository administrator can turn on Allow auto-merge in the repository settings. On an eligible PR, choose Enable auto-merge while required reviews or checks are still pending. GitHub merges it once the configured requirements are satisfied. Follow GitHub’s setup instructions.
If the branch falls behind and your rules require it to be current, someone still needs to update it unless a queue or another automation handles that step. Enabling auto-merge alone does not keep the branch up to date.
Before adding a queue
- Review the branch requirements. Confirm which reviews and jobs are required, whether branches must be current, and who can bypass the rules.
- Verify the right CI events. GitHub’s native queue needs
merge_groupchecks. A third-party tool may update PR branches or create its own test branches; follow its setup instructions. Native queue CI setup. - Exercise two waiting PRs. Merge one, fail the other, and check what happens when a branch becomes outdated. Inspect the commit attached to each result.
- Measure the outcome. Compare time to merge, repeated CI runs, and manual interventions. Keep the setup only if it helps your team.
Count the times people have to come back
CI running unattended is different from a developer leaving another task to update a branch, check whether it is their turn, or ask someone else to wait. Those returns are the part of the workflow a queue can take off the team’s hands.
Use your team’s weekly PR count, returns per PR, and minutes per return to estimate the attention spent coordinating merges. The calculator also checks whether a queue validating one PR at a time can handle your workload. The result is an estimate of your current process, not a promise of time saved.
Common questions
Does enabling auto-merge create a queue?
No. Auto-merge on its own does not coordinate a line of PRs. A separate queue can use that setting as its enqueue signal, which is the workflow behind MergeRamp’s queue design. See the PR lifecycle for how a PR moves through a MergeRamp queue.
Why can’t I see the auto-merge button?
Check that auto-merge is enabled for the repository and that you have write access. GitHub only shows the option when a PR cannot be merged immediately, such as while required checks are pending. Check GitHub’s prerequisites.
Do I need Enterprise for auto-merge?
Private repositories on GitHub Team support auto-merge. GitHub’s native queue for private organization repositories requires Enterprise Cloud. See our GitHub Team guide for alternatives.