You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(ci): auto-detect --tests-target-branch on Buildkite, CircleCI, Jenkins (#1326)
`mergify ci junit-process` and `junit-upload` previously resolved
`--tests-target-branch` from a hard-coded list of GitHub-Actions env
vars (`GITHUB_BASE_REF`, `GITHUB_HEAD_REF`, `GITHUB_REF_NAME`,
`GITHUB_REF`). On any other CI provider the option came back empty and
click aborted with `Missing option '--tests-target-branch' / '-ttb'`,
even though the equivalent information is exposed by every supported
provider — `BUILDKITE_PULL_REQUEST_BASE_BRANCH` / `BUILDKITE_BRANCH`
on Buildkite, `CIRCLE_BRANCH` on CircleCI, `CHANGE_TARGET` /
`GIT_BRANCH` on Jenkins.
Mirror the `--repository` pattern: a new
`detector.get_tests_target_branch`
helper dispatches on `get_ci_provider()` and returns the right env var
per provider. Both options now use
`default=detector.get_tests_target_branch`
in place of the GitHub-only `envvar=[...]` list. The existing
`_process_tests_target_branch` callback still strips `refs/heads/` from
whatever value resolves, so behaviour on GitHub Actions is unchanged.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: skills/mergify-ci/SKILL.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ mergify ci junit-process \
37
37
**Key options:**
38
38
-`--token` / `-t` (env: `MERGIFY_TOKEN`) -- CI Insights application key
39
39
-`--repository` / `-r` -- Repository full name (auto-detected in GitHub Actions)
40
-
-`--tests-target-branch` / `-ttb` -- Branch used for quarantine evaluation (auto-detected from `GITHUB_BASE_REF`, `GITHUB_HEAD_REF`, `GITHUB_REF_NAME`, `GITHUB_REF`)
40
+
-`--tests-target-branch` / `-ttb` -- Branch used for quarantine evaluation. Auto-detected per CI provider: GitHub Actions (`GITHUB_BASE_REF` → `GITHUB_HEAD_REF` → `GITHUB_REF_NAME` → `GITHUB_REF`), Buildkite (`BUILDKITE_PULL_REQUEST_BASE_BRANCH` → `BUILDKITE_BRANCH`), CircleCI (`CIRCLE_BRANCH`), Jenkins (`CHANGE_TARGET` → `GIT_BRANCH`).
0 commit comments