Bitbucket support did not find anything wrong on their side. The issue happens for every pr for everyone in the company.
there is one company workspace which is the owner of all the repositories. Every team has its own sonar cloud account which is linked to their bitbucket team account organization. The team account is the same workspace as everyone his/hers personal account (company workspace). When we manually link projects to bitbucket we use the team account.
This all worked fine till friday 26 march. The api call to retrieve the code quality no longer displays any data and therefore the widget is not shown. The strange thing is that the widget on the repository overview page is still working. We do not link our scans to bitbucket pull requests (we do short lived branch analysis) this was no issue since it apparently still linked pull request by the branch name. Since this week we do link the pull request with the required sonar scan params so we also get the nicely decorated pull request future. But this did not fix the issue we had before.
What does work is the following: if the user is the owner of the repository / workspace the widget will show on pull request and the code_quality api call contains data. But since the company is the owner of all the repositories this does not work for non personal repositories. Yeah it does sound like a permission problem but permissions has not been changed (checked with the people who manage bitbucket).