Allow create_pull_request bundle transport to fall back when branch pinning is unavailable#42318
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
create_pull_request bundle transport to fall back when branch pinning is unavailable
There was a problem hiding this comment.
Pull request overview
This PR updates the create_pull_request safe-output handler to avoid aborting bundle-mode execution when local branch pinning fails, allowing existing HEAD/GITHUB_SHA-based fallback strategies in the transport layer to proceed and still produce a valid patch/bundle when possible.
Changes:
- Removed the bundle-mode hard failure path when
rev-parse refs/heads/<branch>pinning fails; now logs and continues withpinnedSha = null. - Updated existing tests to assert the post-fallback patch-generation error shape (instead of the removed preflight pinning error).
- Added a regression test ensuring bundle transport can succeed via HEAD fallback when the requested branch is missing locally.
Show a summary per file
| File | Description |
|---|---|
| actions/setup/js/safe_outputs_handlers.cjs | Allows bundle-mode create_pull_request to continue when branch pinning fails, relying on existing HEAD-based transport fallback. |
| actions/setup/js/safe_outputs_handlers.test.cjs | Adds coverage for missing-local-branch HEAD fallback and updates expectations for the new error path behavior. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Low
🔍 PR Triage — §28395315609
Score breakdown: impact 32 + urgency 18 + quality 17
|
|
@copilot All CI checks are green and the branch is clean with no merge conflicts or unresolved review threads. Please invoke the
|
PR finisher pass complete. All local checks are green:
No unresolved review threads, no conflicts, branch is up to date. CI on the agent's HEAD is unverified until a maintainer re-triggers it (close/reopen or |
The Daily Agent of the Day Blog Writer could produce a complete blog post but still report
report_incompletebecausecreate_pull_requestfailed before bundle generation. The handler required a locally pinnable branch even though the bundle generation path already supports HEAD-based fallback when that ref is absent.Problem
create_pull_requestin bundle mode aborted onrev-parse refs/heads/<branch>failure.HEADandGITHUB_SHA.Handler change
safe_outputs_handlers.cjs.Behavioral impact
create_pull_requestsafe output.Regression coverage
HEADcontains the intended commit range.