How can I get my pull request analysis published to the sonarcloud branch?

I’m trying to analyze the new code that arrives in my development branch through a pull request in azure devops, but in sonar cloud the analysis is published separately and I need it to be published in my main branch of sonarcloud

Those are the configuration I have in the analize task of my pipeline

sonar.projectKey=webhelp_app-angular
sonar.projectName=app-angular
sonar.pullrequest.branch=dev
sonar.sources=.
sonar.exclusions=/assets//,/node_modules//,/e2e//,src/**/.spec.ts,/testresults//*
sonar.language=javascript
sonar.sourceEncoding=UTF-8

In my project in sonarcloud I have enable pull request decoration

Hi,

Welcome to the community!

I’m really not understanding what the problem is…

 
Ann

What I need is for the analysis made from a pull request to be published in sonar in the branch and not as a pull request

I have done several analysis of pull request to dev branch, but in sonarcloud those analyzes are separated from the dev branch, the dev branch is still without results, and I need to see a single metric

This worked previously, but not now

Hi,

So you want this showing up as branches rather than PRs? Would you mind sharing why?

Probably what’s happening is that analysis is automatically detecting the PR and passing the appropriate parameters to make it a PR analysis.

You may need to back up to your pipeline configuration and make sure that analysis is run for all branches and no PRs.

 
Ann

Hi
The idea is to have a single analysis report on the branch for when new code is analyzed.
But I think that sonarcloud made some change and this is no longer seen like this, and the pull requests appear separated

Hello

I haven’t managed to solve it yet, basically the need is for the results of the pull request analysis to be published in the main branch in sonarcloud.

This was achieved a couple of months ago just by enabling the PR decorator integration, but it stopped working like that.

Could you help me?

Hi,

So just analyze the main branch after merge…?

 
Ann

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.