Configuration

Validate your Mergify configuration and simulate actions before you merge.


mergify config validate #

Validate the Mergify configuration file against the schema. Check that your configuration file parses and conforms to the Mergify schema, reporting the first error with its location. Run it locally or in CI to catch mistakes before they reach the default branch. The file is auto-detected unless you pass --config-file.

mergify config validate [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

-f, --config-file <CONFIG_FILE> path

Path to the Mergify configuration file (auto-detected if not provided)

mergify config simulate #

Simulate Mergify actions on a pull request using the local configuration. Evaluate your local configuration against a real pull request and report which rules match and what actions Mergify would take — without changing anything on GitHub. Useful to test a configuration change before pushing it.

mergify config simulate [OPTIONS] <PULL_REQUEST_URL>
<PULL_REQUEST_URL> string required

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

-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

-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

-f, --config-file <CONFIG_FILE> path

Path to the Mergify configuration file (auto-detected if not provided)

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_…).

Was this page helpful?