ci: push backports with AUTO_MERGE_TOKEN to retrigger release-branch CI#4676
Merged
Merged
Conversation
Cherry-pick pushes to release branches currently use the default GITHUB_TOKEN, which is excluded from triggering downstream workflows. Use AUTO_MERGE_TOKEN (fine-grained PAT) when present so post-merge CI runs against the backport commit on the release branch. Falls back to GITHUB_TOKEN when the secret is unset (preserves current behavior on forks without the secret). Closes apache#4673
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4676 +/- ##
============================================
+ Coverage 46.16% 46.75% +0.59%
- Complexity 1995 2068 +73
============================================
Files 1013 1013
Lines 38165 39571 +1406
Branches 3712 3852 +140
============================================
+ Hits 17618 18503 +885
- Misses 19774 20280 +506
- Partials 773 788 +15
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
aglinxinyuan
approved these changes
May 2, 2026
Yicong-Huang
added a commit
that referenced
this pull request
May 2, 2026
…CI (#4676) ## What changes were proposed in this PR? In \`.github/workflows/direct-backport-push.yml\`, the \`push-backports\` job's \`actions/checkout@v5\` step now passes \`token: \${{ secrets.AUTO_MERGE_TOKEN || secrets.GITHUB_TOKEN }}\`. The cherry-pick is then pushed to the release branch under the PAT, which retriggers workflows configured to run on push to release branches. Without this, the default \`GITHUB_TOKEN\`-authored push is silently excluded from triggering downstream workflows, so post-merge CI on backport commits never runs. Falls back to \`GITHUB_TOKEN\` when the secret is unset, preserving current behavior on forks without the secret. ## Any related issues, documentation, discussions? Closes #4673. Follow-up to #4580 (post-merge backport automation) and #4594 (CI for release branches). Uses the same \`AUTO_MERGE_TOKEN\` PAT introduced for the AutoQueue stand-in (#4553 / #4672). ## How was this PR tested? Not yet — exercises only when a PR with a backport label is merged into \`main\`. After landing and configuring the \`AUTO_MERGE_TOKEN\` repo secret, plan to: - [ ] Merge any PR carrying a backport label. - [ ] Confirm a successful \`Direct Backport Push\` run. - [ ] Confirm the resulting push on the release branch triggers the expected post-merge CI run. If \`AUTO_MERGE_TOKEN\` is not configured, the workflow falls back to \`GITHUB_TOKEN\` and behavior is unchanged. ## Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Opus 4.7 (Claude Code) Co-authored-by: Yicong Huang <yiconghuang@cs.umass.edu> (backported from commit 7811115)
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What changes were proposed in this PR?
In `.github/workflows/direct-backport-push.yml`, the `push-backports` job's `actions/checkout@v5` step now passes `token: ${{ secrets.AUTO_MERGE_TOKEN || secrets.GITHUB_TOKEN }}`. The cherry-pick is then pushed to the release branch under the PAT, which retriggers workflows configured to run on push to release branches. Without this, the default `GITHUB_TOKEN`-authored push is silently excluded from triggering downstream workflows, so post-merge CI on backport commits never runs.
Falls back to `GITHUB_TOKEN` when the secret is unset, preserving current behavior on forks without the secret.
Any related issues, documentation, discussions?
Closes #4673. Follow-up to #4580 (post-merge backport automation) and #4594 (CI for release branches). Uses the same `AUTO_MERGE_TOKEN` PAT introduced for the AutoQueue stand-in (#4553 / #4672).
How was this PR tested?
Not yet — exercises only when a PR with a backport label is merged into `main`. After landing and configuring the `AUTO_MERGE_TOKEN` repo secret, plan to:
If `AUTO_MERGE_TOKEN` is not configured, the workflow falls back to `GITHUB_TOKEN` and behavior is unchanged.
Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Opus 4.7 (Claude Code)