Stacked pull requests: change a pull request's base with src pr edit --base, and fill other stack gaps #118
Closed
tombeckenham opened this issue ·1 comment
Building the #106 stack (#107 to #117) showed gaps in how src handles stacked pull requests.
What works now#
src pr create --base <branch>opens a pull request on another pull request's branch and links it into a stack.src pr stack view|link|unlink|breakshow and manage a stack.- The forge keeps a stack in sync: a push to a lower pull request is merged into each one above it ("Merge #108 into #109 (stack sync)").
What's missing#
- Change a pull request's base.
src pr edit <n> --base <branch>answers "not supported yet". gh hasgh pr edit --base. Without it, a pull request can't be moved within a stack or put on top of a new one: I had to close #112 and #114 and open #115 in their place, which loses the review history.- When the new base is another pull request's branch, link the pull request into that stack, and run the stack sync so the new base is merged in.
- REST and MCP need the same change (parity rules in AGENTS.md).
- Insert a pull request into the middle of a stack. Opening a pull request on #108's branch made a second branch of the stack (#114 next to #109), not a new layer. With 1,
src pr edit 109 --base <new branch>fixes this. Asrc pr create --insertthat does both steps would be better still. - Close and delete the branch.
src pr close --delete-branchis "not supported yet" (gh has it). - A stack that branches. #112 and #113 were both on #111, and
src pr stack viewshows only one path. It should show both, or warn that the stack forks.
Done when#
src pr edit --base, REST and MCP change the base, and relink the stack when the base is a stacked pull request's branch.src pr close --delete-branchworks.src pr stack viewshows a forked stack.- The docs and the source agent skill describe each change, and
SUPPORT.mdis regenerated.
AlemTuzlak closed this
Sign in to join this conversation.
Done in #127 (merged): src pr edit --base (also REST and MCP), src pr close --delete-branch, and forked stacks in src pr stack view.