Skip to content

Commit 3aa2d93

Browse files
authored
docs(migration): add docs on how to migrate from GH MQ (#8535)
1 parent 1c7c306 commit 3aa2d93

File tree

3 files changed

+140
-0
lines changed

3 files changed

+140
-0
lines changed

src/content/docs/migrate.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import Docset from '../../components/DocsetGrid/Docset.astro';
77
import DocsetGrid from '../../components/DocsetGrid/DocsetGrid.astro';
88
import { TbBulldozer } from 'react-icons/tb';
99
import { BsRobot } from 'react-icons/bs';
10+
import { SiGithub } from 'react-icons/si';
1011

1112
Thinking about switching? Pick your current tool below to see how to migrate to Mergify with minimal friction.
1213

@@ -19,6 +20,9 @@ Thinking about switching? Pick your current tool below to see how to migrate to
1920
<Docset title="Bors‑NG" path="/migrate/bors-ng" icon={BsRobot}>
2021
Replace Bors queues and try/staging flows with Mergify Merge Queue.
2122
</Docset>
23+
<Docset title="GitHub Merge Queue" path="/migrate/github-merge-queue" icon={SiGithub}>
24+
Extend GitHub Merge Queue with automation, batching & observability.
25+
</Docset>
2226
</DocsetGrid>
2327

2428
Don’t see your tool? Tell us which one to add next.
Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
---
2+
title: Migrate from GitHub Merge Queue to Mergify
3+
description: Technical mapping of GitHub Merge Queue concepts to Mergify with added capabilities.
4+
---
5+
import githubLogo from "../../images/integrations/github/logo.svg"
6+
import IntegrationLogo from "../../../components/IntegrationLogo.astro"
7+
8+
<IntegrationLogo src={githubLogo} alt="GitHub logo"/>
9+
10+
GitHub's native Merge Queue ensures each PR is tested against the latest base
11+
before merging. Migrating to Mergify keeps that guarantee while adding
12+
fine‑grained policies, batching strategies, real CI efficiency insights, and
13+
queue observability (latency, throughput, bottlenecks) in one system.
14+
15+
This guide shows a minimal, incremental migration—no rewrites, keep your branch
16+
protections and required checks exactly as they are.
17+
18+
:::tip[Need help?]
19+
20+
We've migrated many teams from GitHub Merge Queue. [Reach
21+
out](mailto:[email protected]) and we’ll review your GitHub configuration and
22+
propose an equivalent Mergify setup, plus quick wins (batching, priorities,
23+
etc).
24+
25+
:::
26+
27+
## When to move beyond GitHub Merge Queue
28+
29+
Choose Mergify if you need any of:
30+
31+
- Multiple queue policies (e.g., different batch sizes / update methods per
32+
directory or label)
33+
34+
- Conditional enqueue rules (labels, file globs, author, commit message, path
35+
ownership)
36+
37+
- Explicit priorities (interactive hotfix elevation)
38+
39+
- Parallel speculative checks (reduce head‑of‑line blocking)
40+
41+
- Batching by size / count with automatic fallback
42+
43+
- Queue metrics: wait time, success ratio, batch efficiency, test amplification
44+
45+
- Integrated workflow actions (label, rebase, backport, deployment gating)
46+
without extra bots
47+
48+
## Concept mapping
49+
50+
While Mergify offers more features, here is a mapping of existing GitHub Merge
51+
Queue features:
52+
53+
| GitHub Merge Queue | Mergify |
54+
| ------------------- | ------- |
55+
| Single queue per protected branch | One or more `queue_rules` with conditions |
56+
| Merge Group (= test head + base) | Batch / virtual merge reference |
57+
| Required status checks | `queue_conditions` using `check-success = <name>` |
58+
| Strict update before merge | `update_method` (merge/rebase) + automatic refresh |
59+
60+
## Minimal equivalent configuration
61+
62+
If today you rely on a protected `main` with a GitHub Merge Queue, there is no
63+
needed configuration. Mergify automatically injects your ruleset or branch
64+
protections into the queue system. Simply type [`@mergify
65+
queue`](/commands/queue) to queue a pull request.
66+
67+
This reproduces the same invariant: every PR merged only after re‑validation on
68+
the latest `main`.
69+
70+
## Batching & parallelism
71+
72+
Increase throughput by validating multiple PRs together. Start conservatively:
73+
74+
```yaml
75+
queue_rules:
76+
- name: main
77+
batch_size: 2
78+
```
79+
80+
If a batch fails, Mergify automatically reduces scope and isolates the culprit
81+
PRs without manual intervention.
82+
83+
## Priorities
84+
85+
Enable urgent hotfix merges without draining the whole queue using
86+
[priorities](/merge-queue/priority):
87+
88+
```yaml
89+
priority_rules:
90+
- name: critical
91+
conditions:
92+
- label = hotfix
93+
priority: high
94+
```
95+
96+
Apply a `hotfix` label; those PRs jump ahead while fairness is preserved.
97+
98+
## Observability & reporting
99+
100+
Mergify exposes:
101+
102+
- Queue length & wait time trends
103+
- Batch efficiency (merged PRs per CI cycle)
104+
- Flaky / slow check impact (integrates with CI Insights)
105+
- Per‑PR timeline: enqueue → validation start → merge
106+
107+
Use this data to tune batch size, break down monolithic checks, or add
108+
two‑step CI (fast + full) to shorten average cycle time.
109+
110+
## Incremental migration strategy
111+
112+
1. If needed, add the `.mergify.yml` configuration file with a `queue_rules`
113+
block (leave GitHub Merge Queue enabled)
114+
115+
2. Queue a low‑risk PR using `@mergify queue`
116+
117+
3. Compare timing & merge behavior
118+
119+
4. Disable GitHub Merge Queue once satisfied and rely solely on Mergify
120+
121+
5. Layer in batching, priorities, additional rules
122+
123+
Rollback is trivial: toggle GitHub’s native queue back on; no destructive state.
124+
125+
## FAQ
126+
127+
**Does Mergify require removing branch protections?** No. Keep them; Mergify
128+
works with them. Just avoid duplicate required contexts (same check listed in
129+
both branch protection and queue conditions is fine—no double run).
130+
131+
**Do I lose the merge squash/rebase options?** No. Configure `merge_method` per
132+
rule; you can still vary merge strategies across PR subsets.
133+
134+
**Is there vendor lock‑in?** Config is a single YAML file; removal falls back
135+
to native GitHub behavior immediately.

src/content/navItems.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ const navItems: NavItem[] = [
292292
{ title: 'Overview', path: '/migrate', icon: FaRegLightbulb },
293293
{ title: 'From Bulldozer', path: '/migrate/bulldozer', icon: TbBulldozer },
294294
{ title: 'From Bors‑NG', path: '/migrate/bors-ng', icon: BsRobot },
295+
{ title: 'From GitHub Merge Queue', path: '/migrate/github-merge-queue', icon: SiGithub },
295296
],
296297
},
297298
{ title: 'Stacks', path: '/stacks', icon: BsStack },

0 commit comments

Comments
 (0)