CI Insights

Send JUnit results and pull request scopes from any CI provider into Mergify.


mergify ci scopes-send #

Send scopes tied to a pull request to Mergify

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

--debug flag

Enable verbose debug logging. Mirrors the Python CLI's top-level --debug flag so the same invocations work against either binary; native commands accept it as a no-op today (no native code path consults it yet), shimmed ones re-inject it into the forwarded argv so the Python side can honor it

mergify ci git-refs #

Print the base/head git references for the current build

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

Default: text

--debug flag

Enable verbose debug logging. Mirrors the Python CLI's top-level --debug flag so the same invocations work against either binary; native commands accept it as a no-op today (no native code path consults it yet), shimmed ones re-inject it into the forwarded argv so the Python side can honor it

mergify ci queue-info #

Print the current build's merge queue batch metadata (from the Mergify git note)

mergify ci queue-info [OPTIONS]
--debug flag

Enable verbose debug logging. Mirrors the Python CLI's top-level --debug flag so the same invocations work against either binary; native commands accept it as a no-op today (no native code path consults it yet), shimmed ones re-inject it into the forwarded argv so the Python side can honor it

mergify ci scopes #

Give the list of scopes impacted by changed files

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)

--debug flag

Enable verbose debug logging. Mirrors the Python CLI's top-level --debug flag so the same invocations work against either binary; native commands accept it as a no-op today (no native code path consults it yet), shimmed ones re-inject it into the forwarded argv so the Python side can honor it

mergify ci junit-process #

Upload JUnit XML reports and ignore failed tests with Mergify's CI Insights Quarantine

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

--debug flag

Enable verbose debug logging. Mirrors the Python CLI's top-level --debug flag so the same invocations work against either binary; native commands accept it as a no-op today (no native code path consults it yet), shimmed ones re-inject it into the forwarded argv so the Python side can honor it

mergify ci junit-upload deprecated #

Deprecated — use mergify ci junit-process instead.

Upload JUnit XML reports (deprecated: use junit-process)

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

--debug flag

Enable verbose debug logging. Mirrors the Python CLI's top-level --debug flag so the same invocations work against either binary; native commands accept it as a no-op today (no native code path consults it yet), shimmed ones re-inject it into the forwarded argv so the Python side can honor it

Was this page helpful?