Comments on: Stacked pull requests: make code reviews faster, easier, and more effective https://www.michaelagreiler.com/stacked-pull-requests/?utm_source=rss&utm_medium=rss&utm_campaign=stacked-pull-requests Thu, 12 Jan 2023 07:58:19 +0000 hourly 1 https://wordpress.org/?v=6.1.6 By: Dr. Michaela Greiler https://www.michaelagreiler.com/stacked-pull-requests/#comment-69164 Thu, 12 Jan 2023 07:39:20 +0000 https://www.michaelagreiler.com/?p=5000#comment-69164 In reply to Galdin.

Thanks, great addition!

]]>
By: Dr. Michaela Greiler https://www.michaelagreiler.com/stacked-pull-requests/#comment-69162 Thu, 12 Jan 2023 07:36:37 +0000 https://www.michaelagreiler.com/?p=5000#comment-69162 In reply to Mike.

Hi Mike, thanks for letting me know. Unfortunately, I did not find a new version of this blog post anymore.

]]>
By: Mike https://www.michaelagreiler.com/stacked-pull-requests/#comment-57351 Mon, 25 Jul 2022 13:26:49 +0000 https://www.michaelagreiler.com/?p=5000#comment-57351 Thanks for the post! Looking for ways to reduce the review burden on my team.

Do you know of an alternative way to access Grayson Koonce’s post? It seems to be unavailable now. 🙁

]]>
By: Galdin https://www.michaelagreiler.com/stacked-pull-requests/#comment-44369 Mon, 28 Feb 2022 04:53:39 +0000 https://www.michaelagreiler.com/?p=5000#comment-44369 Another approach is [trunk based development][1].

The developer opens stacked PRs, similar to how you described. Code gets reviewed in the order the PRs were opened, and gets merged in the order the PRs were opened.

In fact, there should be an emphasis to get PRs merged into the trunk/main/master branch asap.
The goal here is not only to get the code reviewed in smaller chunks, but also let it become part of the code base in smaller chunks.

This approach is very scalable, and is easy to adopt because it’s very rare to have more than 2 stacked PRs (since PRs are merged asap).

[1]: https://trunkbaseddevelopment.com/

]]>
By: Eitan https://www.michaelagreiler.com/stacked-pull-requests/#comment-29330 Thu, 17 Jun 2021 06:49:48 +0000 https://www.michaelagreiler.com/?p=5000#comment-29330 Great post! I couldn’t agree with you more that the key to fast pace software development is small reviewable pull requests.
I have personally found managing stacks of pull requests on GitHub to be too much of a headache, and so decided to write a tool which manages the stack of pull requests for me. It’s open source and you can find out more about it here: https://github.com/ejoffe/spr.
The slight difference between your model is that each pull request is a single commit, and you only have to manage a stack of commits in your branch. The tool creates and updates your pull requests based on your commit stack. To update a pull request you amend a commit instead of adding another wip commit.

]]>
By: Dr. Michaela Greiler https://www.michaelagreiler.com/stacked-pull-requests/#comment-22411 Fri, 29 Jan 2021 19:10:00 +0000 https://www.michaelagreiler.com/?p=5000#comment-22411 In reply to Marco Baccaro.

Thank you, Marco!

]]>
By: Dr. Michaela Greiler https://www.michaelagreiler.com/stacked-pull-requests/#comment-22410 Fri, 29 Jan 2021 19:09:42 +0000 https://www.michaelagreiler.com/?p=5000#comment-22410 In reply to Nicolas Carrier.

Hi Nicolas,

you review the changes from bottom to top (as you suggested), but you merge them from top to bottom. The reason for this is merely a technical one (how git and branches work). But, you are right, if git or the tooling around would support it more easily, it would make sense to merge the PR right after you reviewed it and thus bottom to top. But this will create more merge conflicts and hassle with the branches for you. So, that’s the reason why I recommend merging only after you reviewed the whole stack. Then, you integrate and merge the stacked together.

]]>
By: Dr. Michaela Greiler https://www.michaelagreiler.com/stacked-pull-requests/#comment-22409 Fri, 29 Jan 2021 19:05:34 +0000 https://www.michaelagreiler.com/?p=5000#comment-22409 In reply to Roscoe A Bartlett.

Yes, you are right. It’s not trivial. It’s a workaround that helps us improve code comprehension for the reviewer. Unfortunately, the current tools such as GitHub, Gitlab, and Bitbucket do not support this use case natively. I hope over time, it will be easier for the developer by using tooling to do this.

]]>
By: Roscoe A Bartlett https://www.michaelagreiler.com/stacked-pull-requests/#comment-22406 Fri, 29 Jan 2021 18:27:43 +0000 https://www.michaelagreiler.com/?p=5000#comment-22406 For most people I work with, this workflow would scare the heck out of them and they would never do it. If you don’t understand the Git object model really well, there is no way you can do this workflow for more than just 1 or 2 branches. But I did actually stumble on this workflow myself a while back as a way to provide suggestions to a PR I was reviewing and now I use it quite frequently. As long as you only have one outstanding PR against the main PR, then this is pretty clean actually.

]]>
By: Nicolas Carrier https://www.michaelagreiler.com/stacked-pull-requests/#comment-20451 Fri, 11 Dec 2020 10:14:39 +0000 https://www.michaelagreiler.com/?p=5000#comment-20451 Hello,
First of all, thank you for your blog posts, which I discovered thanks to the training or reviews, you recently gave with the ACM. All of this content is extremely informative!

About merging stacks of PRs, I’m surprised you advise to merge top to bottom, while doing the reverse seems more logical to me.
For example, if doing so, when starting by merging fb-ui -> fb-businesslogic, someone willing to review the changes brought by fb-businesslogic, would have then to take into account the aggregated diff of the two branches, while the fb-ui part has already been reviewed and considered ready for being merged. And even if aware of this, the reviewer would see a diff, polluted by already reviewed changes.
What’s more, between the time fb-ui has been merged into fb-businesslogic, the develop branch can have changed in a way that makes fb-ui not mergeable into it anymore.

That’s why in this kind of situation, we tend to encourage doing the contrary, that is reviewing then merging fb-database first. the fb-businesslogic PR will get retargeted automatically by tools like bitbucket (but it can be done manually too).
This approach allows to really split the reviewing / merging process into smaller, more independent chunks IMHO. But of course, it relies on each individual branch being robust enough to not break develop until the 2 other PRs can be merged.

]]>
By: Marco Baccaro https://www.michaelagreiler.com/stacked-pull-requests/#comment-18494 Wed, 07 Oct 2020 16:11:05 +0000 https://www.michaelagreiler.com/?p=5000#comment-18494 Very nice content. This practice surely helps the team in code reviews sessions.

]]>