Merge Queue

Pause, unpause, and inspect the merge queue from scripts and incident runbooks.


mergify queue pause #

Pause the merge queue for the repository. Stop the queue from merging any pull request until it is resumed — useful during an incident or release window. A reason is required and shown to your team; queued pull requests stay in place.

mergify queue pause [OPTIONS] --reason <REASON>
--reason <REASON> string required

Reason for pausing the queue (max 255 characters)

--yes-i-am-sure flag

Skip the confirmation prompt. Required in non-interactive sessions

-v, --verbose flag

Increase log verbosity: -v info, -vv debug, -vvv trace. Logs go to stderr so stdout stays clean for piping. RUST_LOG overrides this

--debug flag

Shorthand for at least debug-level logging (like -vv)

--color <COLOR> auto | always | never

When to use color in terminal output

Values: auto always never

Default: auto

-t, --token <TOKEN> string

Mergify token. Falls back to MERGIFY_TOKEN, then the credential mergify auth login stored for this API URL

-u, --api-url <API_URL> string

Mergify API URL. Falls back to MERGIFY_API_URL env var, then to the default

-r, --repository <REPOSITORY> string

Repository full name (owner/repo). Falls back to GITHUB_REPOSITORY env var

MERGIFY_API_URL

Base URL of the Mergify API. An API URL given on the command line or in a reporter's configuration takes precedence.

Default: https://api.mergify.com

MERGIFY_TOKEN

The Mergify credential: an application key in CI. Without it the test reporters upload nothing. A mergify command takes it when --token is not given, over the credential mergify auth login stored, and mergify auth tells when it does. The mergify stack commands send it to GitHub as their GitHub token, ahead of GITHUB_TOKEN, unless it holds a Mergify user token (mut_…).

mergify queue unpause #

Unpause the merge queue for the repository. Resume merging after a pause. The queue picks up where it left off with the pull requests still queued.

mergify queue unpause [OPTIONS]
-v, --verbose flag

Increase log verbosity: -v info, -vv debug, -vvv trace. Logs go to stderr so stdout stays clean for piping. RUST_LOG overrides this

--debug flag

Shorthand for at least debug-level logging (like -vv)

--color <COLOR> auto | always | never

When to use color in terminal output

Values: auto always never

Default: auto

-t, --token <TOKEN> string

Mergify token. Falls back to MERGIFY_TOKEN, then the credential mergify auth login stored for this API URL

-u, --api-url <API_URL> string

Mergify API URL. Falls back to MERGIFY_API_URL env var, then to the default

-r, --repository <REPOSITORY> string

Repository full name (owner/repo). Falls back to GITHUB_REPOSITORY env var

MERGIFY_API_URL

Base URL of the Mergify API. An API URL given on the command line or in a reporter's configuration takes precedence.

Default: https://api.mergify.com

MERGIFY_TOKEN

The Mergify credential: an application key in CI. Without it the test reporters upload nothing. A mergify command takes it when --token is not given, over the credential mergify auth login stored, and mergify auth tells when it does. The mergify stack commands send it to GitHub as their GitHub token, ahead of GITHUB_TOKEN, unless it holds a Mergify user token (mut_…).

mergify queue status #

Show merge queue status for the repository. List the pull requests currently in the queue with their position and state. Filter by branch with --branch, or pass --json for machine-readable output.

mergify queue status [OPTIONS]
-b, --branch <BRANCH> string

Filter the queue by branch name

--json flag

Emit the raw API response as a single JSON document

-v, --verbose flag

Increase log verbosity: -v info, -vv debug, -vvv trace. Logs go to stderr so stdout stays clean for piping. RUST_LOG overrides this

--debug flag

Shorthand for at least debug-level logging (like -vv)

--color <COLOR> auto | always | never

When to use color in terminal output

Values: auto always never

Default: auto

-t, --token <TOKEN> string

Mergify token. Falls back to MERGIFY_TOKEN, then the credential mergify auth login stored for this API URL

-u, --api-url <API_URL> string

Mergify API URL. Falls back to MERGIFY_API_URL env var, then to the default

-r, --repository <REPOSITORY> string

Repository full name (owner/repo). Falls back to GITHUB_REPOSITORY env var

MERGIFY_API_URL

Base URL of the Mergify API. An API URL given on the command line or in a reporter's configuration takes precedence.

Default: https://api.mergify.com

MERGIFY_TOKEN

