In bitbucket cloud repositories after PR gets merged reports are not showing
Asked by Ameer sohail:

We setup SonarQube self hosted server and integrated with Bitbucket using sonar document.  
<https://docs.sonarsource.com/sonarqube/latest/devops-platform-integration/bitbucket-integration/bitbucket-cloud-integration/>  
Setup is done using OATH consumer in SonarQube reports are generating but not showing in repos after PR gets merged and in pipeline section.  
Verified by using below reference of your FAQ **SonarQube scanner don't show report in pipeline section**   
<https://community.atlassian.com/t5/Bitbucket-questions/SonarQube-scanner-don-t-show-report-in-pipeline-section/qaq-p/1890579>  

Attached screenshots for reference.  

Can you please suggest what to do so that reports can be shown in pipeline section and PR merged.  

You can connect me on \<email_removed_for_privacy\>  
![Screenshot 2023-12-28 at 17.23.59.png](https://community.atlassian.com/t5/image/serverpage/image-id/298333i5EC9EC257F0515EE/image-size/large?v=v2&px=999 "Screenshot 2023-12-28 at 17.23.59.png")![Screenshot 2023-12-28 at 17.24.27.png](https://community.atlassian.com/t5/image/serverpage/image-id/298334i74BD7D372EFB36D8/image-size/large?v=v2&px=999 "Screenshot 2023-12-28 at 17.24.27.png")


Answers:
author: Theodora Boudale
body: Hi [@Ameer sohail](/t5/user/viewprofilepage/user-id/5394437) and welcome to the community!

There are two types of reports in Pipelines:

**1. Test reporting**

* <https://support.atlassian.com/bitbucket-cloud/docs/test-reporting-in-pipelines/>

This is automatically enabled in your pipeline when it detects JUnit or Maven Surefire XML test results which include a fail. Please note that the Tests tab will only show if you have failed tests to review and it will not show if the tests are successful.

**2. Code Insights**

* <https://support.atlassian.com/bitbucket-cloud/docs/code-insights/>

This uses our API to upload reports to a certain commit. For these reports to show in a pull request, they need to be uploaded to a **commit of the source branch of the pull request** (they will not show if the build runs on the merge commit and uploads the report to the merge commit of the PR).

The pipe you are using, **sonarsource/sonarqube-scan**, is not developed by Atlassian but by SonarSource. Usually, pipes generate the second type of report, but as this pipe is not developed by Atlassian, I am not 100% sure if that is the case.

You can reach out to SonarSource's forum as they provide support for this specific pipe to double-check whether this pipe generates reports and which of the two types of reports:

* <https://community.sonarsource.com/tags/c/sq/10/bitbucketcloud>

In case the pipe generates the second type of report, ++does the commit that this build is running for belong to the source branch of a pull request++ ? If so, can you see the report in the pull request on the right-hand sidebar, in the section **Reports**?

Kind regards,  
Theodora

comments: author: Ameer sohail
body: Hello Theodora,  

For your question  
does the commit that this build is running for belong to the source branch of a pull request? If so, can you see the report in the pull request on the right-hand sidebar, in the section **Reports** ?  

Ans: the commit that this build is running for belong to the source branch of a pull request: Not source branch, its not showing for source branch nor destination PR merge branch.  

can you see the report in the pull request on the right-hand sidebar, in the section **Reports:** No reports are not coming.  


author: Theodora Boudale
body: Hi Ameer,

Thank you for your reply.

I would suggest reaching out to SonarSource's forum <https://community.sonarsource.com/tags/c/sq/10/bitbucketcloud> to ask whether this pipe indeed generates reports and if so, which of the two types of reports I mentioned in my first post.

In case it does generate reports, you can ask in the forum for help troubleshooting why your reports don't show. This pipe is not developed by Atlassian so I don't have any knowledge of what exactly it does and if this is expected behavior or some configuration issue.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud