Make Child Pull Requests Dependent on Parent Pull Requests #4477
Replies: 10 comments 15 replies
-
See isaacs/github#959 which is the main issue in that repo covering this topic; isaacs/github#867 is a kind of early duplicate. At the time of writing it has 580 👍, 91 ❤️, 34 🚀, and a lot of valuable discussion which I worry will be forgotten about by simply copying issue descriptions here. I suggest leaving GitHub staff to take care of migrating issues from https://github.com/isaacs/github/issues to here, since they are already working on that and (hopefully) listening to various suggestions on how to perform the migration in the most effective manner. |
Beta Was this translation helpful? Give feedback.
-
I open sourced a tool that integrates into git and manages the stack of pull requests for you. This both reduced the load of having lots of branches and managing their base refs, as well as the issue you are bringing up of not merging child pull requests before their parents. |
Beta Was this translation helpful? Give feedback.
-
This feature is basic common sense, it has to be the top prio! |
Beta Was this translation helpful? Give feedback.
-
There are already sevaral solutions in place for this, written and maintained by the open-source community:
And probably more. The GitHub team can't possibly be expected to implement every possible feature that everyone wants. That's why they gave the open source community access to GitHub APIs, GitHub Actions, and GitHub Apps. If there are community-run solutions out there, I encourage you to use them. And if they don't exist, make them! That being said, this discussion should probably remain open until GitHub staff gives their official verdict. |
Beta Was this translation helpful? Give feedback.
-
I believe there are two related but distinct value-add features being discussed here around forming relationships between PRs. I'll try to write up a summary. To illustrate, lets use an example. Lets say I'm making two dependent PRs to the repo
Feature 1: Render PR2 as a diff from PR1Case A: Author of both PRs has push access to
Case B: Author is external to
@ejoffe's https://github.com/ejoffe/spr attempts to streamline this process clientside for Case A. AFAICT it is not possible to build such a tool for Case B as I don't think customizing the diff renderer is possible in this way. There's some further discussion of this in an issue on the github cli cli/cli#2693 (comment) Feature 2: Block PR2 from landing until PR1 lands.@Levi-Lesches's comment #4477 (comment) has a great writeup on various external tools which do this. This is possible to achieve via github API, even w/o a blessed way to encode the dependency. Encoding the relationship between PRsGithub doesn't have a blessed way to encode relationship between PRs. Several tools exist which try to cover feature 1A and feature 2, which leverage different encoding schemes. I've found popular ones to be
|
Beta Was this translation helpful? Give feedback.
-
Seriously? After all these years it's still not possible. "Use the API or use community actions." Not possible if the respoitory you are opening such pull requests for on which you do not have write access on and so must be forked. The inability to be able to mark child pull requests ticks me off considerably. Because this does not exist, it makes it insanely easy to get your default branch into an unbuildable state if you accidentally merge the child before the parent. Likewise I feel like merging the parent PR should automatically merge the child pull requests at the same time for us. For this reason I feel like the only way to be able to get such done would be to make my own git website to host projects on in order to use such a feature. However currently I do not know how to use .NET to make an git server side similar to github yet 😄. |
Beta Was this translation helpful? Give feedback.
-
Until now, seems like github does not want to implement it. For those who are looking at a step-by-step guide you can check This blog |
Beta Was this translation helpful? Give feedback.
-
While managing/enforcing dependencies is something that can be done through community tooling. The thing that I see the largest struggle with is managing this when using a fork based flow. If you have something like:
Then you can create PR#1 for Where I've seen much larger struggles is where you are instead working with a fork doing something like:
With this you can create PR#1 for
While I think there are improvements that could be done automatically by github for the single repo case:
The (Also I realize that this was largely already covered by this previous comment but I felt the need to write this up my way emphasizing the limitations of the fork workflow in particular.) |
Beta Was this translation helpful? Give feedback.
-
Seriously github?! You guys want to work on AI slop but not actual useful features? |
Beta Was this translation helpful? Give feedback.
-
Stacked PRs are quite nice, but currently they have one major issue. The child PR should drop the redundant parent commits (through rebase) or fix the merge conflicts by creating a merge commit effectively ignoring the already merged commits. This doesn't have to happen automatically, manually pressing a button is fine. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Moved over from isaacs/github#867, which currently has 100 👍
Description copied from there:
GitHub currently allows you to change the base branch of a pull request, which would allow you chain pull requests together so that the unique diff can be seen. The issue with this is that it only works with upstream branches.
I would like to have the ability to mark a Pull Request as a Child of another pull request. In this case the child PR would not be able to be merged until the parent is merged or the marking is changed. Also, the diff would only show the differences in regards to the parent PR.
These features are not possible when continuously working on a feature or set of features that depend on each other and require review merging one piece at a time a branch or number of branches ON A FORKED BRANCH. This often leaves me having to manually manage a chain of branches on a local repo, getting feedback on one piece at a time without a reviewer being able to see the upcoming changes as well.
Beta Was this translation helpful? Give feedback.
All reactions