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 or GitHub token. Falls back to MERGIFY_TOKEN and then GITHUB_TOKEN env vars

-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)

Was this page helpful?