DEV Community

Viktor Le
Viktor Le

Posted on

How to review Code better with VS Code

To review code in GitHub using VS Code, install the "GitHub Pull Requests and Issues" extension, sign in, and then navigate to the pull request in the VS Code activity bar to view changes, add comments, and manage the review process.
Here's a more detailed breakdown:

1. Prerequisites

  • Install Git: Ensure you have Git installed and configured on your system.
  • Create a GitHub Account: You'll need a GitHub account to access and review code.
  • Open VS Code: Launch Visual Studio Code.

2. Install the Extension

  • Open the Extensions view in VS Code (Ctrl+Shift+X or Cmd+Shift+X).
  • Search for "GitHub Pull Requests and Issues".
  • Install th e extension by the Microsoft organization.

3. Sign in to GitHub

  • Click on the GitHub icon in the activity bar (it should appear after installing the extension).
  • Click "Sign in to GitHub".
  • Follow the on-screen instructions to authenticate with your GitHub account.

4. Navigate to a Pull Request

  • Go to the pull request you want to review in the VS Code activity bar.
  • You can find pull requests under the "Pull Requests" section.

5. Review the Code

  • View Changed Files: The extension displays the changed files in the pull request.
  • Add Comments: Click on the "+" icon next to a line of code to add a comment.
  • Add a Review: You can add a general review comment to the pull request.
  • Checkout the Branch: Use the extension to checkout the pull request branch directly from VS Code.
  • Check GitHub Actions: View the status of GitHub Actions workflows related to th e pull request.

6. Additional Features

  • GitHub Copilot Integration: Use GitHub Copilot for AI-powered code review suggestions.
  • Customizable Queries: Configure the extension to filter and organize pull requests based on your needs.
  • Issue Management: Manage and create issues from within VS Code.

This video demonstrates how to review a pull request from Visual Studio Code

Image description

Link: https://www.youtube.com/watch?v=DSl-L6B_Qb4

Top comments (0)