How to use GitHub Projects for tracking code reviews

Sara Verdi
Sara Verdi
Graphite software engineer


Note

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


GitHub Projects provides a flexible way to track code reviews, which makes it easier to manage workflows and collaborate with teams. In this guide, we'll explore how to integrate GitHub Projects with code reviews, as well as provide some tips and examples to help you optimize your review process.

To begin using GitHub Projects for review tracking, you'll first need to set up a project board. GitHub Projects allows you to create Kanban-style boards to track different stages of your work, such as open reviews, pending approvals, and merged pull requests (PRs). Here's how to get started:

  1. In your GitHub repository, click on the Projects tab.
  2. Click New Project.
  3. Choose between the Table or Board layout. The Board layout works well for tracking code reviews since it allows you to visualize the status of each review.
  4. Name your project (e.g., "Code Review Tracking") and click Create.

Once you've created your project, you'll have a customizable board where you can define columns for different review stages.

Now that you have a project board, you'll want to organize it with columns that reflect the code review workflow. Here’s an example setup for managing reviews with GitHub Projects:

  • To Review: For PRs that are awaiting review.
  • In Review: PRs that are currently under review.
  • Needs Changes: PRs that have been reviewed but require changes.
  • Approved: PRs that have been approved and are ready to merge.
  • Merged: PRs that have been merged into the main branch.

This setup gives you a clear look at your review workflow in GitHub Projects, so you can track the progress of each review with ease.

The next step is to link your pull requests (PRs) to the project so they can be tracked as they move through the review process.

Whenever a new PR is created, you can link it to the project to track its status:

  1. Open the PR you'd like to track.
  2. In the Projects section in the right-hand sidebar, select your review tracking project (e.g., "Code Review Tracking").
  3. The PR will now appear in the To Review column of your project.

You can also automate the movement of PRs between columns using GitHub's automation rules.

To streamline review tracking, you can set up automation rules in GitHub Projects. For instance, you might want PRs to move automatically from one column to the next based on the review status:

  1. Go to your GitHub Project.
  2. Click Automation in the top-right corner of the project board.
  3. Select automation rules based on your workflow. For example:
    • Move PRs to In Review when a review is requested.
    • Move PRs to Needs Changes if a review requests changes.
    • Move PRs to Approved when a review is approved.
    • Move PRs to Merged when they are merged into main.

By setting up these rules, you can reduce the manual overhead of moving cards between columns, helping you track code reviews more efficiently.

GitHub Projects offers various views and filters to help you track code review progress.

To get a clear view of specific PRs or contributors, you can filter the project board based on different criteria:

  • Filter by assignee to see all PRs assigned to a specific reviewer.
  • Filter by label to group PRs under specific categories (e.g., priority or bugfix).
  • Filter by status to focus on PRs in review or waiting for changes.

These filters allow you to drill down into the details of the code review process, giving you insights into where your team might need to focus.

GitHub Projects supports notes, which can be useful for adding context to specific PRs. You can use notes to leave feedback on the board, such as reminders or updates related to code reviews:

  1. Click Add a note in the project column where you want to leave feedback.
  2. Type in your message, such as "This review needs input from the backend team."
  3. Hit Save.

These notes help you document important aspects of code reviews without diving into the pull request directly.

GitHub Projects is highly customizable, which allows you to adapt it to your team’s review workflow.

For more detailed tracking, you can add custom fields to your project, such as:

  • Review deadline: A date field that tracks the deadline for completing the review.
  • Priority: A dropdown field that marks the urgency of the review.
  • Reviewer feedback: A text field where reviewers can leave notes about the status of the PR.

To add custom fields:

  1. In your GitHub Project, click Fields at the top of the board.
  2. Click New Field and choose the field type (e.g., date, text, number).
  3. Name your field and define its behavior (e.g., make it required or optional).
  4. Click Save.

These fields allow you to track more granular information about each code review.

In addition to tracking PRs, you can link GitHub Issues to your project to track related review tasks. For example:

  • Review documentation: Create an issue for documentation updates tied to the PR.
  • Test changes: Add a task to ensure testing is complete before merging.

Linking issues with PRs in GitHub Projects can improve how you track code reviews and related tasks.

Graphite Protections integrates seamlessly with GitHub Projects to enhance your code review tracking process. By enforcing specific branch protection rules and ensuring that all pull requests meet certain criteria, Graphite Protections ensures code quality and security during the review process.

With Graphite Protections, you can:

  • Require code reviews before merging: Enforce that every pull request needs to be reviewed and approved by designated reviewers before being merged into the main branch.
  • Automate checks for code quality: Ensure that all pull requests pass automated tests, static analysis, and other quality gates before being moved to the "Approved" column.
  • Track review bottlenecks: Use Graphite Insights to identify where reviews are getting stuck and which team members might need to be engaged.

By combining GitHub Projects with Graphite Protections, you can better manage your review workflow and ensure a higher standard of code quality across your team. This added layer of automation and security helps streamline your tracking process in GitHub Projects, ensuring that every code review meets the right standards before being merged.

Using GitHub Projects for tracking code reviews helps teams stay organized and ensures that no PRs fall through the cracks. By setting up a review workflow, linking PRs, automating movements, and customizing fields, you can streamline the review process and make collaboration easier. Integrating Graphite Protections adds an extra layer of automation and security to ensure code quality standards are met before merging. With these steps, you can effectively manage code reviews with GitHub Projects, ensuring smooth tracking and clear visibility into your team’s review progress.

Graphite
Git stacked on GitHub

Stacked pull requests are easier to read, easier to write, and easier to manage.
Teams that stack ship better software, faster.

Or install our CLI.
Product Screenshot 1
Product Screenshot 2