What's the difference between `Use special Bitbucket pull request branches` to fetch sonar data and `Use new Sonar branching and pull request support` in bitbucket?

Hi,
My company is using SonarQube of Enterprise Edition Version 7.9.1 (build 27448).
We are using Use special Bitbucket pull request branches in bitbucket settings to to fetch PR scan data now, and it works well. Now we want to support PR mode scan in sonar, the setting in bitbucket should be changed to Use new Sonar branching and pull request support.

So I wonder to know what’s the difference between them?

Thanks/Sai

Hi @SaiXu,

I don’t know what are Use special Bitbucket pull request branches or Use new Sonar branching and pull request support, they are probably not coming from SQ.

Is it possible that they are coming from an external plugin?

Cheers

They are bitbucket sonar plugin options.
Can I ask this question in another way?
What’s the difference btween SLB and PR branch? I can see that the issues in SLB are also the detal between feature branch and master branch.
I know that the pass in PR branch means that the PR branch passed the PR quality gate.
What’s PR quality gate? Can i customize it myself?
And what does the pass mean in SLB?

Thanks/Saix

Hi,
SLB and PRs are essentially the same thing. Both display changed files only (comparing the branch being analyzed with a target branch). The only difference is that P/Rs have a key associate to it (coming from bitbucket) and if configured correctly, SonarQube will decorate the pull request in Bitbucket with information about the issues that were found.

A quality gate is a criteria that is used by SonarQube to classify an analysis result as passing or failing. So “pass” means that the results of the analysis passed all criteria, as defined in the quality gate.

The quality gate can be customized for each project. When using PRs and SLBs, SonarQube will only the metrics of the quality gate that apply to “new code”, since that’s all that is analyzed with PRs and SLBs. More information here: https://docs.sonarqube.org/latest/analysis/pull-request/#header-2

2 Likes