Review pull requests

When you click on a PR from a colleague in the review queue (default section name, Needs your review), you can view proposed changes, add your comments, and submit your review from Graphite. Anything you can do through the GitHub UI, you can do in Graphite.

The first step when reviewing a PR is to scroll through changes and leave comments in the code as you go. In Graphite, you can leave comments anywhere, not just on lines that have changed. As you leave in-line comments, the count of pending comments in the PR header is incremented, and the add review button text changes to finish review.

After you've finished reviewing the code, you can opt to complete the review and leave a final comment.

As a reviewer, you have several options:

  • request changes based on your comments

  • approve the PR if everything looks good

  • add comments without any explicit review status

  • resolve comment threads when your feedback is addressed

As soon as you provide a review, the reviewers section of the PR updates to reflect the latest review status of the PR, and moves to the appropriate section on the PR inbox page.

By default, Graphite shows you a timeline of changes, comments, and reviews for a PR in a tray on the right side of the screen:

  • Clicking a comment which references a specific line of code will scroll that change into view

  • Clicking a commit currently takes you to GitHub

To show the file tree, click the 🗂 icon in the top right corner of the right-side tray or use the keyboard shortcut F. The file tree shows you the subdirectories of all files changed in a PR:

  • Clicking on a changed file scrolls it into view

  • New and deleted filenames are highlighted green and red respectively

To enter Focus Mode and hide the right side tray altogether, click on the selected tab in the right panel to dismiss the panel altogether. You can resurface the panel by clicking on any of the tabs in the right panel, or using one of their shortcuts.

Graphite has first-class support for GIFs and memes, making code reviews lighthearted and fun!

Add a GIF through our GIPHY integration:

  1. Click the GIF icon in the comment box

  2. Enter your search text and hit Enter

  3. Click on the GIF you want to add to your comment, and hit Save to see it rendered!

Alternatively, you can select a GIF or meme from your team's meme library:

  1. Click the # icon in the comment box

  2. Click "Browse org macros"

  3. Type in your search text, or just click the GIF or meme you want to add to your comment

  4. Hit Save to see it rendered!


Tip

Every GIF and meme in your team's meme library has a shortcode to quickly add it to a review comment with /. Try typing /cathack into a comment to see this in action!


Lastly, you can upload your own GIFs and memes to your team's meme library:

  1. Click the # icon in the comment box

  2. Click "Upload new macro"

  3. Choose an image or GIF, give it a shortcode, and add it to your comment

  4. Hit Save to see it rendered!

Graphite makes it easy to review large stacks of PRs at once. From your PR inbox, click into a pull request to see the PR details, code changes, and comments.

You can see where the current PR sits and navigate to any of the other PRs in a stack with the "Show stack" button, or with the keyboard shortcut S. Starting from the bottom of the stack, you can add your comments, choose your review outcome, and move on to the next PR in the stack.