Review a pull request

The Pull Requests tab in the lower area of the Git view lists the pull requests of the remote on the left and shows the selected one on the right. Open it with Git › View Pull Requests. It needs a configured token, see Set up pull requests.

Find a pull request

The toolbar of the list holds a state filter (All, Open, Merged, Closed), the field Search PRs… and ↻ to reload. The search matches title, author and number. Open includes approved pull requests and those with requested changes. Git › Refresh Pull Requests reloads as well.

Each row shows the number, a state badge, DRAFT for drafts, the title, the branches and the author.

BadgeState
OPNopen
APRapproved
RVWchanges requested
MRGmerged
CLSclosed or declined

Read the pull request

Click a row. The header shows number, state, title and ↗, which opens the pull request in the browser. Below are the branches, the author, the number of changed files and the added and removed lines. On the right are the check status and Merge ▾.

The check badge reads ✓ Checks, ✗ Checks or ⋯ Checks for running checks. Hover over it for the failed, pending and passed checks. Without checks there is no badge.

Three tabs show the content:

TabContent
ConversationDescription, review threads, the comment field and the review verdict.
FilesChanged files and a side-by-side diff.
CommitsCommits with short hash, author, date and message.

Read the changed files

In the Files tab, the list shows each file with its status and the added and removed lines. Click a file to show its diff. The diff opens at the first change. Open in Code Editor opens the whole file from the working tree in the editor.

Lines with inline comments carry a blue dot next to the right-hand side. Hover over the dot to read the comments.

Comment on a line

  1. In the Files tab, select the file.
  2. In the diff, click the margin left of a line on the right-hand side.
  3. In the box New comment on line n, enter the comment.
  4. Click Comment.

The comment refers to the latest commit of the pull request. Comments span a single line.

Work through the threads

The Conversation tab lists the threads, each with its replies indented. The bar above them counts the open threads, for example "2 of 5 threads open". What open means depends on the provider, see Review threads.

To hide the threads that are no longer open, select Only since last push (GitHub) or Hide resolved (Bitbucket). Threads that are not open stay visible otherwise, but dimmed.

The same bar holds Copy as Markdown, Create Entry from Review… and Fix with AI. They act on the whole review, see Pull requests and the AI.

The header of a comment can carry these badges:

BadgeMeaning
review · approved (or another verdict)The comment is a review summary.
on file:lineInline comment and its position.
outdatedThe commented lines have changed since. The position no longer exists in the diff.
resolvedThe thread is resolved on Bitbucket.
before last pushThe comment was written before the latest push.

Below each thread:

ControlEffect
ReplyOpens a reply field. Send Reply posts the answer.
CopyCopies the thread as Markdown.
Fix with AIHands this thread to the AI. See Pull requests and the AI.
Create Projectdocs Entry…Keeps the thread as a projectdocs entry. See Pull requests and the AI.
↗Opens the comment in the browser.

On GitHub, replies to inline comments land in the thread. A reply to a conversation comment or a review summary is posted as a new conversation comment that quotes the original. The reply field says which applies.

Apply a suggestion

A GitHub inline comment can contain a ```suggestion block with replacement code. Below such a comment, Apply suggestion writes the code into the file in the working tree. It replaces all lines the comment covers.

Prerequisite: the source branch of the pull request is checked out. On another branch the button is disabled.

The change is not committed. Review it in the working changes and commit it as usual. Outdated comments have no Apply suggestion, because their line numbers no longer match the file.

Comment and give a verdict

The field at the end of the Conversation tab takes a comment or the text of a review.

ButtonEffect
CommentPosts the text as a conversation comment without a verdict.
Request changesSubmits a review that requests changes. Needs a text.
ApproveApproves the pull request. The text is optional. Shows Approved ✓ once the pull request is approved.

On Bitbucket the comment is posted first, then the verdict. The pull request stays open in both providers.

Merge

  1. In the header of the pull request, click Merge ▾.
  2. Select Create a merge commit, Squash and merge or Rebase and merge.

The provider merges the pull request. On Bitbucket, Rebase and merge is a fast-forward merge.

Merge ▾ is disabled when the pull request has merge conflicts. Update the source branch first: merge or rebase the target branch into it and resolve the conflicts, see Merge conflicts. Failed checks and a missing approval only appear in the tooltip. The provider refuses the merge if the repository requires them. Merged and closed pull requests have no merge button.