Stacked PR: Base-Branch Deletion Auto-Closes the Dependent PR
Problem
You have a stacked PR pair:
- PR1 —
base: main,head: feature-pr1 - PR2 —
base: feature-pr1,head: feature-pr2(stacked on PR1)
You squash-merge PR1. The merge succeeds. You then run:
gh api -X DELETE repos/<owner>/<repo>/git/refs/heads/feature-pr1
…to clean up the orphaned remote branch (because gh pr merge --delete-branch
failed locally with the worktree-checkout-trap and you used the
[Description truncada. Veja o README completo no GitHub.]