Reviewing and viewing pull requests in Visual Studio Code

Sara Verdi
Sara Verdi
Graphite software engineer


Note

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


Reviewing and viewing pull requests directly in Visual Studio Code (VS Code) makes it faster and easier to provide feedback and maintain code quality. In this guide, we will explore how to view pull requests in Visual Studio Code, review pull requests in VS Code, and leverage Graphite's VS Code extension to enhance your code review process.

To get started, you need the following:

  • Visual Studio Code: Download and install the latest version from the official website.
  • GitHub account: You need a GitHub account to access and manage pull requests.
  • Graphite's VS Code extension: Install the Graphite extension from the Visual Studio Code marketplace. This extension enhances your code review process with features like smart feedback and false positive reduction.

To view pull requests in Visual Studio Code, follow these steps:

  1. Clone your repository: If you haven't already, clone the repository that contains the pull requests you want to review. You can do this by opening a terminal in VS Code and running:

    Terminal
    git clone <repository-url>
  2. Open the repository in VS Code: Use the File > Open Folder menu option to open the cloned repository.

  3. Access the Source Control panel: Click on the Source Control icon in the Activity Bar or press Ctrl+Shift+G. This panel displays all your Git-related operations, including branches, changes, and pull requests.

  4. Open the Pull Requests view: If you have the Graphite extension installed, you can see the pull requests listed in the Source Control panel. Click on "Pull Requests" to view the available pull requests associated with your repository.

Once you have accessed the pull requests, you can start the review process. Here's how:

  1. Select a pull request: Click on the pull request you want to review from the list in the Pull Requests view.

  2. View the changes: A new editor tab will open, displaying the changes made in the pull request. You can navigate through the files modified in this pull request using the file explorer in the sidebar.

  3. Add comments: To provide feedback on specific lines of code, hover over the line number and click on the comment icon. Type your feedback in the comment box and click "Add Comment."

  4. Approve or request changes: After reviewing the changes, you can either approve the pull request or request changes. To do this, look for the options in the top right corner of the pull request view.

  5. Merge the pull request: If you have the necessary permissions and the pull request is approved, you can merge it by clicking the "Merge" button.

Graphite's VS Code extension provides additional features that enhance the pull request review process, including:

  1. Intuitive Git GUI: Graphite’s VS Code extension simplifies Git operations by transforming complex command-line tasks into a clear, user-friendly interface. This lets you navigate, review, and manage pull requests without the usual Git command challenges, freeing up time to focus on the code itself.

  2. Stack management with visual clarity: One of Graphite’s standout features is its built-in stacking functionality, allowing you to see and manage your entire stack of pull requests directly in VS Code. This visual representation of stacked branches helps avoid clutter and confusion that can arise from multiple PRs. You can easily navigate between stacks, update branches, and maintain a clear overview of dependencies.

  3. Seamless IDE integration: Graphite’s extension integrates directly into the VS Code environment, so you can adjust the window location or control the tool via the command bar, making it highly adaptable to your workflow. You can directly open files, leave inline comments, and make edits, all within the same interface, keeping everything you need for PR review in one place.

  4. Enhanced review feedback: By using Graphite’s inline review features, you can quickly add comments and suggestions on specific lines within the pull request. Graphite’s interface makes it easy to keep track of feedback, and it also offers a summary of comments and discussions to streamline the resolution of pending issues.

These capabilities make Graphite's VS Code extension a robust choice for efficient and organized pull request management, providing an all-in-one workspace where you can handle stacking, review, and tracking seamlessly.

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