-
-
Notifications
You must be signed in to change notification settings - Fork 530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Bitbucket PR reports #586
Conversation
Looks good to me! Hit by the same issues right now. |
Excuse me for hijacking this PR, but after applying your changes the report could still not being send to Bitbucket Server. Bitbucket complains about a missing field "value". The error message is in German, unfortunately. "Wert" translates to "value".
I'll take a deep dive into this next week. But maybe somebody already experienced this as well. This is what is being sent to Bitbucket: https://gist.github.com/cybe/f585dcc4b21b5630811ab747a7effed8 |
...a/com/github/mc1arke/sonarqube/plugin/almclient/bitbucket/DefaultBitbucketClientFactory.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see feedback.
0814f82
to
f090d21
Compare
Repository slug and project key got mixed up for the Bitbucket server config causing Sonar to not find the repo defined in the ui on Bitbucket
f090d21
to
1f79175
Compare
Yes, the code previously forced a Zero on null value. I'll add a check for this. |
Bitbucket throws an error when a report contains a percentage element with a null value. The code coverage and duplication metrics are now nullable in the report data passed around the plugin, bit the Bitbucket decorator does not check or replace nulls from these fields. This change alters the report publishing to check for nulls in either of the coverage or duplication fields and uses Zero in their place.
@cybe Are you able to test the snapshot from this PR to see if it fixes your issues? |
Any chance this can be released soon? |
With the Sonar 9.4 support the project key and repository slug for Bitbucket repositories got swapped, causing the plugin not being able to find the repository to send the PR report to.
The available ObjectMapper modules also had to be registered in order write the report timestamp to JSON.