CI Insights
Send JUnit results and pull request scopes from any CI provider into Mergify.
Learn more: CI Insights
mergify ci scopes-send #
Send scopes tied to a pull request to Mergify. Upload the scopes affected by a pull request so CI Insights can attribute test results to them. Reads scopes from repeated --scope flags or from a file produced by "mergify ci scopes --write". Exits 0 without doing anything when no pull request can be determined.
mergify ci scopes-send [OPTIONS]
-r, --repository
<REPOSITORY>
string
Repository full name (owner/repo). Detected from the CI environment or the local git remote when omitted
-p, --pull-request
<PULL_REQUEST>
string
Pull request number. Falls back to GITHUB_EVENT_PATH (reads .pull_request.number). When neither is available the command prints a skip message and exits 0
-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
-s, --scope
<SCOPE>
string
Scope to upload (repeatable)
--scopes-json
<SCOPES_JSON>
path
JSON file containing scopes to upload (output of mergify ci scopes --write)
--scopes-file
<SCOPES_FILE>
path
Plain-text file with one scope per line
-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
mergify ci git-refs #
Print the base/head git references for the current build. Detect and print the base and head git references for the build from the CI environment, as plain text, eval-friendly shell lines, or JSON. Useful for wiring later steps to the same refs Mergify computed.
mergify ci git-refs [OPTIONS]
--format
<FORMAT>
string
Output format: text (default), shell for eval-friendly MERGIFY_GIT_REFS_* lines, or json for a single JSON object
-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
mergify ci queue-info #
Print the current build's merge queue batch metadata (from the Mergify git note). Read the Mergify git note attached to the current HEAD and print the merge queue batch the build belongs to. Needs only plain git and no token, so it works in any CI runner.
mergify ci queue-info [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
mergify ci scopes #
Give the list of scopes impacted by changed files. Compute the configured scopes impacted by the files changed between two git references, using your Mergify configuration. Print them, or write them to a file with --write for a later "mergify ci scopes-send".
mergify ci scopes [OPTIONS]
--config
<CONFIG>
path
Path to YAML config file. Falls back to the MERGIFY_CONFIG_PATH env var, then auto-detects .mergify.yml, .mergify/config.yml, or .github/mergify.yml
--base
<BASE>
string
Base git reference to use to look for changed files
--head
<HEAD>
string
Head git reference to use to look for changed files
-w, --write
<WRITE>
path
Write the detected scopes to a file (JSON, consumed by ci scopes-send --scopes-json)
-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
mergify ci junit-process #
Upload JUnit XML reports and ignore failed tests with Mergify's CI Insights Quarantine. Parse one or more JUnit XML reports, upload the results to CI Insights, and reconcile them against the quarantine so known-flaky tests don't fail the build. Accepts file paths or glob patterns; pass the runner's exit code with --test-exit-code to detect silent failures.
mergify ci junit-process [OPTIONS] <FILE>...
<FILE>...
string
required
repeatable
JUnit XML files or glob patterns (e.g. reports/**/*.xml). At least one path or pattern is required
-u, --api-url
<API_URL>
string
Mergify API URL. Falls back to MERGIFY_API_URL env var, then to the default (https://api.mergify.com)
-t, --token
<TOKEN>
string
CI Issues application key. Falls back to MERGIFY_TOKEN
-r, --repository
<REPOSITORY>
string
Repository full name (owner/repo). Detected from the CI environment or the local git remote when omitted
--test-framework
<TEST_FRAMEWORK>
string
Test framework label (e.g. pytest). Optional; passed as a span attribute
--test-language
<TEST_LANGUAGE>
string
Test language label (e.g. python). Optional; passed as a span attribute
-b, --tests-target-branch
<TESTS_TARGET_BRANCH>
string
Branch the quarantine API should look up tests on. Defaults to the PR base branch, or the head branch as a fallback
-e, --test-exit-code
<TEST_EXIT_CODE>
string
Exit code of the test runner. When this is non-zero but no failures appear in the JUnit report, the run is flagged as a silent failure. Falls back to MERGIFY_TEST_EXIT_CODE
-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
mergify ci junit-upload deprecated #
Upload JUnit XML reports (deprecated: use junit-process). Deprecated alias for junit-process, kept for backward compatibility. It runs the same processing and prints a deprecation warning; use junit-process instead.
mergify ci junit-upload [OPTIONS] <FILE>...
<FILE>...
string
required
repeatable
JUnit XML files or glob patterns (e.g. reports/**/*.xml). At least one path or pattern is required
-u, --api-url
<API_URL>
string
Mergify API URL. Falls back to MERGIFY_API_URL env var, then to the default (https://api.mergify.com)
-t, --token
<TOKEN>
string
CI Issues application key. Falls back to MERGIFY_TOKEN
-r, --repository
<REPOSITORY>
string
Repository full name (owner/repo). Detected from the CI environment or the local git remote when omitted
--test-framework
<TEST_FRAMEWORK>
string
Test framework label (e.g. pytest). Optional; passed as a span attribute
--test-language
<TEST_LANGUAGE>
string
Test language label (e.g. python). Optional; passed as a span attribute
-b, --tests-target-branch
<TESTS_TARGET_BRANCH>
string
Branch the quarantine API should look up tests on. Defaults to the PR base branch, or the head branch as a fallback
-e, --test-exit-code
<TEST_EXIT_CODE>
string
Exit code of the test runner. When this is non-zero but no failures appear in the JUnit report, the run is flagged as a silent failure. Falls back to MERGIFY_TEST_EXIT_CODE
-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
Was this page helpful?
Thanks for your feedback!