Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Allow pull request only if same commits were merged in a different branch before

bogdanTudorStefan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 13, 2023

Can I define a rule for accepting pull requests in a branch only if the commits were previously merged in a "test" branch?

For example in our organization we have a "master" branch, a "test" branch and a diffrent branch for every bugfix (let's address them with "a", "b"...).

I want to create a rule so you are not allowed to create or aprove a pull request of brances "a" or "b"... to "master" if all the commits contained in branches "a" or "b"... are not contained yet in the "test" branch. (meaning that they were not tested)

Can you help me?

 

2 answers

1 vote
Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 13, 2023

It is not possible at the moment. 

More precisely, your requirement is rather custom, so I think having precisely this feature is not very realistic. But! If you look at the Bitbucket roadmap, you can see a feature coming soon which will allow developers to add custom merge checks!

This is exactly what you need to implement your requirement.

See: https://www.atlassian.com/wac/roadmap/cloud/Custom-merge-checks?search=merge&p=215ad4ab-15

0 votes
Saxea _Flowie_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 14, 2023

Hi @bogdanTudorStefan

I'm just wondering if having 'a' and 'b' in the 'test' branch is sufficient. Shouldn't passing the test also be a requirement? How are you currently tracking and enforcing this?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events