Bitbucket Cloud PR Decoration with SonarQube

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    7.7
  • what are you trying to achieve
    Enable PR analysis and decorate PRs for Bitbucket Cloud from SonarQube
  • what have you tried so far to achieve this
    We have enabled PR analysis for Bitbucket Server from SonarQube and it is working good so far. I know there is similar feature from SonarCloud with does Decoration of PRs on Bitbucket Cloud. We were wondering if this could be achieved from SonarQube instead. I know there are many people in the same boat where they have code in mix of repository hosts such as bitbucket cloud and bitbucket server and wondering if SonarQube can handle PR decorations for both. If not are there any plans to do Bitbuxket Cloud PR decorations from SonarQube?

Hi Keyur,

Congrats and thanks on your first SonarSource Community post!

Regarding your question. We don’t yet officially support your ask, however it’s possible - see this posting: Decorate PR analysis in Bitbucket Cloud

Thanks for contributing!

Clint

Hi Clint,

I tried overriding the parameter “sonar.pullrequest.provider” along with other values but I get this error

Unable to find a Pull Request decorator factory for ‘Bitbucket Cloud’ I also tried with ‘bitbucketcloud’ but same result. So my guess is it doesnt support cloud decorator?

So I am not sure if its just impossible to do PR decoration for bitbucket cloud from SonarQube or I messed up with any configuration. Curious to try this out only because you mentioned “We don’t yet officially support your ask, however it’s possible” so any guidance is appreciated if its possible.

Thanks.

Hi Keyur,

Thanks for your patience. I asked one of our product consultants to investigate and he confirmed that it’s not possible. I apologize as it appears I offered you some incorrect advice based on the referenced post.

So, here’s what I can offer: first, we are continuing to evaluate adding this feature to SonarQube and second, I wouldn’t be doing my marketing duties if I didn’t remind you that SonarCloud does officially support Bitbucket Cloud decoration. :grinning:

Thanks and happy code analysis!

Hi Clint,

Great to hear that you are evaluating adding Bitbucket Cloud PR Decoration support to SonarQube. Wondering if you guys have any ticket that we can keep track and eye on for updates?

Hi Keyur,

We’re still at the evaluation stage for this feature so we don’t have a Jira ticket created.

However, I encourage you to leave our PM/dev teams your thoughts on the value it would bring - we already have a Community New Feature Topic created for sharing such thoughts and musings! :sunglasses:

Clint