Disable pull request analysis for sonarcloud.io when SonarCloud Automatic Analysis is used

2.6k Views Asked by At

Is there a way to disable pull request analysis for sonarcloud.io when SonarCloud Automatic Analysis is used for a Github repository?

I need the long-lived branches analysis only, but I get all team PR's analyzed.

What's the way to disable analysis for the PRs?

2

There are 2 best solutions below

0
On

you have just to disable automatic analysis of your code with sonarcloud

enter image description here

0
On

For your problem you have to disable automatic analysis of your code with sonarcloud (you have switch possiblity in settings of your project overview).

And next steps is to create github actions with SONAR_TOKEN to analysis only what you want and when you want.

I link the documentation about this : https://docs.sonarcloud.io/advanced-setup/ci-based-analysis/github-actions-for-sonarcloud/.

Enjoy !