View as Markdown

Merge Queue

Ship faster with zero broken builds. Parallel testing, smart batching, and CI cost optimization.


3-5x
merge throughput
60-90%
CI cost reduction
Zero
broken builds

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.

If any of these sound familiar, a merge queue can help:

SymptomWhat’s HappeningHow Mergify Helps
PRs pass CI but break mainPRs tested against stale baseTests every PR against latest main
Developers wait hours to mergeSerial merge bottleneckParallel speculative testing
CI bill keeps climbingFull test suite on every PRBatching + two-step CI
Monorepo PRs block each otherUnrelated changes queued togetherScoped queues for independent paths
Hotfixes stuck behind featuresNo priority mechanismPriority rules for urgent PRs

PRs 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.

How the queue works

Serial testing creates bottlenecks. Mergify tests multiple PRs in parallel using speculative execution, so your queue moves as fast as your CI allows.

Parallel checks

Running 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

Unrelated 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

FeatureWhat It DoesImpact
Parallel checksTest multiple PRs simultaneously3-5x faster merge throughput
BatchesCombine PRs into single CI runs50-80% fewer CI runs
Two-step CIRun heavy tests only at merge timeCut CI costs on draft/WIP PRs
PriorityLet urgent PRs jump the queueShip hotfixes in minutes
ScopesSeparate queues for monorepo pathsNo cross-service blocking
PauseFreeze merges during incidentsInstant incident response

Mergify vs GitHub Native Merge Queue

Section titled Mergify vs GitHub Native Merge Queue
CapabilityGitHub NativeMergify
Parallel speculative checksUp to 100Up to 128
Batch multiple PRsConfigurable size + CI optimization
Priority queuesLabel or rule-based
Monorepo scopesPath-based queues + Bazel/Nx integration
Two-step CIDraft CI + merge CI
Pause/freeze queueAPI + dashboard
Cross-repo queuesCoordinate dependent repos
Queue analyticsWait times, throughput, failures

For 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.

For Developers

Understand PR lifecycle, queue behavior, and how to use priority labels.

Setup & 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