Read Anthropic’s case study about Graphite Reviewer

How to use GitHub’s review requests feature

Sara Verdi
Sara Verdi
Graphite software engineer
Try Graphite


Note

This guide explains this concept in vanilla Git. For Graphite documentation, see our CLI docs.


Review requests on GitHub allow you to specify who should review your code. This guide covers how to effectively use GitHub's review requests feature to simplify code review processes.

To begin using review requests on GitHub, navigate to the pull request you want to submit for review. Once there:

  1. In the pull request page, find the Reviewer section on the right-hand side.
  2. Click on the gear icon to open the reviewer selection menu.
  3. You can then search for specific team members or select from a list of suggested reviewers based on past collaborations.

screenshot of reviewer list

After accessing the reviewer selection menu:

  1. Type the name of the GitHub user you wish to assign and click on their name to add them to the review.
  2. If you want to request reviews from a team, type the team's name. GitHub will notify all members of that team.

GitHub allows you to automate the assignment of reviewers using CODEOWNERS files. This file is stored in the repository and specifies which users or teams are responsible for reviewing changes to certain files. Here’s how it works:

  1. Create a CODEOWNERS file in your repository’s root, .github, or docs directory.
  2. Add rules using the pattern path @username or path @teamname to assign reviewers based on the file path.

Graphite's PR inbox feature helps you stay organized by displaying which PRs need your attention. Here’s how to use it effectively:

  • Inbox sections: By default, sections like "Needs your review," "Approved," and "Waiting for review" help you organize your tasks.
  • Custom sections: You can add new sections with custom filters and preferences to better manage your workflow.
  • Sharing and syncing: Configure and share section settings with your teammates to ensure everyone is aligned.

When you're assigned to review a code pull request:

  1. Navigate to the pull request through your dashboard or Graphite PR inbox.
  2. Review the code changes, comment with feedback, and if everything looks good, approve the pull request.
  3. If changes are required, request changes and specify what needs to be addressed.
  • Be clear and specific in your feedback to ensure the author understands your suggestions or concerns.
  • Regularly review and update your list of default repositories in the PR inbox to reflect your current projects and priorities.
  • Utilize draft pull requests for work in progress. This can help you get early feedback without the pressure of immediate completion.

Utilizing GitHub's review requests alongside Graphite's PR inbox enhances the precision and efficiency of your code review process. These tools not only facilitate smoother collaboration among developers but also drive substantial improvements in code quality through structured review practices. By embedding these systems into your daily development workflow, you're equipped to conduct more strategic, impactful code reviews that accelerate team progress and foster a high-standard coding environment.

Built for the world's fastest engineering teams, now available for everyone