Comments in the Pull Requests Section of AzureDevOps

We are using SonarQube Cloud Enterprise and are integrating it with AzureDevOps. We have noticed a weird interaction in the Pull Requests section of AzureDevOps where the original comment of each thread spawned by SonarQube gets deleted after you begin adding comments to that thread. Then a duplicate thread is spawned with the original comment but without our added comments. So we have two threads about the same issue:

  1. One with the original comment provided by SonarQube highlighting the issue and providing context; and
  2. One with the original comment deleted–it literally says Comment deleted–and with all of our added comments.

Can we receive some help with this?

Hi @smroberts-swlaw - apologies for getting to this a bit late.

I will send you a private message to ask details about the organization you have. We need details about your organization to investigate the logs.

You can access the PM here. Only you can access it, so it’s fine to share the link.

Hi @smroberts-swlaw,

This is by design, and it comes down to a limitation on Azure DevOps’s side. Unlike GitHub or Bitbucket, ADO doesn’t expose a dedicated annotation API for third-party tools. We have to use standard PR comments instead. Because of that, when a new analysis runs, we delete the previous comment thread and post a fresh one reflecting the current results - there’s no way to update in place.

The side effect you’re seeing (replies becoming orphaned under “Comment deleted”) is a direct consequence of that approach. We do have an open ticket on our backlog to improve this behavior, so it’s something we’re aware of and want to address.

For now, the practical workaround is to avoid replying directly inside the SonarQube comment threads on ADO PRs. Those threads will be replaced on every analysis. If your team wants to discuss a specific finding, open a separate PR comment so it won’t be affected by the next scan.

Sorry we don’t have a better answer here — this one is constrained by what ADO’s API allows.