Pin cherry-pick workflow checkout to main - #157
Merged
Conversation
For pull_request events, actions/checkout defaults to the PR head ref. PRs branched off main before .github/scripts/upsert-sticky-comment.js landed will have a working tree missing that script, so node fails with MODULE_NOT_FOUND when the workflow tries to invoke it. Pin both cherry-pick-patch.yml and report-cherry-pick-tests.yml to ref: main so the helper script is always present. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
|
Reviewed; no blockers found. |
This was referenced May 18, 2026
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.
Summary
Follow-up to #151. The cherry-pick workflow fails on PRs that branched off
mainbefore the helper script.github/scripts/upsert-sticky-comment.jslanded:For
pull_requestevents,actions/checkoutdefaults to the PR head ref. If the PR predates the helper script on main, the working tree is missing the script and node bails out.Fix
Pin
actions/checkouttoref: mainin bothcherry-pick-patch.ymlandreport-cherry-pick-tests.yml. The workflow doesn't need the PR's working tree — it operates on git refs explicitly fetched, so checking outmainis correct.Review focus
One file each — two trivial diffs. Worth confirming we're comfortable always running the workflow logic from main; that means a PR that updates the workflow itself won't see its own changes tested via the label trigger (use
workflow_dispatchfrom the branch for that).🤖 Generated by Claude Opus 4.7 (1M context).