mergepatrol

Installation
SKILL.md

Mergepatrol

Pull requests in this repo land through Mergepatrol's merge queue. Queue a PR with a label and let Mergepatrol merge it; merging by hand or pushing to the default branch races the queue.

The labels

The trigger label is label in .mergepatrol/mergepatrol.yml on the default branch, mergepatrol when the file leaves it out. Below, <label> stands for it.

  • <label> queues the PR: gh pr edit <number> --add-label <label>. Removing it leaves the queue, and cancels the PR's run.
  • <label>:priority, beside <label>, puts the PR at the front of the queue.
  • <label>:failed is set by Mergepatrol when it ejects the PR.

Over MCP

When the mergepatrol MCP server is connected, use its tools instead of the labels: queue_pull (with priority for the front of the queue), dequeue_pull, pull_status and list_queue. They change the same labels, as the GitHub user or bot the server was connected as, so everything below still holds. pull_status reads where a PR is without parsing Mergepatrol's comment. The server's other tools do what the Mergepatrol dashboard does, such as reviewing a PR or reading why the queue ejected one.

What the queue does

Mergepatrol rebases the PR onto its base branch, and may test it in a batch with other queued PRs. It resolves conflicts with an agent, runs the repo's verify commands, waits for the required checks, then merges with the repo's default merge method. When a required check fails, an agent commits a fix to the PR branch and the checks run again, a few times at most, unless fix_ci turns it off. The default branch has a queue, and so does each branch listed under branches in .mergepatrol/mergepatrol.yml: a PR, or a stack of PRs (from gh stack), joins the queue of the branch it merges into. A PR into any other branch, such as one stacked by hand on another PR's branch, is held. Retargeting a queued PR moves it to the back of the other branch's queue.

Installs
1
GitHub Stars
1
First Seen
Nov 2, 2026