fix(copilot): robust diff computation for cloud agent environments#709
Open
anakrish wants to merge 1 commit intomicrosoft:mainfrom
Open
fix(copilot): robust diff computation for cloud agent environments#709anakrish wants to merge 1 commit intomicrosoft:mainfrom
anakrish wants to merge 1 commit intomicrosoft:mainfrom
Conversation
f558f0f to
b3cc8ab
Compare
The cloud agent checks out a branch like copilot/review-pr-NNN which may not have upstream/main or origin/main refs available for merge-base. Changes: - Use gh pr diff as primary method (always works in PR context) - Fall back to git merge-base for local non-PR usage - Remove path filters (*.rs *.toml examples/) — review full diff - Remove head -2000 truncation — let agents see everything - Explicitly fetch origin/main in copilot-setup-steps.yml as backup Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Fixes skill execution failure in cloud agent environments where
upstream/mainandorigin/mainrefs aren't available forgit merge-base.Problem
The cloud agent checks out a branch like
copilot/review-pr-NNNwhich may not have the expected remote refs, causing the diff step to fail with "Cannot find upstream/main or origin/main."Fix
main(local ref) as third fallback in merge-base resolutiongh pr diffas final fallback when no merge-base is foundorigin/mainincopilot-setup-steps.yml