sonar-cnes-report
sonar-cnes-report copied to clipboard
Cannot generate report from Pull Request
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 , 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.
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...
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 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?
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.
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.
All good, thanks for letting me know! In the meantime I'll skip generation for PRs!
I'm also interested in this issue, but from the perspective of the command line tool.
Hi @lobbin When we will implement this feature (can't say when), it will obviously be on both standalone and plugin mode. ;)