Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,294,588
Community Members
 
Community Events
165
Community Groups

How do you add a dependency on one pull request by another?

I have two separate projects I am working on and they are each in a different Bitbucket repo. One project, let's call it project A, uses libraries from the other project, we'll call this one project B. Now, sometimes my work will include changes to both project A and project B, which are simultaneous and related to the same open issue I am working on. For example, I may need to work with some new data in project A, which in turn will require an update to project B to actually get the data. 

At this point I am making changes to project A, pushing those changes, and opening a new pull request for a feature branch in the repo in which project A resides. At the same time, I am making changes to project B, pushing those changes, and opening a new pull request for a feature branch in the repo in which project B resides. 

An issue arises when project A, at the new feature branch, is cloned, but can't be built or compiled because it relies on the feature branch of project B which hasn't yet been cloned. This issue becomes a real problem if project A is reviewed, approved, and merged before project B.

When opening pull requests how do I specify that there is a dependency on one pull request by another, and therefore a pull request cannot be merged before it's dependencies are merged?

3 answers

1 accepted

2 votes
Answer accepted
Mikael Sandberg Community Leader May 08, 2018

We use tasks and the No incomplete tasks merge check to solve this. In the task we put the URL to the related Pull Request and mention that both Pull Requests have to be merged at the same time. 

Mikael Sandberg Community Leader May 24, 2018

@Derek SJust found this app, Linked Pull Requests, while looking at what was new on Marketplace.

Like # people like this

Could you please provide more details on this implementation?

Bit late to the party, but here is good news. We have released pull request merge hierarchies in Pull Request Organizr via an intuitive drag and drop method to create multi-level pull request merge dependencies.

pr dependencies 2021 short animation.gif

Linking and unlinking pull request dependencies

Check out the blog ...

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,158 views 2 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you