In repository Settings > Branches, add or edit the branch protection rule for your default branch and enable 'Require merge queue'
Under merge queue settings, choose the merge method (merge commit, squash, or rebase), set minimum and maximum group sizes (1–100 PRs), and configure the status check timeout
Update CI workflows to add the merge_group event trigger alongside pull_request: on: [pull_request, merge_group] — without this, required status checks will never pass for queued PRs
If you use rulesets instead of classic branch protection, add a 'Require merge queue' rule in the repository or organization ruleset targeting the default branch
When a PR is ready, click 'Merge when ready' (or use the squash/merge queue API); the PR enters the queue and is batched with other ready PRs for a shared CI run before merge
Monitor queue activity in the Pull requests > Merge queue tab; stuck items usually indicate a timed-out status check or a merge conflict introduced by queue ordering
Known gotchas
Merge queues cannot be enabled on branch protection rules that use wildcard patterns (e.g., release/*) in the branch name — create an exact-name rule for the branch instead
The merge_group event is distinct from pull_request; a workflow that only listens to pull_request will not run for queued PRs, leaving the required check perpetually pending
Status check timeout is set per merge queue configuration; if CI regularly takes longer than the timeout, queued PRs will be ejected and must be re-added, disrupting throughput
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp