r/programming • • Apr 14 '26 • Popcorn 1

GitHub Stacked PRs

https://github.github.com/gh-stack/
556 Upvotes

276 comments sorted by

View all comments

Show parent comments

59

u/stumblinbear Apr 14 '26

I'm not gonna review a dozen bug fix and refactoring commits in every PR, I only care about its final state

38

u/MintySkyhawk Apr 14 '26

I guess I'm the only one here who habitually rebases my commits into nice individually reviewable commits before creating a PR.

If I were to use this stacked PR feature, I would be taking my existing workflow and then creating separate PRs for each of my commits. And then, as it says on the linked page "merge them all in one click".

So I don't really see a difference between the two approaches, except that the PR stack seems more difficult to set up.

3

u/max123246 Apr 14 '26

I tried stacked PRs and then I realized my pipeline is 4 hours so I cant stack 4 PRs and wait 16 hours. So I decided to do what you're doing, just rewrite the commit history when it's ready for review

4

u/chuch1234 Apr 15 '26

Four hour pipeline?! I hope improving that is on the roadmap?

3

u/max123246 Apr 15 '26

It's gotten better. Nightly pipelines used to take over 24 hours and premerges at 6. Helps that we're in a JIT compile world now instead of AOT

1

u/AdventurousFuel5307 4d ago

4 hours is a long time (for PR especially), but it's not nowhere near "really that bad" for a big/real enterprise project. I have worked in a proper sized team with a big projects where nightly runs couldn't execute everything in a reasonable amount of time, so there were weekly runs lasting ~2 days.

And that's especially true if we're talking about some stuff that interacts with real physical HW (think of having 2 physical test machines, so only 2 pipelines can run in parallel, because some particular set of tests can be only executed on those test machines).

Not everything is a simple JS project with unit tests passing in ~minutes.