Unable to enable automatic Pull Request detection

  • SonarQube Developer, Azure Devops
  • Trying to enable PR detection and decoration

Our instance of SonarQube is able to detect branches but the pull requests section remains blank. I have also added a branch policy status using “SonarQube/quality gate” mentioned in the Azure DevOps integration documentation. The status check is stuck on waiting when a PR is created.
Things I’ve done:

  • Made sure our instance is connected properly to ADO
  • Made sure the project itself was connected to the proper repo in ADO
  • Try to use manual parameters within our build YAML
  • Update our PAT token within SonarQube
  • Update our service connection within ADO
  • Added a build validation within ADO for the branch

How SonarQube looks within our YAML (without manual properties). Prepare is at the beginning of our build after our dotnet restore step while analyze/publish are at the very end.

  - task: SonarQubePrepare@5
    condition: eq(variables['SonarQubeScan'], 'true')
      SonarQube: 'xxx_SonarQube'
      scannerMode: 'MSBuild'
      projectKey: 'xxx'

  - task: SonarQubeAnalyze@5
    condition: eq(variables['SonarQubeScan'], 'true')
    continueOnError: True

  - task: SonarQubePublish@5
    condition: eq(variables['SonarQubeScan'], 'true')
      pollingTimeoutSec: '300'
    continueOnError: True

Hey there.

Have you configured the DevOps Platform Integration under your Project Settings on SonarQube?