Test Health

Look up test health by name and manage the flaky-test quarantine.


mergify tests show #

Look up tests by name and print their health and metrics. Search Test Engine for one or more tests (by exact name or glob) and report their flakiness, failure rate, and recent history. Pass --json for machine-readable output.

mergify tests show [OPTIONS] <NAME>...
<NAME>... string required repeatable

Test name(s) to look up. Glob patterns (*, ?) are supported by the API

-r, --repository <REPOSITORY> string

Repository full name (owner/repo). Detected from the CI environment or the local git remote when omitted

-t, --token <TOKEN> string

Mergify token. Falls back to MERGIFY_TOKEN, then the credential mergify auth login stored for this API URL, then, in a GitHub Actions job granted id-token: write, the token its ID token is exchanged for, holding what the organization's trust policies grant the job. Needs a user credential with read access to the repository, or an application key with Tests at Read (tests: read): a CI key is answered with 403

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

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

--pipeline-name <PIPELINE_NAME> string

Restrict matches to the given pipeline name(s)

--pipeline-name-exclude <PIPELINE_NAME_EXCLUDE> string

Exclude matches from the given pipeline name(s)

--job-name <JOB_NAME> string

Restrict matches to the given job name(s)

--job-name-exclude <JOB_NAME_EXCLUDE> string

Exclude matches from the given job name(s)

--per-page <PER_PAGE> string

Maximum number of identities the search endpoint may return per page (1–100, server default is 10)

--json flag

Emit a single JSON document to stdout instead of human prose

-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

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. A GitHub Actions job granted id-token: write needs none: without it, the test reporters and the mergify commands that call Mergify's API exchange the job's ID token for a Mergify token holding what the trust policies of the organization that allow the job grant, a command outside mergify ci only when mergify auth login stored no credential either. Without either, 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 tests runs #

List a commit's test runs, by the job they arrived under. List the test runs Mergify received for a commit, one line per job name they arrived under: how many arrived whole, from which framework, through a plugin or a converted report. Compare with the jobs your CI runs: a job missing here sent nothing Mergify received. Reads the commit under test by default, or the one --sha, --pr or --branch names.

mergify tests runs [OPTIONS]
-r, --repository <REPOSITORY> string

Repository full name (owner/repo). Detected from the CI environment or the local git remote when omitted

--sha <SHA> string

Full SHA of the commit to read. Defaults to the commit under test: in CI, the one test results are uploaded for; elsewhere, HEAD

--pr <NUMBER> string

Read the head commit of this pull request, as the origin remote has it

--branch <BRANCH> string

Read the commit this branch points to on the origin remote

-t, --token <TOKEN> string

Mergify token. Falls back to MERGIFY_TOKEN, then the credential mergify auth login stored for this API URL, then, in a GitHub Actions job granted id-token: write, the token its ID token is exchanged for, holding what the organization's trust policies grant the job. A user credential or any application key, ci included

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

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

--json flag

Emit a single JSON document to stdout instead of human prose

-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

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. A GitHub Actions job granted id-token: write needs none: without it, the test reporters and the mergify commands that call Mergify's API exchange the job's ID token for a Mergify token holding what the trust policies of the organization that allow the job grant, a command outside mergify ci only when mergify auth login stored no credential either. Without either, 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 tests quarantines add #

Add a test to the Test Engine quarantine. Quarantine a test by its fully qualified name so its failures stop blocking the merge queue. A reason is required; scope it with --branch-name, --pipeline-name and --job-name, or quarantine everywhere by default. Link the issue tracking the fix with --issue-url.

mergify tests quarantines add [OPTIONS] --reason <REASON> <NAME>
<NAME> string required

Fully qualified name of the test to quarantine

-r, --repository <REPOSITORY> string

Repository full name (owner/repo). Detected from the CI environment or the local git remote when omitted

--reason <REASON> string required

Reason recorded for quarantining the test

--branch-name <BRANCH_NAME> string

Branch to scope the quarantine to. Omit to quarantine on all branches

--issue-url <ISSUE_URL> string

Link to where the fix of the test is tracked, such as an issue in your issue tracker. Must be an http or https URL

--pipeline-name <PIPELINE_NAME> string

Pipeline to scope the quarantine to. Omit to quarantine in all pipelines

--job-name <JOB_NAME> string

Job to scope the quarantine to. Omit to quarantine in all jobs

--unquarantine-when-healthy flag

Unquarantine the test automatically once it's healthy again, when Mergify no longer detects it as flaky or broken. Omit to keep it quarantined until it is removed

-t, --token <TOKEN> string

