Repository navigation
feat(web): change an open pull request's base branch (E3) - #386
Merged
Merged
Conversation
Maintainers and writers get a pencil next to the base branch in the PR header. It picks another branch of the repo (never the current base or the PR's own source branch) and records one retarget event after the usual confirm with its cost, as dg pr edit --base does. Merges already follow the newest retarget. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 44 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The branch is read again before signing, as dg does, so a branch deleted since the page loaded is refused. The picker lists branches in the shared order (default branch first), submits what the select shows when a refresh removes the pick, moves focus into the picker and back to the pencil, and closes on Escape. The control follows the page's member gate. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts: # forge-web/components/repo/pull-content.tsx
# Conflicts: # forge-web/components/repo/pull-content.tsx
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.
What
Maintainers and writers can change an open pull request's base branch in the web, as
dg pr edit --basealready does. A pencil next to the base branch in the PR header ("wants to merge into main ✎") opens a picker of the repo's other branches. The pick goes through the usual confirm with its cost and records one retarget event.Why
A PR opened against the wrong branch, or one whose stacked base merged, had to be retargeted from the command line. GitHub does it from the PR header. Merges in both clients already follow the newest retarget, so this was the missing piece for retargeting end to end.
How
components/repo/edit-base.tsx. It offers every branch of the repo now except the current base and the PR's own source branch, the same checksdgmakes before it signs. It renders nothing when there's no other branch.dgdoes, so a branch deleted since the page loaded is refused. The picker lists branches in the shared order, with the default branch first. If a refresh removes the pick, it submits what the select shows. Focus moves into the picker and back to the pencil, and Escape closes it.pull-content.tsx, aretargetpending write posts event kind 8 with the branch, previews its cost, confirms ("Change the base of PR feat(mint-identity): mint funded identities on devnet moutai (PV14) #5 to dev"), and waits for the fold to show the new base. It is shown only for an open PR to a viewer whose role can retarget (canRetarget: maintainers and writers), outside archived repos. Signing blocks disable it with the reason.How tested
edit-base.test.tsx(choices, the pick, disabled with a reason, nothing to offer).2D3Akz31nwDupidzP4hJ16s8tqjByYe55Vtg1iQN1MrZ/mp-merge-a, with this branch's static build:main. Pencil, pickdev, confirm (~0.000829 DASH). The header says "wants to merge into dev" and the timeline "retargeted to dev". The merge box then merges intodev.dg pr verifyon that merge: "contains this PR's commits".dg pr edit --base devthendg pr merge --no-ff. It merged intodev, anddg pr verifysays "contains this PR's commits".e3-edit-base-390-dark/)./Users/pasta/workspace/dash-forge-qa/evidence/p0/merge-power/:e3-retarget-web/01..08-*.png(picker, confirm, after the retarget, merged into dev) plus the video,e3-retarget-setup.txt,e3-retarget-dg-2.txtande3-retarget-web-dg-verify.txt.Limits
🤖 Generated with Claude Code