You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 18, 2021. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 18, 2021. It is now read-only.
Quite often I find myself raising a pull request that contains another within it as a dependency. I want the diff to be exclusive of the dependency pull request’s changes, otherwise my colleagues end up reviewing more than they need to, or worse, the same changes twice (in both pull requests).
To workaround this, I usually set the base of my pull request to the dependency pull request, however this has caveats:
When the dependency pull request is merged and the branch is deleted, the dependent pull request will be automatically closed.
When the dependent pull request is merged, it is silently merged into the dependency pull request. This is usually not intentional.
I would like to see some UI in GitHub to make this workflow first class:
Dependent pull requests should not be mergeable until all dependency pull requests have been merged
Reacted by Adam Spiers, Marcel Hamer, Robert Audi, Petr Kraus, Ewan Mellor, Roman Stolper, Dan King, Simon Cierniewski, Bill Sacks, Golmote and 582 more
Reacted by DEPRECATED_JadenGeller@Asana, Beni Cherniavsky-Paskin, Albino Tonnina, Boyd Dames, Vasiliy Yorkin, Caroline, Alejandro Hernandez, Jordan Caussat, Emil Laine, Breahna David and 86 more
Reacted by Robert Linder, Everett (Mike) Wiley, Adel Rahimi, Dave Abrahams, Brandon Phillips, Santiago Bernhardt, danbrown-stripe, Réda Housni Alaoui, Dimitri A., Marco Valente and 28 more
It would be nice if the branch to which the PR is targeted even automagically updated:
PR branch my-new-infrastructure-thing is awaiting review and merging to master.
PR branch my-new-ui-thing is made against my-new-infrastructure-thing (because it makes use of some new infrastructure in my-new-infrastructure-thing)
Diff of PR my-new-ui-thing just shows the diffs to my-new-infrastructure-thing
When my-new-infrastructure-thing is merged to master, PR for my-new-ui-thing automagically switches to being a PR against master.
(and mostly there will be no conflicts to resolve, but there could be because other stuff might have happened in master also that causes conflicts - those would be resolved by the person who "owns" my-new-ui-thing, like they would for any conflict situation)
Reacted by Courtney Miles, Sam Cornwell, Jacob Mandelson, diegose, Nicholas Wright, Jonas Vautherin, Olin Blodgett, Greg Spencer, Daan van Marsbergen, Ankit Chaudhary and 55 more
This is a feature that I really miss from Gerrit. It's more common for me to have pull requests that depend on other pull requests than to have isolated pull requests.
Reacted by Jacob Mandelson, Henry Gessau, somdas, Ankit Chaudhary, Jens Rantil, Christian Schulz, Vivien Tintillier, Alexey Polonsky, Binh Q Nguyen, Alan Pierce and 38 more
When my-new-infrastructure-thing is merged to master, PR for my-new-ui-thing automagically switches to being a PR against master.
This is the workflow I imagined also. The dependant PR should follow the merge of its dependency.
Reacted by Phil Davis, Nathan Ridge, Jacob Mandelson, Henry Gessau, Jonas Vautherin, Quinn Blenkinsop, Alejandro Hernandez, Jon McGuire, Joel Hestness, Will Nations and 10 more
Fwiw, I had requested something similar directly from Github in 2016:
From [email protected] Wed Feb 3 14:02:38 2016
Date: Wed, 3 Feb 2016 14:02:38 +0100
From: Christian Brauner <[email protected]>
To: [email protected]
Subject: Incremental pull requests
Message-ID: <[email protected]>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
User-Agent: Mutt/1.5.24 (2015-08-30)
Hello,
I have a feature request/suggestion/question. A workflow that happens rather
often is to have multiple but not-thematically connected commits but which
nonetheless are incremental, i.e.
Commit 1:
- Implement **A** by making changes to file **F**
Commit 2:
- Implement **B** by making changes to file **F**
Where the features **A** and **B** are not thematically connected but make
changes to the same file and functions therin and are thus incremental (i.e.
build upon each other).
Let's assume I implement feature **A** first. Then I create a new branch
git branch implement_feature_**A** origin/master
based on the current master. But for the implementation of feature **B** I would
logically use origin/implement_feature_**A** as base
git branch implement_feature_**B** origin/implement_feature_**A**
Is there a way to group these PRs together such that it is obvious for other
collaborators that they should be merged incrementally, i.e. first merge
implement_feature_**A**
and only then merge
implement_feature_**B**
?
Otherwise they could always just merge
implement_feature_**B**
and the PR for
implement_feature_**A**
becomes rather pointless + this way neglects the fact feature **A** and **B**
are just incremental but thematically unrelated.
Best,
Christian
They told me that they'd consider it:
Date: Tue, 09 Feb 2016 04:52:55 -0800
From: "Petros (GitHub Staff)" <[email protected]>
To: Christian Brauner <[email protected]>
Message-ID: <discussions/73b2738eca7611e58e1586af4be1788f/comments/[email protected]>
In-Reply-To: <[email protected]>
References: <[email protected]>
Subject: Re: Incremental pull requests
Mime-Version: 1.0
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit
Precedence: list
X-SG-EID: /isQyw1HWYOYdYDPy2G3B3zgegQeGDLWVRLJ7aoZ5uDHe0Js9MIhxWsZqnOheP5i+al8M60D37ZiLY
5SddaxWW+FNYaG5PkvackH0fkAZe5afVFP4jCsqJB8ea/RmszlNd0mJq4qFA8yV4FKAX0jbkzV8vom
3Dfb1nCfmOCEdYRQtnT6DdFtY0jlys6BwwBO6u12YIzcENYjHB0KbK9BK6Qi3IHc2j9UPJ18IoEzuq
p8tsl0ud7oezPxxmCSdYg+
Hi Christian!
Thanks for writing in!
> Is there a way to group these PRs together such that it is obvious for other
> collaborators that they should be merged incrementally, i.e. first merge
Not currently. You could use labels, group them together by using a prefix in the title, and as always, communicate your intentions in the pull request body by mentioning your team(s) or other collaborators.
Your feedback is interesting, so I have shared it with our team to consider.
Cheers,
Petros
Reacted by Jon McGuire, Anirudh Nimmagadda, Kande Bonfim, Fredrik Carlén, Federico Freiberger, Daniel Otero, AraHaan and Waldir Pimenta
This is especially annoying when the repo you're contributing to can take weeks to review / merge, and devs are left having to somehow manually keep track of the follow-up changes instead of getting completed work into the pipeline and move on with their life.
Reacted by Cody Casterline, Vladimir Katushenok, Nicholas Wright, Joel Hestness, Will Nations, Stanislav Dimitrov, Tom Thorogood, Jaime Ieong, capsudo, Joshua Carter and 27 more
GitHub should make it so that if a dependency PR was merged, all dependent PRs that had that merged PR's branch as a base should automatically have their base branches changed to that of the merged PR.
This way it would become really straight-forward to merge PRs in a bottom to top approach (merging PRs closer to develop first).
Reacted by Ricardo Abreu, Ty Everett, Fredrik Carlén, Ryan Schwartz, Lohanna, Jaime Ieong, Oliver Joseph Ash, Michał Karnicki, Brandon Phillips, Ryan Bates and 4 more
GitHub should make it so that if a dependency PR was merged, all dependent PRs that had that merged PR's branch as a base should automatically have their base branches changed to that of the merged PR.
This way it would become really straight-forward to merge PRs in a bottom to top approach (merging PRs closer to develop first).
Agreed. The need for this auto-rebase (or at least auto-change-base) feature was also noted in #950.
Also suffering from these same stacked pull request headaches, I wrote a client side tool that manages pull request stacks for you automagically.
If you like the gerrit style workflow, checkout git spr https://github.com/ejoffe/spr.
For me it has brought back sanity to managing pull requests on github.
I'd love to get your feedback.
Reacted by Barak Merimovich, Will Beason, Nate Dobbs and leoluk
This was already done, so please don't submit a duplicate - thanks ;-)
Thanks.
Sorry, I submitted this as I was able to find neither Mark pull request as depending on another nor Mark pull request as depending nor depending on another as the new title is Make Child Pull Requests Dependent on Parent Pull Requests. I wasn't able to find feedback/ in this issue discussion either.
Sorry, I submitted this as I was able to find neither Mark pull request as depending on another nor Mark pull request as depending nor depending on another as the new title is Make Child Pull Requests Dependent on Parent Pull Requests. I wasn't able to find feedback/ in this issue discussion either.
No worries. But that exactly proves the importance of GitHub doing this migration properly, and quickly. Please can you link to the discussion you filed, and also close it with an explanation which links to community/community#4477 and to here?
Ah I see, by "I submitted this" I guess you meant "I wrote the above comment" rather than "I submitted a new discussion topic". I misunderstood it as meaning the latter.
Ah I see, by "I submitted this" I guess you meant "I wrote the above comment" rather than "I submitted a new discussion topic". I misunderstood it as meaning the latter.
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!
Reacted by Greg Dennis, Nestor Vera, Kristian and debuggingfuture (Vincent)
Activity
cirosantilli commentedon Jun 18, 2017
related #210
phil-davis commentedon Jun 20, 2017
It would be nice if the branch to which the PR is targeted even automagically updated:
(and mostly there will be no conflicts to resolve, but there could be because other stuff might have happened in master also that causes conflicts - those would be resolved by the person who "owns" my-new-ui-thing, like they would for any conflict situation)
aspiers commentedon Sep 19, 2017
See also #805 (can't move base branch of PR to a different fork).
gelldur commentedon Dec 19, 2017
Also after merging branch cache still shows changes from dependent branch
dstanek commentedon Jan 17, 2018
This is a feature that I really miss from Gerrit. It's more common for me to have pull requests that depend on other pull requests than to have isolated pull requests.
courtney-miles commentedon Jan 17, 2018
This is the workflow I imagined also. The dependant PR should follow the merge of its dependency.
brauner commentedon Feb 16, 2018
Fwiw, I had requested something similar directly from Github in 2016:
They told me that they'd consider it:
aspiers commentedon Apr 2, 2018
Duplicate of #950 and #867, although this one has more interesting comments than those.
MV10 commentedon Oct 15, 2018
This is especially annoying when the repo you're contributing to can take weeks to review / merge, and devs are left having to somehow manually keep track of the follow-up changes instead of getting completed work into the pipeline and move on with their life.
wxianxin commentedon Nov 19, 2018
Is it normal that an issue has been open for over a year?
dgw commentedon Nov 19, 2018
This is just an unofficial "ideas" repo. GitHub doesn't officially follow these issues.
amcsi commentedon Nov 29, 2018
GitHub should make it so that if a dependency PR was merged, all dependent PRs that had that merged PR's branch as a base should automatically have their base branches changed to that of the merged PR.
This way it would become really straight-forward to merge PRs in a bottom to top approach (merging PRs closer to
developfirst).aspiers commentedon Feb 28, 2019
@amcsi commented on November 29, 2018 11:07 AM:
Agreed. The need for this auto-rebase (or at least auto-change-base) feature was also noted in #950.
37 remaining items
z0al commentedon Nov 25, 2020
FYI, I just released Dependent Issues 🎉 . The successor of the 3 years old DEP bot.
It's a GitHub action that lets you mark a PR or an issue as dependent on another. It works with cross-repository dependencies as well.
Check the repo for more info: https://github.com/z0al/dependent-issues
jd commentedon Jun 11, 2021
For what it's worth, it's now also a feature in Mergify. When using the merge action, which enables automatic merge, it'll respect
Depends-Onheaders.ejoffe commentedon Jun 17, 2021
Also suffering from these same stacked pull request headaches, I wrote a client side tool that manages pull request stacks for you automagically.
If you like the gerrit style workflow, checkout git spr https://github.com/ejoffe/spr.
For me it has brought back sanity to managing pull requests on github.
I'd love to get your feedback.
oprogramador commentedon Jul 6, 2021
@OliverJAsh
Are you going to clone this proposal to https://github.com/github/feedback/discussions ?
aspiers commentedon Jul 8, 2021
@oprogramador commented on July 6, 2021 3:52 AM:
This was already done, so please don't submit a duplicate - thanks ;-)
oprogramador commentedon Jul 8, 2021
Thanks.
Sorry, I submitted this as I was able to find neither
Mark pull request as depending on anothernorMark pull request as dependingnordepending on anotheras the new title isMake Child Pull Requests Dependent on Parent Pull Requests. I wasn't able to findfeedback/in this issue discussion either.aspiers commentedon Jul 8, 2021
@oprogramador commented on July 8, 2021 7:51 PM:
No worries. But that exactly proves the importance of GitHub doing this migration properly, and quickly. Please can you link to the discussion you filed, and also close it with an explanation which links to community/community#4477 and to here?
oprogramador commentedon Jul 8, 2021
I haven't opened any discussion related to this issue.
aspiers commentedon Jul 8, 2021
Ah I see, by "I submitted this" I guess you meant "I wrote the above comment" rather than "I submitted a new discussion topic". I misunderstood it as meaning the latter.
oprogramador commentedon Jul 8, 2021
Yes, I meant posting a comment.
webzorg commentedon Jul 21, 2021
It would be stupidly easy to implement this feature but yet this issue is open for a decade. 2021!
Levi-Lesches commentedon Jul 22, 2021
@webzorg There are a few custom solutions:
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!
gregsdennis commentedon Jul 22, 2021
... Dependency-check from me
Levi-Lesches commentedon Jul 22, 2021
Thanks, added to the list. I'll use that list if similar discussions arise.
EDIT: Here's the discussion on the official GitHub feedback repo: community/community#4477 (comment)