Mergify token. Falls back to MERGIFY_TOKEN, then the credential mergify auth login stored for this API URL, then, in a GitHub Actions job granted id-token: write, the token its ID token is exchanged for, holding what the organization's trust policies grant the job. Needs a user credential with write access to the repository, or an application key with Quarantines at Read & write (quarantines: write): a CI key is answered with 403

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

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

--json flag

Emit a single JSON document to stdout instead of human prose

-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

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. A GitHub Actions job granted id-token: write needs none: without it, the test reporters and the mergify commands that call Mergify's API exchange the job's ID token for a Mergify token holding what the trust policies of the organization that allow the job grant, a command outside mergify ci only when mergify auth login stored no credential either. Without either, 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 tests quarantines remove #

Remove a test from the Test Engine quarantine. Take a test out of the quarantine so its results count again. Identify it by test name or by quarantine id.

mergify tests quarantines remove [OPTIONS] <NAME_OR_ID>
<NAME_OR_ID> string required

Test to remove from quarantine: either its fully qualified name or the quarantine id (as printed by tests quarantines add). A name quarantined in several scopes is refused: pass the id

-r, --repository <REPOSITORY> string

Repository full name (owner/repo). Detected from the CI environment or the local git remote when omitted

-t, --token <TOKEN> string

Mergify token. Falls back to MERGIFY_TOKEN, then the credential mergify auth login stored for this API URL, then, in a GitHub Actions job granted id-token: write, the token its ID token is exchanged for, holding what the organization's trust policies grant the job. Needs a user credential with write access to the repository, or an application key with Quarantines at Read & write (quarantines: write): a CI key is answered with 403

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

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

--json flag

Emit a single JSON document to stdout instead of human prose

-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

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. A GitHub Actions job granted id-token: write needs none: without it, the test reporters and the mergify commands that call Mergify's API exchange the job's ID token for a Mergify token holding what the trust policies of the organization that allow the job grant, a command outside mergify ci only when mergify auth login stored no credential either. Without either, 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 tests quarantines get #

Print a single quarantine by test name or id. Show the details of one quarantined test — its reason, branch, pipeline and job scope, and when it was added. Identify it by test name or by quarantine id.

mergify tests quarantines get [OPTIONS] <NAME_OR_ID>
<NAME_OR_ID> string required

Quarantine to print: either the test's fully qualified name or the quarantine id (as printed by tests quarantines add). A name quarantined in several scopes is refused: pass the id

-r, --repository <REPOSITORY> string

Repository full name (owner/repo). Detected from the CI environment or the local git remote when omitted

-t, --token <TOKEN> string

Mergify token. Falls back to MERGIFY_TOKEN, then the credential mergify auth login stored for this API URL, then, in a GitHub Actions job granted id-token: write, the token its ID token is exchanged for, holding what the organization's trust policies grant the job

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

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

--json flag

Emit a single JSON document to stdout instead of human prose

-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

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. A GitHub Actions job granted id-token: write needs none: without it, the test reporters and the mergify commands that call Mergify's API exchange the job's ID token for a Mergify token holding what the trust policies of the organization that allow the job grant, a command outside mergify ci only when mergify auth login stored no credential either. Without either, 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 tests quarantines list #

List the tests currently in the Test Engine quarantine. Print every test currently held in the quarantine for the repository. Pass --json for machine-readable output.

mergify tests quarantines list [OPTIONS]
-r, --repository <REPOSITORY> string

Repository full name (owner/repo). Detected from the CI environment or the local git remote when omitted

-t, --token <TOKEN> string

Mergify token. Falls back to MERGIFY_TOKEN, then the credential mergify auth login stored for this API URL, then, in a GitHub Actions job granted id-token: write, the token its ID token is exchanged for, holding what the organization's trust policies grant the job

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

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

--json flag

Emit a single JSON document to stdout instead of human prose

-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

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. A GitHub Actions job granted id-token: write needs none: without it, the test reporters and the mergify commands that call Mergify's API exchange the job's ID token for a Mergify token holding what the trust policies of the organization that allow the job grant, a command outside mergify ci only when mergify auth login stored no credential either. Without either, 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 tests retry show #

Say whether test retry is on, and with which settings. On, it prints the Retry Budget and the Retries per Test, each marked as chosen or the default, and who changed them last. Off, it prints the defaults turning it on starts from.

