fix(ci): push hotfix cherry-picks with PAT to satisfy branch rules - #4982
Merged
Conversation
| with: | ||
| ref: main | ||
| fetch-depth: 0 | ||
| token: ${{ secrets.HOTFIX_PUSH_TOKEN }} |
Contributor
There was a problem hiding this comment.
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.
The hotfix cherry-pick workflow fails to push to
main: the defaultGITHUB_TOKENis rejected by the branch ruleset (seen with #4972), and thegithub-actionsapp cannot be added to the ruleset bypass list.Fix: push with
HOTFIX_PUSH_TOKEN(already bypasses the rules) and append[skip ci]to the cherry-picked commit so the push does not trigger builds or a release — fixes keep accumulating silently on main until the Hotfix Release workflow is run.Greptile Summary
This PR authenticates hotfix cherry-pick pushes with a PAT that can bypass the main branch rules and appends a CI skip marker so builds and releases wait for the manual hotfix release.
HOTFIX_PUSH_TOKENtoactions/checkoutso the subsequent push uses that credential.[skip ci]paragraph.Confidence Score: 3/5
This PR should not merge until the PAT-backed workflow is restricted to pull requests targeting main.
The new bypass credential turns an existing branch-agnostic pull-request workflow into a successful protected-main write path for any merged pull request carrying the hotfix label.
Files Needing Attention: .github/workflows/hotfix-cherry-pick.yml
Security Review
The bypass credential is reachable from merged, hotfix-labeled pull requests targeting any branch because the workflow does not restrict
pull_request_targettomain. A non-main merge can therefore be replayed onto protectedmainwithout main-specific review.How this was verified: The unfiltered trigger and merged-and-labeled gate feed the triggering merge commit directly into a PAT-authenticated push to
main.Reviews (1): Last reviewed commit: "fix(ci): push hotfix cherry-picks with P..." | Re-trigger Greptile