AzureDevOps PR decoration issue with SonarCloud


currently our organization completed the SonarCloud and AzureDevOps integration. We are successfully seeing the quality gate result in the build. But I’m having issues adding the status check to PR’s.

I’m following the guide laid out here:

But I can’t find the SonarCloud/quality gate in the dropdown of “Add status policy” when trying to add a status check.

After reading the forum I found that it should be available after the first SonarCloud scan, so I’ve fully setup the main branch scanning (not just the integration branch) to be sure that at least one scan is done on main branch properly. But the selection still doesn’t appear.

I’ve tried to just add it to the status policy, and that seems to work, the status check appears in the PR but is in a constant “waiting” status.

Also, from the setup perspective: AzureDevOps PAT has been added to SonarCloud and SonarCloud service has been added to AzureDevOps.

What other actions could I take to mitigate this?

Hello @VytautasB welcome to the community !

How did you setup your Pull Request build ? Can you share a log (preferably in debug) of it please ?

Thanks !

We are getting a similar problem. Our PR quality check gets run fine and is published in the SonarCloud dashboard. We have a subsequent step to publish the results to the PR which passes, but there’s no PR decoration. We also tried adding the status check that Vytautas B mentioned and it also just sits in a “waiting” status forever. It just appears that Azure Repos has no idea that a SonarCloud scan has actually happened.