mergify tests retry show [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

-r, --repository <REPOSITORY> string

Repository full name (owner/repo). Detected from the CI environment or the local git remote when omitted

-t, --token <TOKEN> string

Mergify token. Falls back to MERGIFY_TOKEN, then the credential mergify auth login stored for this API URL, then, in a GitHub Actions job granted id-token: write, the token its ID token is exchanged for, holding what the organization's trust policies grant the job. Needs a user credential with write access to the repository (read access for show), or an application key with Test Retry Settings at Read & write (test_retry_settings: write; read is enough for show): a CI key is answered with 403

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

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

--json flag

Emit a single JSON document to stdout instead of human prose: {"enabled": true, "configuration": …} or {"enabled": false, "defaults": …}, as Mergify answered them

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. A GitHub Actions job granted id-token: write needs none: without it, the test reporters and the mergify commands that call Mergify's API exchange the job's ID token for a Mergify token holding what the trust policies of the organization that allow the job grant, a command outside mergify ci only when mergify auth login stored no credential either. Without either, 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 tests retry on #

Turn test retry on, or change its settings. A setting left out keeps its value: the default when test retry was off.

mergify tests retry on [OPTIONS]
--retry-budget <PERCENT> string

The Retry Budget: the extra time a job may spend on retries, as a percentage of its tests' usual duration, written with its %, such as 5%: --json gives it as a ratio, 0.05

--retries-per-test <N> string

The Retries per Test: how many times one failing test may run again

-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

-r, --repository <REPOSITORY> string

Repository full name (owner/repo). Detected from the CI environment or the local git remote when omitted

-t, --token <TOKEN> string

Mergify token. Falls back to MERGIFY_TOKEN, then the credential mergify auth login stored for this API URL, then, in a GitHub Actions job granted id-token: write, the token its ID token is exchanged for, holding what the organization's trust policies grant the job. Needs a user credential with write access to the repository (read access for show), or an application key with Test Retry Settings at Read & write (test_retry_settings: write; read is enough for show): a CI key is answered with 403

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

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

--json flag

Emit a single JSON document to stdout instead of human prose: {"enabled": true, "configuration": …} or {"enabled": false, "defaults": …}, as Mergify answered them

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. A GitHub Actions job granted id-token: write needs none: without it, the test reporters and the mergify commands that call Mergify's API exchange the job's ID token for a Mergify token holding what the trust policies of the organization that allow the job grant, a command outside mergify ci only when mergify auth login stored no credential either. Without either, 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 tests retry set #

Change the settings of test retry while it is on. Never turns it on: on does, and takes the same options. default puts Mergify's value of a setting back.

mergify tests retry set [OPTIONS] <--retry-budget <PERCENT|default>|--retries-per-test <N|default>>
--retry-budget <PERCENT|default> string

The Retry Budget: the extra time a job may spend on retries, as a percentage of its tests' usual duration, written with its %, such as 5%: --json gives it as a ratio, 0.05

--retries-per-test <N|default> string

The Retries per Test: how many times one failing test may run again

-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

-r, --repository <REPOSITORY> string

Repository full name (owner/repo). Detected from the CI environment or the local git remote when omitted

-t, --token <TOKEN> string

Mergify token. Falls back to MERGIFY_TOKEN, then the credential mergify auth login stored for this API URL, then, in a GitHub Actions job granted id-token: write, the token its ID token is exchanged for, holding what the organization's trust policies grant the job. Needs a user credential with write access to the repository (read access for show), or an application key with Test Retry Settings at Read & write (test_retry_settings: write; read is enough for show): a CI key is answered with 403

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

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

--json flag

Emit a single JSON document to stdout instead of human prose: {"enabled": true, "configuration": …} or {"enabled": false, "defaults": …}, as Mergify answered them

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. A GitHub Actions job granted id-token: write needs none: without it, the test reporters and the mergify commands that call Mergify's API exchange the job's ID token for a Mergify token holding what the trust policies of the organization that allow the job grant, a command outside mergify ci only when mergify auth login stored no credential either. Without either, 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 tests retry off #

Turn test retry off. Its settings are forgotten: turning it on again starts from the defaults.

mergify tests retry off [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

-r, --repository <REPOSITORY> string

Repository full name (owner/repo). Detected from the CI environment or the local git remote when omitted

-t, --token <TOKEN> string

Mergify token. Falls back to MERGIFY_TOKEN, then the credential mergify auth login stored for this API URL, then, in a GitHub Actions job granted id-token: write, the token its ID token is exchanged for, holding what the organization's trust policies grant the job. Needs a user credential with write access to the repository (read access for show), or an application key with Test Retry Settings at Read & write (test_retry_settings: write; read is enough for show): a CI key is answered with 403

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

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

--json flag

Emit a single JSON document to stdout instead of human prose: {"enabled": true, "configuration": …} or {"enabled": false, "defaults": …}, as Mergify answered them

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. A GitHub Actions job granted id-token: write needs none: without it, the test reporters and the mergify commands that call Mergify's API exchange the job's ID token for a Mergify token holding what the trust policies of the organization that allow the job grant, a command outside mergify ci only when mergify auth login stored no credential either. Without either, 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?