Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Bitbucket cloud pull request merge restriction to check the fix version of associated JIRA

PramadaK
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!
November 26, 2024

The requirement is to add a merge restriction to match the fix version of JIRA to avoid any merges that are not part of a specific release.

2 answers

0 votes
Aron Gombas _Midori_
Community Champion
June 5, 2025

@PramadaK We have just released a new merge check which runs a custom JQL query and allows merging only if the work items are matching the JQL search results. It is part of the Better Commit Policy Connector app and it relies on the Forge custom merge check mechanism mentioned by @Ulrich Kuhnhardt _IzymesCo_.

For your use case, just use a JQL with the fixVersion field like this:

project = FOO and fixVersion = "1.2.3-beta"

It means that a PR can be merged only if the work item is in the FOO project and it has the fix version "1.2.3-beta". For example, merging is not allow here because the PR violates the policy:

bitbucket-cloud-rejected-pull-request (1).png

You can configure it to check the PR title, PR description, commit messages, the source branch name or all of it!

Follow the get started guide

(Discl. this app is developed by our team.)

0 votes
Ulrich Kuhnhardt _IzymesCo_
Atlassian Partner
November 26, 2024

Hi Pramada

I don't believe there is such a merge check that comes with Bitbucket cloud natively.

The good news is that Bitbucket cloud supports custom merge-checks based on the Atlassian Forge platform. You can write the merge-check exactly to your specifications and use it in your workspace. Since you're on a premium plan you can actually block merges that don't pass this merge-check.

Hope that helps.

Best, Ulrich

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events