The changes since your last review on a Bitbucket pull request
When the author pushes again after your review, Bitbucket can show only what is new. Below is how Bitbucket Cloud and Bitbucket Data Center do it, and what becomes of comments on lines that changed, from Atlassian's Review code in a pull request (Cloud), Review and discuss a pull request (Data Center) and the REST API definitions.
Bitbucket Cloud
- The files changed filter shows all changes, just the changes since last review, or one commit or a selection of commits from the Commits list.
- Viewed: the checkbox on a file's header marks it as viewed; the file collapses and stays collapsed when you come back. When new commits to the source branch change a file you marked, Bitbucket resets its Viewed status, so you know to review it again.
- Comments on lines that changed: when the content of a commented line is removed, the comment becomes outdated and leaves the diff. A button with a number at the top of the file's diff shows the comments on previous versions; an outdated thread is reopened from there.
Bitbucket Data Center
- Iterative reviews: in the diff view, the Change Scope selector picks one commit to review, or all changes in the pull request. When you return to a pull request you reviewed before, you see only the commits added since your last review.
- Comments on lines that changed: Bitbucket moves comments along when lines are added or removed. When a commented line is removed, the comment stays in the activity, and Bitbucket marks its diff as outdated; the hidden comments also show under other comments.
- The Commits tab lists the commits that will be merged; those already merged are greyed out.
The REST calls
- Data Center:
GET /rest/api/latest/projects/{project}/repos/{repo}/pull-requests/{id}/changestakeschangeScope:UNREVIEWEDfor the current user's unreviewed changes (if there are any),RANGEwithsinceIdanduntilIdfor the changes between two commits, orALL(the default). A comment whose lines changed has"orphaned": truein its anchor. - Cloud:
GET /2.0/repositories/{workspace}/{repo}/pullrequests/{id}/commitslists the pull request's commits, andGET /2.0/repositories/{workspace}/{repo}/diffstat/{newer}..{older}?topic=falsethe files changed between two of them (withtopic=trueit is the three-dot diff against the merge base instead). An inline comment'sinlinecarriesoutdated(it appears in the example responses of the API definition).
What changed since you last looked, in IntelliJ IDEA
Pull Request Inbox for Bitbucket, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, lists the Bitbucket Cloud and Bitbucket Data Center pull requests waiting for your review in an IDE tool window, with what changed since you last looked: the files changed since your last visit are flagged, and a file you marked as viewed loses the mark only when a later push changes it (files the push did not touch keep theirs). Its diff is the whole pull request, from the merge base to the newest commit. From version 1.0.48, an outdated comment is not drawn in the diff at its old line number, where other code may now be: it stays under the comments, marked outdated, and opens its file at the top. The review inbox, diffs and viewed marks are free; approving, commenting, merging and the other actions are Pro, with a 30-day trial.
Get it on JetBrains Marketplace
Bitbucket is a trademark of Atlassian Pty Ltd; IntelliJ IDEA is a trademark of JetBrains s.r.o. This page is not affiliated with or endorsed by Atlassian or JetBrains.
More: resolving comments · review requests · Request changes and Needs work · the pull request is out of date · 日本語