Merge Queue
Ship faster with zero broken builds. Parallel testing, smart batching, and CI cost optimization.
Stop wasting engineering time on merge conflicts and broken main branches. Mergify’s merge queue tests every PR against the latest code before merging, while parallel execution and smart batching keep your team shipping fast.
Do You Need a Merge Queue?
Section titled Do You Need a Merge Queue?If any of these sound familiar, a merge queue can help:
| Symptom | What’s Happening | How Mergify Helps |
|---|---|---|
| PRs pass CI but break main | PRs tested against stale base | Tests every PR against latest main |
| Developers wait hours to merge | Serial merge bottleneck | Parallel speculative testing |
| CI bill keeps climbing | Full test suite on every PR | Batching + two-step CI |
| Monorepo PRs block each other | Unrelated changes queued together | Scoped queues for independent paths |
| Hotfixes stuck behind features | No priority mechanism | Priority rules for urgent PRs |
What Mergify Solves
Section titled What Mergify SolvesBroken Main Branch
Section titled Broken Main BranchPRs that pass CI individually can break main when merged together. Mergify updates each PR against the latest main and re-runs CI before merging—catching conflicts before they hit production.
Slow Merge Throughput
Section titled Slow Merge ThroughputSerial testing creates bottlenecks. Mergify tests multiple PRs in parallel using speculative execution, so your queue moves as fast as your CI allows.
Spiraling CI Costs
Section titled Spiraling CI CostsRunning full test suites on every PR is expensive. Mergify batches PRs together into single CI runs and supports two-step CI to run heavy tests only at merge time.
→ Batches | Two-step CI
Monorepo Complexity
Section titled Monorepo ComplexityUnrelated changes shouldn’t block each other. Mergify uses scopes to identify which services a PR affects and only batches compatible changes together.
→ Scopes | Monorepo guide
Key Features
Section titled Key Features| Feature | What It Does | Impact |
|---|---|---|
| Parallel checks | Test multiple PRs simultaneously | 3-5x faster merge throughput |
| Batches | Combine PRs into single CI runs | 50-80% fewer CI runs |
| Two-step CI | Run heavy tests only at merge time | Cut CI costs on draft/WIP PRs |
| Priority | Let urgent PRs jump the queue | Ship hotfixes in minutes |
| Scopes | Separate queues for monorepo paths | No cross-service blocking |
| Pause | Freeze merges during incidents | Instant incident response |
Mergify vs GitHub Native Merge Queue
Section titled Mergify vs GitHub Native Merge Queue| Capability | GitHub Native | Mergify |
|---|---|---|
| Parallel speculative checks | Up to 100 | Up to 128 |
| Batch multiple PRs | Configurable size + CI optimization | |
| Priority queues | Label or rule-based | |
| Monorepo scopes | Path-based queues + Bazel/Nx integration | |
| Two-step CI | Draft CI + merge CI | |
| Pause/freeze queue | API + dashboard | |
| Cross-repo queues | Coordinate dependent repos | |
| Queue analytics | Wait times, throughput, failures |
Learn More
Section titled Learn MoreFor Engineering Managers
Track queue performance, monitor throughput metrics, and measure CI cost savings.
For DevOps & Platform
Configure queue rules, set up CI integration, and tune parallel check settings.
Quick Reference
Section titled Quick ReferenceSetup & Configuration Setup guide · Queue rules · Freeze conditions
Performance & Optimization Performance tuning · Monitoring · Deployment strategies
Advanced Features Monorepo guide · Dependent PRs
Operations Pause queue · PR commands