BitBucket Cloud Pull Request Inline Comments

Hello SonarCloud team,

The company I work for just started using your product and it has been filling our needs very nicely. However, one area where we find it lacking is with the BitBucket pull request decoration.

Another product we were trying out called Codacy had this great feature where automated comments in the diff view of the pull request would be generated containing any issues that were found in its scan. It also generated a top level comment with how certain metrics would change based on the addition of the new code, like complexity, number of issues, etc. From what I understand, you have a similar integration with GitHub, but the integration for BitBucket Cloud is still in the works:

https://sonarcloud.io/documentation/integrations/bitbucketcloud/#upcoming-features-and-improvements
https://jira.sonarsource.com/browse/MMF-1871
https://jira.sonarsource.com/browse/MMF-1219


We were able to enable the repository overview widget on BitBucket’s source view for our projects and also display the Quality Gate widget on our pull requests, but that’s the most we could get out of the SonarCloud add-on. We also tried using the 3rd-party Sonar for BitBucket Cloud add-on available on the BitBucket marketplace from Mibex, but after messaging their support, they informed us that they do not support inline comments for SonarCloud.

I was wondering if you have any updates on the progress of this inline annotations feature for BitBucket Cloud pull requests and any info on when it may be released. This feature would make the code review process immensely more streamlined and our code reviewers would prefer to see all of the relevant pull request information in one view. Thanks for your help!

Hi @miles,

Welcome to our community forum and thanks for our message, you did a deep research here! :slight_smile:

We are currently working in collaboration with Atlassian to bring annotations directly in the PR, this is one of our biggest priority for our integration with BitBucketCloud, so be assured that we will do what we can toward this direction.

Thanks for your patience.

Cheers,

3 Likes

Hi @aurelie,

Thanks so much for your response! Any updates on the progress of this feature?

Hi @miles,

Thanks for pinging here :slight_smile:
We have a first step, that you can try out. We can bring the list of issues, and you can identify the lines impacted inside the PR. Yet they are not inline annotations per say for now, and it’s planned to continue to work with Atlassian to bring this in the future.

To try this out:

  • Enable the new Pull Request experience in the Labs
  • Analyse a PR
  • SonarCloud creates a Report with the list of annotations
    image

Happy to get your feedback on this!

Thanks,

Thanks so much for the update @aurelie! :slightly_smiling_face:

I tried this out myself and it seems like a great first step towards a full integration between SonarCloud and BitBucket Cloud’s pull requests. I will pass this along to the code reviewers at my company and see if they have any feedback to report back. I’m looking forward to the future progress of this integration and I will be sure to check back in a couple months for any status updates.

Hope you and your team at SonarSource are all feeling safe and healthy!

3 Likes

Nice to see that PR decoration for code smells and bugs is supported now. Is there an ETA on when PR decoration for code coverage will be supported between sonar cloud and bitbucket cloud?

Thanks!