How to disable automatic Pull Request recognition (and decorators) in AzureDevOps?

Dear community,

System informations:

I want to execute analysis on builds (AzurePipelines), triggered by a PullRequest (in AzureDevOps), but without SonarQubes PR feature.
Currently, I get the error message, to use the properties sonar.pullrequest.key, sonar.pullrequest.branch and sonar.pullrequest.base.

Previously we used SonarQube 7.1 and was able to run SonarQube analysis on AzureDevOps PullRequests.

I searched for options, to disable this behaviour and looked up the configuration file of SonarQube as well the administration page.

Is there a way to configure SonarQube, to run analysis on PR-Commits?

Thanks in advance,
Julian

1 Like

Hi,

Just so we understand correctly what you want : Do you want to skip the whole analysis, or just avoid PR decoration (with automatic comments on Azure DevOps side).

From what we read, i don’t think this is possible since the PR decoration is part of the Pull request analysis experience.

About the error message, could you please explain us where you found it ? It that on the UI, on Azure DevOps side ?

Thanks.

Mickaël

1 Like

Hi,

I want to avoid PR decoration.
Is there a way to analyse Pull requests, without Pull request experience?

I found the error message on AzureDevOps in the build logs.

Thanks,
Julian

The only solution i saw i to trigger a build on the branch that has the PR, but withouth ‘automatic’ triggering based on the PR rightly.

Did you tick ‘Enable PR validation’ in the Trigger of your build pipeline ? Is yes, you can just unitck it and keep an automatic build just above which normally should be taken in account a simple branch in SonarQube analysis.

Mickaël

1 Like

Putting aside the how, can you help me understand the why with regard to why you want to turn off PR decoration?

Thanks for you answer, this works. I had to untick ‘Enabled PR validation’.

In my understanding PR-Builds (single merge commits) cannot be analysed anymore like in SQ version 7.1 (Community Edition).

Thanks,
Julian

1 Like

I used version 7.1 of SonarQube Community Edition. There it was able to have automatically triggered validation builds in AzureDevOps that analysed the current Pull request.
Since I updated SonarQube to 7.9, this is not possible, because it assumes that I want to use the Pull request experience.
This caused errors to my unchanged build pipelines and pull request configurations.

My goal is, to use it the same way, as before.

But as I read through the release-notes, this might not be possible.
Either I trigger manual some analysis executing build pipelines (like @mickaelcaro mentioned) or I upgrade to Developer Edition.

Thanks,
Julian

1 Like

Julian,

Ah, sorry, I missed the part where you mentioned Community Edition.