PR status check and decoration no longer working

Dear team,

  • ALM used: Azure DevOps
  • CI system used: Azure DevOps
  • Languages of the repository: Java / Javascript (across ~30 repos/projects)
  • Private Azure Devops organization
  • Using the official Azure Devops integrations (SonarCloudPrepare, Maven integration (Java only), SonarCloudPublish etc)

We’ve been using Sonarcloud for a few months but the status checks for PRs have recently stopped being set. They are visible in the dropdown when configuring the branch policy and are displayed on the right hand side of the PR but are grey (rather than green or red).

Interestingly, the actual analyses are triggered in Sonarcloud and the reports are linked to the build pipelines. The issue is just with the PR decoration and status checks. We have a Conditional Access Policy on Azure Devops which may be a factor.

Please could you help with next steps.

Thanks for the great product!

Hi, Thanks.

We created a ticket internally as it appears that multiple people face this issue.

Investigating on it, we will let you know.


1 Like

For troubleshooting and trying to reproduce this issue on my side, can you please provide

  • the setup you have on the Status Policy for SonarCloud/ quality gate


  • Do you have multiple status policies within the branch ?
  • What is the scope of the PAT that is recorded on SonarCloud ?

Thanks !

Hi Mickael,

Whatever you’ve done on your side appears to be working. It seems both PR decoration and the status updates are now working again. Can this be?

In reponse to your asks:

Here is an example policy configuration and PR integration now working:


What is interesting to note on the above, is that if I edit the Sonar policy I have two items in the drop-down: “cards-offer/codecoverage” and “SonarCloud/quality gate”. Not sure why there are two and which one works? Any idea?

With regards to the PAT, it has Code Read/Write permissions. On that note, is it required to go into every project in Sonarcloud and add the PAT in the General Settings? (we have 30 repos and growing by about 5 a month)

Thank you for your insights !

I didn’t do anything on my side, but i’m glad that it is working again, let’s wait for some hours / day to see if it doens’t occur again anyway.

code coverage is a newest feature added in a previous sprint on Azure DevOps’s side, and it appears whenever you haven’t heard / set up about it in the Pull Request, but it has nothing to do with SonarCloud / SonarQube (yet)

I tried multiple setting on my side and i wasn’t able to reproduce this issue.

And for you last question, yes this is a project-wide setting for now, but we will discuss about your suggestion.

Thanks again.


Hi Mikael,

I’m back. It seems we’re having issues again.

Here is a screenshot

Here is a copy of our pipeline YAML configuration:

- task: SonarCloudPrepare@1
        SonarCloud: 'Sonarcloud'
        organization: 'XXX'
        scannerMode: 'Other'
      displayName: 'Prepare Sonarcloud'

    - task: Maven@3
        mavenPomFile: 'pom.xml'
        mavenOptions: "-Xmx3072m"
        publishJUnitResults: true
        testResultsFiles: "**/TEST-*.xml"
        javaHomeOption: 'JDKVersion'
        jdkVersionOption: "1.10"
        jdkArchitectureOption: "x64"
        mavenVersionOption: 'Default'
        mavenAuthenticateFeed: true
        sonarQubeRunAnalysis: true
        checkStyleRunAnalysis: true
        goals: "package"
      displayName: 'Package'

    - task: reportgenerator@4
        reports: '$(System.DefaultWorkingDirectory)/target/site/jacoco/jacoco.xml'
        targetdir: '$(System.DefaultWorkingDirectory)/target/site/jacoco'
        reporttypes: 'HtmlInline_AzurePipelines;Cobertura;XML;XMLSummary'
      displayName: 'Generate Code Coverage Report'

    - task: PublishCodeCoverageResults@1
        codeCoverageTool: 'JaCoCo'
        summaryFileLocation: '$(System.DefaultWorkingDirectory)/target/site/jacoco/jacoco.xml'
        reportDirectory: '$(System.DefaultWorkingDirectory)/target/site/jacoco/'
        failIfCoverageEmpty: true
      displayName: 'Publish code coverage results'

    - task: SonarCloudPublish@1
        pollingTimeoutSec: '300'
      displayName: 'Publish Sonarcloud analysis results'

    - task: SonarSource.sonarcloud.38b27399-a642-40af-bb7d-9971f69712e8.SonarCloudPublish@1
      displayName: 'Publish Quality Gate Result'

Let me know what additional info you’d need?

Hi Mikael, hope you’re well. Would you be able to take a look at my latest problem below? :slight_smile:


Can you please provide me the task id and the date/time that are related to this analysis please ?

You can find the task id in the background tasks sections, under the Administration of your project.

Thank you in advance.

Hi again,

It’s AW3EH-079uuSE64wTwHv

Hi @mickaelcaro any news on this? Thanks!