The Mergify credential: an application key in CI. Without it the test reporters upload nothing. A mergify command takes it when --token is not given, over the credential mergify auth login stored, and mergify auth tells when it does. The mergify stack commands send it to GitHub as their GitHub token, ahead of GITHUB_TOKEN, unless it holds a Mergify user token (mut_…).

mergify queue show #

Show detailed state of a pull request in the merge queue. Report the full queue state of a single pull request: its checks, the conditions it still needs to satisfy, and why it is or isn't mergeable. Pass --verbose for the full checks table and conditions tree, or --json for the raw response.

mergify queue show [OPTIONS] <PR_NUMBER>
<PR_NUMBER> string required

Pull request number to inspect

--json flag

Emit the raw API response as a single JSON document

-v, --verbose flag

Increase log verbosity: -v info, -vv debug, -vvv trace. Logs go to stderr so stdout stays clean for piping. RUST_LOG overrides this

--debug flag

Shorthand for at least debug-level logging (like -vv)

--color <COLOR> auto | always | never

When to use color in terminal output

Values: auto always never

Default: auto

-t, --token <TOKEN> string

Mergify token. Falls back to MERGIFY_TOKEN, then the credential mergify auth login stored for this API URL

-u, --api-url <API_URL> string

Mergify API URL. Falls back to MERGIFY_API_URL env var, then to the default

-r, --repository <REPOSITORY> string

Repository full name (owner/repo). Falls back to GITHUB_REPOSITORY env var

MERGIFY_API_URL

Base URL of the Mergify API. An API URL given on the command line or in a reporter's configuration takes precedence.

Default: https://api.mergify.com

MERGIFY_TOKEN

The Mergify credential: an application key in CI. Without it the test reporters upload nothing. A mergify command takes it when --token is not given, over the credential mergify auth login stored, and mergify auth tells when it does. The mergify stack commands send it to GitHub as their GitHub token, ahead of GITHUB_TOKEN, unless it holds a Mergify user token (mut_…).

mergify queue add #

Add a pull request to the merge queue. Ask Mergify to queue the pull request, as the queue command does: it enters the merge queue once it meets the queue conditions of a queue rule. Pass a pull request number, or a pull request URL, which names the repository too. A refusal is reported by its error code (e.g. PULL_REQUEST_ALREADY_QUEUED) with exit code 6.

mergify queue add [OPTIONS] <PULL_REQUEST>
<PULL_REQUEST> string required

Pull request number, or pull request URL (e.g. <https://github.com/owner/repo/pull/123>)

--json flag

Emit the outcome, or the refusal, as a single JSON document

-v, --verbose flag

Increase log verbosity: -v info, -vv debug, -vvv trace. Logs go to stderr so stdout stays clean for piping. RUST_LOG overrides this

--debug flag

Shorthand for at least debug-level logging (like -vv)

--color <COLOR> auto | always | never

When to use color in terminal output

Values: auto always never

Default: auto

-t, --token <TOKEN> string

Mergify token. Falls back to MERGIFY_TOKEN, then the credential mergify auth login stored for this API URL

-u, --api-url <API_URL> string

Mergify API URL. Falls back to MERGIFY_API_URL env var, then to the default

-r, --repository <REPOSITORY> string

Repository full name (owner/repo). Falls back to GITHUB_REPOSITORY env var

mergify queue remove #

Remove a pull request from the merge queue. Take the pull request out of the merge queue, or cancel its queue request while it waits for its queue conditions, as the dequeue command does. Pass a pull request number or URL. A refusal is reported by its error code (e.g. PULL_REQUEST_NOT_QUEUED) with exit code 6.

mergify queue remove [OPTIONS] <PULL_REQUEST>
<PULL_REQUEST> string required

Pull request number, or pull request URL (e.g. <https://github.com/owner/repo/pull/123>)

--json flag

Emit the outcome, or the refusal, as a single JSON document

-v, --verbose flag

Increase log verbosity: -v info, -vv debug, -vvv trace. Logs go to stderr so stdout stays clean for piping. RUST_LOG overrides this

--debug flag

Shorthand for at least debug-level logging (like -vv)

--color <COLOR> auto | always | never

When to use color in terminal output

Values: auto always never

Default: auto

-t, --token <TOKEN> string

Mergify token. Falls back to MERGIFY_TOKEN, then the credential mergify auth login stored for this API URL

-u, --api-url <API_URL> string

Mergify API URL. Falls back to MERGIFY_API_URL env var, then to the default

-r, --repository <REPOSITORY> string

Repository full name (owner/repo). Falls back to GITHUB_REPOSITORY env var

Was this page helpful?