Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 2
Message 1 of 3

Merging multiple dependent PRs

Situation:

Multiple PRs have been raised against the same Github repo which are meant to be merged at the same time, which are related. The last raised one would have to be rebased on top of others, before being merged. This feature also prevents frequent broken master builds.

 

Question:

I reckon Github doesn't have any policy/setting which could enable this. But, is there a solution for this?

2 Replies
Highlighted
Commander Lvl 1
Message 2 of 3

Re: Merging multiple dependent PRs

Hey! Sounds like you want to check out one of the PR branches, and then merge the other pr branches into a single PR branch thus avoiding multiple failing builds. For this sort of thing, I tend to use an external Git interface like SourceTree since it provides a nice visual way to do this sort of thing. Let me know if this did not answer your question and I can take another pass at it. 

Highlighted
Copilot Lvl 2
Message 3 of 3

Re: Merging multiple dependent PRs

Hey @logankilpatrick - thanks for your reply.

I think Sourcetree is a great example but I suppose you are taking about the GUI experience but what I meant to say was "comparison between PRs but NOT merging them into one and in an automated way" maybe using a pipeline etc. It would kind of check for the "dependent PRs" so that that if merged, the master doesn't break! I will try to explain. Say there are 3 PRs - A, B, C in a queue. Once A gets merged to master, B might have a conflicting change to A and after B is marged to master (= master + A now), the build will break! 

 

How can we avoid it?