sonar-cnes-report icon indicating copy to clipboard operation
sonar-cnes-report copied to clipboard

Cannot generate report from Pull Request

Open Sancretor opened this issue 4 years ago • 9 comments

Expected behavior

The cnesreport should be able to generate a report from a Pull Request.

Actual behavior

On the plugin web page, a dropdown allows the user to select the branch on which the report should be based.
The branches (long-lived & short-lived) are available, but not the pull requests.

Steps to reproduce behavior

  • Analyze a project with SonarQube
  • Go to the plugin page on your SonarQube web interface
  • Select your project
  • Click on the branch dropdown to list all available branches

Detection version

3.2.2

Sancretor avatar Jul 28 '20 14:07 Sancretor

@Sancretor , why was this issue closed? Was this enhancement implemented?

It's a nice enhancement for those use cases where only the target branches and the pull requests are analyzed and the feature branches are skipped.

xabolcs avatar Sep 08 '21 23:09 xabolcs

Hi @xabolcs I guess it was because nobody seemed interested and it was not that much useful for us too. But if you're interested, I could reopen this issue. Can't make any promise regarding when we'll be able to implement it though...

Sancretor avatar Sep 10 '21 12:09 Sancretor

But if you're interested, I could reopen this issue.

It would be nice to reopen. Thanks

Can't make any promise regarding when we'll be able to implement it though...

Fully understandable! :ok_hand:

At first sight, sed -i -e 's/branch=%s/%s=%s/' src/main/resources/requests.properties would be a good start for a quick and dirty hack! :see_no_evil:

xabolcs avatar Sep 10 '21 13:09 xabolcs

@xabolcs I just tried replacing all occurrences of branch=%s with %s=%s like your first sight quick and dirty hack suggests but had no luck. Did you make any further progress with it?

renedupont avatar Oct 13 '21 16:10 renedupont

Hi @renedupont Unfortunately, it won't be that simple, we'll have to modify both the web interface & the API calls to enable both branches and PRs. I can't tell when we'll be able to work on this feature, as we already put a lot of effort to release the SQ 8.9 compatibility version.

Sancretor avatar Oct 13 '21 16:10 Sancretor

Hi @renedupont , that was my bet it wouldn't be so easy! :upside_down_face:

As @Sancretor wrote, you had to hack more ... :confused:

I had no time for trying to solve this issue, sorry.

xabolcs avatar Oct 13 '21 18:10 xabolcs

All good, thanks for letting me know! In the meantime I'll skip generation for PRs!

renedupont avatar Oct 14 '21 09:10 renedupont

I'm also interested in this issue, but from the perspective of the command line tool.

lobbin avatar Feb 10 '22 10:02 lobbin

Hi @lobbin When we will implement this feature (can't say when), it will obviously be on both standalone and plugin mode. ;)

Sancretor avatar Feb 11 '22 17:02 Sancretor