Closed
Harden PR branch checkout against missing .git and lock in checkout: false behavior#49815
.git and lock in checkout: false behavior#49815Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix checkout: false incompatibility with PR triggers
Harden PR branch checkout against missing Aug 2, 2026
.git and lock in checkout: false behavior
Contributor
|
Hey What looks good:
This PR looks ready for review! Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "patchdiff.githubusercontent.com"See Network Configuration for more information.
|
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.
PR-triggered workflows could fail before the agent started in two cases: when the PR checkout helper ran after workspace git metadata had been removed, and when
checkout: falsewas combined with PR triggers without an explicit regression covering that path. This change hardens the helper for the first case and locks in the intended compiler behavior for the second.Runtime: recover when workspace git metadata is gone
checkout_pr_branch.cjsnow detects a missing.gitdirectory before running fetch/checkout logic.origin, and reconfigures local auth so the existing PR fetch path can proceed.Compiler regression coverage:
pull_request+checkout: falsecheckout: falsedo not emit theCheckout PR branchhelper step.Helper test coverage
.gitrecovery path.