Pull request decoration did not happen (Bitbucket Cloud)

The following warning is visible in the dashboard for a pull request:

Pull request decoration did not happen. Please install SonarCloud application on the Bitbucket Cloud repository's organization or user:

The analysis is being triggered from a Jenkins pipeline using the following command:

./mvnw -B sonar:sonar sonar-quality-gate:check \
-Dsonar.login=$SONAR_TOKEN \
-Dsonar.pullrequest.key=$CHANGE_ID \
-Dsonar.pullrequest.branch=$CHANGE_BRANCH \
-Dsonar.pullrequest.base=$CHANGE_TARGET \
-Dsonar.pullrequest.bitbucketcloud.owner=*** \
-Dsonar.pullrequest.bitbucketcloud.repository=*** \
-Dsonar.includeModules=*** \
-Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml

I am using the UUIDs returned from the Bitbucket API for ‘owner’ and ‘repository’.

The analysis completes successfully (I can view the report) and the summary widget is added to the pull request showing the outcome of the expected failed quality gate. But the PR is not decorated with any warnings at the offending lines of the relevant files.

SonarCloud is listed in the installed apps in Bitbucket at Workspace settings → Installed apps.

This is the first repo I have used with SonarCloud.

How do I fix the warning and get the PR decoration to work?

Welcome to the community!

Inline annotations should be visible when using the Code Insights feature of Bitbucket Cloud. Do you see a sidebar titled “report” on the right when you view the pull request? I’m talking about a sidebar that looks like this, from an example project of mine:

This sidebar should be visible when using the New pull request experience is enabled in your Bitbucket Cloud account settings. As far as I know this has been the default for some time. Without this sidebar, you won’t be able to see annotations inline, the only pull request review information available in that case is the widget.

I started a private thread with you to debug the warning you see. The warning doesn’t make sense, because if you see the widget, then your configuration seems complete to me. I’m curious if you got that warning on the same analysis where you see the widget, or if it’s from an earlier analysis that may not have had the correct configuration yet. Please confirm!

Yes, I’m using the new pull request experience and I can see the report section but there is no sonarqube report attached.

I’ve done multiple analyses while experimenting with the configuration in an attempt to get it working so it would be difficult to answer that with certainty. I could create a new PR with the latest configuration and see what that generates.

Triggering a new analysis on any of those PRs (or creating a new) would make that clear.

If you still don’t see the decoration, then please respond with your project details on the private thread I started.

Let me know how that went!

So, I created a new PR and started again. With the following properties, there is no widget, no PR decoration and no report attached.

Dsonar.pullrequest.bitbucketcloud.owner=owner uuid
Dsonar.pullrequest.bitbucketcloud.repository=repo uuid

There’s also the following warning on the Sonar dashboard:

Pull request decoration did not happen. Please install SonarCloud application on the Bitbucket Cloud repository’s organization or user: ‘’

1 Like

I ran another analysis with {} around both uuids. I’ve now got PR decoration and a report attached. But no code quality widget.

1 Like