Create one pull request across several repositories

We have a Stash Project with ~30 repositories, each containing one submodule. The root-repo (the one holding the git submodule configuration) is also contained in the project. During development we almost always need to change code in more than one module, so we have to create pullrequests in each submodule separately, even if they belong to the same ticket/changerequest/userstory/bugfix.

So, is it possible to create one pull request for changes in multiple repositories?


5 answers

We have a similar situation with pull requests and submodules.  Even without the submodule aspect there may be situations where a global project change may require that the repositories are updated in a specific sequence.  For example for repository B should be merged then repository A should be merged, etc.  Being able to put conditions on a pull request merge might address the OP requirement.  If one could say, pull request A can't be approved and merged until pull B is approved and merged that would at least prevent an out of order issue.  It doesn't address the OP desire to create a single pull request but it means that multiple pull requests are completely independent which might minimize the issue of creating multiple requests.

Yes, some kind of "pull request set/bundle" would be a really nice feature even for a single repository.

You can create a feature request for this at (check first if one exists already). Please post the link here in a comment if you do.

i dont think thats possible, because pull-request merges create always a new commit.
And those new commits in the submodules are not the those you have linked in the "parent" pull-request's commit.

In other words: You need to merge the commits in the submodules first before you can even link them in the parent repository.

Nonetheless, it might be beneficial for your scenario if Stash could group several independend pull-requests into one user action.

I think hierarchially linked pull requests are the answer. The pull request is defined based on branches, not commits. Child just needs merged transition to trigger parent Pull Request.


For reviewer it should still be ok, because they are looking at the diff introduced by the software change.

It could be done with a little bit of code... what links the different changes, do they all have the same branch name for instance?

Sounds great. The branch names are equal, yes (e.g. feature/#123456_foo). Would that require to use ScriptRunner or create a separate addon for Stash?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

655 views 5 9
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you