View as Markdown

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.

Install 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 ruleset

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

On any open pull request, comment:

@mergifyio queue
An @mergifyio queue comment followed by the Merge Queue Status comment

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.

Open the Mergify dashboard to see your PR moving through the queue in real-time.

Mergify Queue Status

That’s it. Your merge queue is live.

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

Once your basic queue is running, explore these optimizations:

GoalFeatureGuide
Skip manual queueingAuto-queue approved PRsAuto-Merge
Merge fasterTest multiple PRs in parallelParallel checks
Save CI costsCombine PRs into single CI runsBatches
Prioritize urgent PRsJump the queue when neededPriority
Run heavy tests only at mergeSplit fast/slow CI checksTwo-step CI
Monorepo optimizationOnly test affected codeScopes

Was this page helpful?