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

Problems configuring Sonar Merge checks in Bitbucket

nmartins10 May 4, 2020

I need to configure our repos to not allow merges if a certain level of sonar issues are greater than 0. (Basically prevent major, critical and blocker issues from being merged).

To do this I'm basically going to: Repository Settings > Sonar > Merge Checks. And there I do the following:

1. check the "Use custom repository settings from below"

2. Enable the "Merge Checks"

3. Putting the "Max. number of new Sonar issues" with 0 and select the level as "Major"

4. Hit save.

With this, if for example I introduce a blocker issue, when I go to the Pull Request approval page the merge button allows me to merge.

One note: If I check the "Use SonarQube Quality Gates" and if I violate the quality gate it prevents me from merging. The problem is that I don't want to prevent using the quality gates because that is validating other things too.

My company is using Bitbucket version 6.10.2

 

Thanks in advance.

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events