DEV Community

One Bitbucket PR had 346 comments. Seven of them were on a line of code.

If you're picking an AI reviewer for a Bitbucket workspace, the first number you reach for is the one Atlassian puts right in the PR list: comment_count. It's on every pull request object, it's sortable, it's free, and every dashboard you'd build starts there.

It's also not review volume. I pulled 53 merged pull requests from three public Atlassian repos (atlassian-event, atlassian-rest, atlassian-plugins), paginated every comment thread to the end, and counted what was actually there. The short version: comment_count is a thread-activity number, and thread activity on a real repo is mostly not review.

The cohort, and how to rebuild it

Anonymous Bitbucket Cloud REST, no token, no auth setup. Per repo:

GET /2.0/repositories/{workspace}/{repo}/pullrequests?state=MERGED&pagelen=30&sort=-updated_on
GET /2.0/repositories/{workspace}/{repo}/pullrequests/{id}/comments?pagelen=100

Then follow next until it's null. That last part matters. Bitbucket's list responses key the array as values, not value, and they paginate. If you write the obvious d["value"] loop, you get an empty array on a repo with 176 merged PRs and conclude the repo has no comments. I lost twenty minutes to that and a wrong first result.

A comment is line-anchored when it carries the inline object. The Bitbucket API swagger documents that object as from and to, the anchor lines in the old and new file versions, which is the same idea as a GitHub diff position. If inline is absent, the comment is on the PR as a whole: a top-level discussion note, a status ping, a bot log line.

Result: 53 PRs, 633 live comments

comment_count matched the number of live comments I fetched on 53 of 53 PRs, so the field isn't hiding deleted rows or task counts. It's just counting everything that has a comment body.

Line-anchored comments: 131 of 633. 20.7%. PRs with zero line-anchored comments: 33 of 53. That's the finding. In a merged-PR sample from a real codebase, the comment thread is mostly a discussion channel, and about a fifth of it points at a line of code.

One PR is more than half the corpus. atlassian-event PR 20, "Issue/vpp 243", has comment_count 346. That is 55% of the 633 comments in the cohort, sitting on one pull request. Inside it: 341 root comments, 5 replies, 4 distinct authors, and one author wrote 339 of the 346. Seven comments are line-anchored.

So the PR that looks like the most heavily reviewed change in the set is one person leaving 339 top-level comments in a thread. Drop that single PR and the line-anchored share goes from 20.7% to 43.2%. Long tails are normal, which is exactly why an average over a comment-count-selected cohort is mostly measuring one outlier. This is the same trap as ranking reviewers on raw finding counts per PR: the findings number tracks diff size and the comment number tracks who felt like typing.

The other end is atlassian-rest PR 737, "Upmerge 7.2.x into 8.1.x": 56 comments, zero line-anchored, one author, a bot. That's a merge train logging its progress, and it looks identical to a heavy review if all you read is the count.

Across the 53 PRs, 21 had a single author writing more than 80% of the comments. Twenty had exactly one comment author. Seven had no comments at all. Median live comments per PR: 2. Mean: 11.9. The mean is four times the median, which tells you the distribution is doing the work, not the average.

Why this lands hardest on AI review

On GitHub the unit is split for you. A pull_request_review_comment is by definition anchored to a diff position, and the summary lives in a separate reviews object, as the GitHub REST review comments docs describe. Bitbucket doesn't split it. There's one comment object, and it can be a diff comment, a reply, a status ping, or a bot writing "Upmerge succeeded." Whether something is review is a property of the object you have to read, not a property of the endpoint you called.

Add an AI reviewer to a Bitbucket repo and its output lands in that same pool. Compare two reviewers by counting comments, or measure "review volume" by summing comment_count across a repo, and you've built a metric where a chatty bot and one verbose engineer outrank a reviewer that flagged 40 real lines. Same denominator problem as the GitLab Duo resolve rate and the contribution graph: the numerator is easy and the denominator is a choice you didn't make. Rank reviewers by comment_count and you're ranking thread noise.

The four fields to pull instead

For any Bitbucket PR, this is one paginated call away. Log these per PR:

  • comment_count, the platform's number, kept only as the denominator
  • line-anchored count: comments where inline is present
  • distinct comment authors
  • the top author's share of the total

A PR is review-shaped when the line-anchored count is a meaningful fraction of the total, more than one author is talking, and no single author owns nearly everything. 56 comments, 0 line-anchored, 1 author is automation. 68 comments, 62 line-anchored, 7 authors is review. You can classify a whole repo's history with those four columns and no LLM in the loop.

If you're comparing reviewers on Bitbucket (CodeRabbit, Qodo/PR-Agent, Kodus, and anything else that posts as a commenter), run each over the same fixed slice of merged PRs and report line-anchored findings per PR and per 100 changed lines. Comment totals alone tell you which one talks most, not which one reads the diff. The Azure Repos thread model has the same shape and is worse for auditing, because almost every thread there is a system event rather than a comment at all.

Two limits on this sample

It's 53 PRs from one workspace, and no AI reviewer was present in the cohort. These are human threads plus repo automation, which makes this a baseline for normal Bitbucket thread volume, not a benchmark of any tool. The 20.7% figure would move with the repo, the team, and the language. The mechanism (comment_count counts comment bodies, and inline is the only signal that one is about a line) doesn't move.

Second, a caveat on the stale-anchor case. On GitHub, a review comment whose line anchor has gone stale returns line: null while original_line stays set, so line == null is a revision signal and not missing data. Bitbucket's inline object has the same shape problem in reverse: it's present or absent, and I didn't test whether it survives a force-push that moves the anchored line. Worth knowing before you build a dashboard on it.

Two things I'd want before drawing a harder line: a repo with an AI reviewer installed, to see whether the line-anchored share goes up, and a same-PR before/after on one tool. That's the next run.

Read on DEV Community ↗ ← Back to News

Comments

No comments yet. Start the discussion.