For repositories that use Merge for PRs, merging a stack of PRs is very easy.
Given a stack main -> feature1 -> feature2, you can merge feature1, and then feature2.
No additional work is needed.
For repositories that use Squash or Rebase for PRs, the workflow is:
merge feature1, then rebase feature2 on new main, push, wait for CI, press merge again.
This is annoying.
It's worth exploring a merge command that acts as a local merge queue:
it merges the bottom-most PR, waits for the merge (e.g. if a GitHub Merge Queue is in use), rebases the next PR, pushes, merges, and so on.
Obviously, it stops as soon as the build fails (maybe with a build retry option for known flaky builds), or if there's a conflict rebasing, but otherwise it would be useful. e.g. hypothetically,
> gs downstack merge
Merging feature1 (#42)
Waiting for Merge Queue...
Rebasing feature2 (#43)
Waiting for builds...
Merging feature2 (#43)
Waiting for Merge Queue...
All PRs merged!
Progress
For repositories that use Merge for PRs, merging a stack of PRs is very easy.
Given a stack
main -> feature1 -> feature2, you can merge feature1, and then feature2.No additional work is needed.
For repositories that use Squash or Rebase for PRs, the workflow is:
merge feature1, then rebase feature2 on new main, push, wait for CI, press merge again.
This is annoying.
It's worth exploring a merge command that acts as a local merge queue:
it merges the bottom-most PR, waits for the merge (e.g. if a GitHub Merge Queue is in use), rebases the next PR, pushes, merges, and so on.
Obviously, it stops as soon as the build fails (maybe with a build retry option for known flaky builds), or if there's a conflict rebasing, but otherwise it would be useful. e.g. hypothetically,
Progress
merge: show individual status checks, not just binary statedeferredmerge: customization on definition of mergeable (maybe just a command that takes JSON information?)deferred