Skip to content

Conversation

@jonathanlab
Copy link
Contributor

@jonathanlab jonathanlab commented Jan 9, 2026

TL;DR

Rewrote arr merge to merge PRs sequentially (one at a time), waiting for CI on each before proceeding. Also improved arr track to automatically detect and link existing PRs.

What changed?

Sequential merge flow

  • PRs now merge one at a time instead of rebasing all to main upfront
  • Waits for CI checks to complete before each merge (gh pr checks --watch)
  • Only updates next PR's base to main after current PR successfully merges
  • Falls back to auto-merge + polling if blocked by branch protection
  • 30 minute timeout for CI wait

Auto-link PRs on track

  • arr track now checks GitHub for an existing PR on the bookmark
  • Shows "Linked: PR #X" when found, making it easier to recover state

How to test?

  1. Create a stack of 2+ PRs with arr submit
  2. Run arr merge and verify it:
    - Waits for CI on first PR
    - Merges first PR
    - Updates second PR's base to main
    - Waits for CI on second PR
    - Merges second PR
  3. Test Ctrl+C during merge - verify stack stays intact (only completed merges affected)
  4. Run arr untrack <branch> then arr track <branch> on a branch with an existing PR - verify it shows Linked: PR #X

Why make this change?

The previous merge flow rebased all PRs to main upfront, which caused issues:

  • If interrupted, the stack was broken (all PRs pointing at main)
  • Hard to recover from failures mid-merge
  • Lost the visual stack on GitHub

@jonathanlab jonathanlab requested a review from a team as a code owner January 9, 2026 16:25
@jonathanlab
Copy link
Contributor Author

jonathanlab commented Jan 9, 2026


Merge from bottom to top, or use arr merge

@jonathanlab jonathanlab force-pushed the 01-09-sequential-merge-and-track-pr-linking branch 2 times, most recently from 8519b2a to 31a89a6 Compare January 9, 2026 16:29
@jonathanlab jonathanlab changed the title sequential merge and track pr linking feat(arr): sequential merge and track pr linking Jan 9, 2026
@jonathanlab jonathanlab force-pushed the 01-09-sequential-merge-and-track-pr-linking branch from 31a89a6 to 3ee1fbf Compare January 9, 2026 16:33
@jonathanlab jonathanlab force-pushed the 01-09-sequential-merge-and-track-pr-linking branch from 3ee1fbf to d95c883 Compare January 9, 2026 16:37
@jonathanlab jonathanlab merged commit 17ae95c into main Jan 9, 2026
11 checks passed
@jonathanlab jonathanlab deleted the 01-09-sequential-merge-and-track-pr-linking branch January 9, 2026 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants