Handle bundle ref mismatch in create_pull_request safe output#31955
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix create_pull_request safe output handler for branch ref mismatch
Handle bundle ref mismatch in May 13, 2026
create_pull_request safe output
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes create_pull_request bundle application when the expected refs/heads/<jsonl-branch> ref is not present inside the bundle by adding a fallback that resolves the source ref via git bundle list-heads and retries the fetch.
Changes:
- Update bundle fetch logic to retry with a resolved
refs/heads/*ref fromgit bundle list-headswhen the initial fetch fails. - Add a unit test covering the “bundle ref mismatch” fallback path.
- Regenerate/update
daily-architecture-diagram.lock.ymlwith broader workflow/runtime changes.
Show a summary per file
| File | Description |
|---|---|
| actions/setup/js/create_pull_request.cjs | Adds fallback ref resolution using git bundle list-heads and updates user-facing fetch guidance to use the resolved full ref. |
| actions/setup/js/create_pull_request.test.cjs | Adds a test verifying fetch retry with the single refs/heads/* ref discovered from the bundle. |
| .github/workflows/daily-architecture-diagram.lock.yml | Large lockfile/workflow regeneration unrelated to the bundle ref fix (see inline comment). |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 3/3 changed files
- Comments generated: 1
Comment on lines
+105
to
+114
| - name: Checkout actions folder | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| repository: github/gh-aw | ||
| sparse-checkout: | | ||
| actions | ||
| persist-credentials: false | ||
| - name: Setup Scripts | ||
| id: setup | ||
| uses: github/gh-aw-actions/setup@v0.72.1 | ||
| uses: ./actions/setup |
Collaborator
|
@copilot review all comments |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
Reviewed all comments and addressed the actionable scope issue by reverting the unrelated lockfile/runtime churn in commit |
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.
Bug Fix
create_pull_requestbundle apply assumed the bundle always containedrefs/heads/<jsonl-branch>. When branch sanitization/salting changed the runtime branch name (or the bundle used a different internal ref),git fetchfailed even though the bundle was valid.What was the bug?
The handler fetched a single expected ref from the bundle and failed hard on mismatch:
How did you fix it?
refs/heads/<branch>source ref.git bundle list-heads <bundle>refs/heads/*entriesExample