Bitbucket Cloud Pull Request widget not showing the new code measures

Hi @Gregoire_Aubert and @TomVanBraband, thank you for the fix but I think there is still a problem with the behavior of the widget since it is still showing the main code coverage and duplicated lines instead of the new code data. Also still not showing new bugs, code smells or vulnerabilities.

Sorry if this is not the right thread to talk about this but I think it’s related and I believe that the interesting data on a PR is everything existing under the new_ prefix, isn’t it?

image

Hello Daniel,

I moved your issue to a new thread so we can focus on this other issue.

Indeed there is something weird going on there, the value under the new_ prefix should be displayed…

Thanks for already sharing the data that you have under the measures field, could you share everything that you receive from this api endpoint to help us reproduce the issue ? (of course don’t forget to obfuscate any information that you don’t want to share like, the projectKey or projectName,…)

Thanks! The API endpoint is: https://api.bitbucket.io/addons/sonarcloud/<project_name>/repositories/<repo_id>/pullrequests/<pr_id>/code_quality

And it returns:

image

The weird thing is that isPullRequest is marked as false when, in fact, the call is done from a PR. Maybe is some wrong setting on my side?

Thanks for the payload!

Indeed it’s weird that you have this flag to false. It means that your PR is actually analyzed as a short-lived branch and not as a PR. So I suppose that in SonarCloud you are seeing your PRs under the “Short-lived branches” section when you open the branch dropdown, like on this screenshot :
image

But still it’s an issue and the widget should correctly display the new code values for short-lived branches too. I’m gonna create a ticket on our side and fix it asap.

Now regarding your configuration, I’m wondering how you ended up analyzing your PRs as short-lived branches ? Do you have a custom CI where you manually configured your PR analysis ?

A fix has been deployed, and the widget should load correctly again on your PRs!

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