Conversation
📚 Pull Request Stack
Managed by gh-stack |
|
Claude finished @boneskull's task in 4m 42s —— View job Code Review
Overall this is well-structured: the new Bug:
|
Resolves #95. Previously, `gh stack submit` would prompt to publish a draft PR every time it ran, as long as the PR was a draft and targeted trunk. This got annoying fast. The fix adds a `stackPRBase` key to `.git/config` (per branch) that persists the last-known remote base after each successful submit run. The publish prompt now fires only when the stored base differs from trunk — i.e., the PR's base is genuinely moving to trunk for the first time since the last submit. Cleanup is consistent: `unlink`, `orphan`, and sync's merged-branch handlers all clear `stackPRBase` alongside the other per-branch config keys. Sync's retarget-to-trunk path also persists the new base so subsequent submit runs don't re-prompt.
The `prActionUpdate` path in `executePRDecisions` was calling `SetPRBase` before `maybeMarkPRReady`, which meant `isTransitionToTrunk` always read the value we had just written (trunk) and returned false. The publish-draft prompt was therefore silently suppressed for all existing PRs transitioning to trunk. Fix: call `maybeMarkPRReady` first, then persist the new base. While here, move `GenerateAndPostStackComment` inside the success branch so it doesn't run when `UpdatePRBase` fails. Add `TestIsTransitionToTrunkOrderingInvariant` to document and guard the required call order.
|
Claude finished @boneskull's task in 1m 41s —— View job Code Review
The ordering bug flagged in the previous review is fixed in commit Fix looks correct
Minor:
|
Resolves #95. Previously,
gh stack submitwould prompt to publish a draft PR every time it ran, as long as the PR was a draft and targeted trunk. This got annoying fast.The fix adds a
stackPRBasekey to.git/config(per branch) that persists the last-known remote base after each successful submit run. The publish prompt now fires only when the stored base differs from trunk — i.e., the PR's base is genuinely moving to trunk for the first time since the last submit.Cleanup is consistent:
unlink,orphan, and sync's merged-branch handlers all clearstackPRBasealongside the other per-branch config keys. Sync's retarget-to-trunk path also persists the new base so subsequent submit runs don't re-prompt.