What are the options to get Governance Report per Branch

Enterprise Edition Version 9.3 (build 51899)

Need to capture the governance report for a particular merge request (not just master).

We have been investigating the Web Api and it works great, for master. When I try to get a report using &branchKey=my-cool-feature the curl command errors out. When I put it in the Web URL, I get a report for master.

Using the web api api/project_branches/list, it only shows master.

I have attempted to add my feature branch to the list of protected branches, and also make my feature branch the default branch. Still I get only master.

Another approach we are trying to capture the output is to convert the web url to a PDF and save that off for the security team.

Is it possible to use my API Token to login via the URL? Otherwise, my PDF is of the login screen.

What options does Sonarqube provide to get a Governance report for a particular branch / Merge Request?

Thanks for your help!

Hi,

Is my-cool-feature analyzed as a branch in SonarQube or as a PR?

SonarQube 9.5 (E.T.A. next week) adds “regulatory” reporting for branches in Enterprise Edition($$).

SonarQube - Google Chrome_001

We don’t have reporting for PRs since they’re ephemeral. If you really need that, then you’ll need to analyze the underlying branch as a branch - and then make sure you stay on top of housekeeping.

 
HTH,
Ann

Right, after pointing me to the docs, I’m investigating how we get our branches analyzed as branches instead of just PRs.

Thanks