Setting Up a Merge Queue
Get your merge queue running in 5 minutes.
Get your first PR merged through a queue in under 5 minutes. No complex setup required.
Quick start
Section titled Quick start1. Install Mergify
Section titled 1. Install MergifyInstall the Mergify GitHub App on your repository.
2. Require your CI and let Mergify bypass the ruleset
Section titled 2. Require your CI and let Mergify bypass the rulesetThe merge queue waits for the checks your branch requires. If the branch requires none, the queue merges without waiting for your CI.
In an active GitHub ruleset on the branch you merge into, turn on Require
status checks to pass (the required_status_checks rule) and add your CI
checks. Skip this if the branch already requires them.
On every ruleset that applies to that branch or to the queue branches, add
Mergify to the bypass list with the exempt bypass mode, so the ruleset does
not block the branches the merge queue creates and updates. Mergify still
applies the rules it supports, such as required reviews and status checks, as
merge
conditions. See
Configuring Mergify as a Bypass
Actor for
the steps and Recommended Ruleset
Setup for the rest of
the ruleset.
3. Queue your first PR
Section titled 3. Queue your first PROn any open pull request, comment:
@mergifyio queue
Mergify adds your PR to the queue, updates it against the latest main branch, waits for your required checks to pass, and merges it automatically.
4. Watch it work
Section titled 4. Watch it workOpen the Mergify dashboard to see your PR moving through the queue in real-time.
That’s it. Your merge queue is live.
What you get immediately
Section titled What you get immediatelyWith no Mergify configuration, your queue already:
- Updates PRs against the latest main before merging
- Runs your CI on the updated code (not stale branches)
- Merges automatically when your required checks pass
- Respects your GitHub branch protections and rulesets
This alone prevents the classic problem: PRs that pass CI individually but break main when merged together.
Next steps
Section titled Next stepsOnce your basic queue is running, explore these optimizations:
| Goal | Feature | Guide |
|---|---|---|
| Skip manual queueing | Auto-queue approved PRs | Auto-Merge |
| Merge faster | Test multiple PRs in parallel | Parallel checks |
| Save CI costs | Combine PRs into single CI runs | Batches |
| Prioritize urgent PRs | Jump the queue when needed | Priority |
| Run heavy tests only at merge | Split fast/slow CI checks | Two-step CI |
| Monorepo optimization | Only test affected code | Scopes |
Was this page helpful?
Thanks for your feedback!