Closed
Backport #2518 to releases/v2–v6: skip unsafe PR check on default checkout#2520
Conversation
Copilot
AI
changed the title
[WIP] Backport PR 2518 to release branches v2-v6
Backport #2518 to releases/v2–v6: skip unsafe PR check on default checkout
Jul 15, 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.
Default self-checkouts (same repo, no explicit
ref) were incorrectly triggering theassertSafePrCheckoutguard onpull_request_targetevents when the event SHA matched the PR head SHA — a false positive introduced with theallow-unsafe-pr-checkoutfeature.Changes
src/input-helper.ts— WrapassertSafePrCheckoutwith anisDefaultCheckoutguard; skip the check when the caller hasn't customizedrepositoryorref:__test__/input-helper.test.ts— Two new tests: default self-checkout on forkpull_request_targetsucceeds; explicit fork repository is still refused.dist/index.js— Rebuilt artifact (v4–v6 viancc build; v2–v3 patched directly due to pre-existinguuid/v4ncc bundling incompatibility on those branches).Applied identically to five branches:
copilot/backport-2518-releases-v6,v5,v4,v3,v2— each branched from its respectivereleases/vNbase.