Pull requests

Review a pull request

Open a pull request from the repository's Pull requests tab. Anyone with read access can read it; reviewing, merging and moderating depend on your repository role.

Read the changes

A pull request has three tabs:

  • Conversation: the description, checks, comments and reviews.
  • Commits: the commits in the change, newest first. Select one to inspect it.
  • Files changed: the diff, with inline review threads. Use the file tree to jump to a file; the toolbar shows the total lines added and removed.

The header names the source and target branches. A pull request from a fork shows its source as owner:branch, or deleted fork if the fork is gone.

When new commits arrive, the comparison refreshes. Review the latest changes before approving or merging. Earlier reviews stay attached to the commits they reviewed; whether an approval still counts depends on the repository's rulesets.

To read a pull request from the terminal, run cafe pr view <number>, or cafe pr diff <number> to list changed files. Add --patch for the patches, or --path <file> for one file.

Comment on lines

On Files changed, press + on a diff line to open a comment form. To comment on several lines, select the range and press + at one end.

  • Add single comment publishes the comment immediately.
  • Start a review (then Add review comment) adds it to your pending review. Nobody else sees pending comments until you submit.

Replies to an existing thread are always published immediately. Pending comments show a Pending mark and can be edited or deleted until you submit.

Submit a review

While you have pending comments, a bar above the diff shows how many. Choose Review changes (or Review in the pull request header), write an optional summary and pick a verdict:

  • Comment: general feedback.
  • Request changes: the change should not merge as is.
  • Approve: the change is ready.

Submitting publishes the review and all its pending comments together. Discard review deletes the pending review and its comments.

A pending review belongs to the revision it was started on. If the pull request is updated, you can no longer add to it: discard it and review the current revision.

Track viewed files

Tick Viewed on a file to collapse it and move to the next one. When you are signed in, viewed files are remembered across browsers for the same revision; they reset when the pull request is updated.

Organize the review

Depending on your role, the sidebar lets you request reviewers, set assignees, labels and a milestone, see checks for the latest commit, and lock or unlock the conversation. The author or a maintainer can edit the title and description with their pencil buttons.

Maintainers can hide or unhide a comment from its menu and dismiss a review from its card. Hidden comments keep their place in the discussion; dismissed reviews stay visible, marked as dismissed.

If someone else changes the pull request while you are editing, reload, review their change and try again.

Read as MarkdownGitCafe documentation
Documentation