GitHub Pull Requests for Visual Studio Code


Few months back, Microsoft acquired GitHub and we expected to see some interesting collaboration following the acquisition. It was not a long wait and we saw a number of announcements made by Microsoft recently which includes its collaboration with GitHub.

In this blog, we will discuss about the new GitHub Pull Request extension that enables you to collaborate, comment, review, and validate pull requests directly from Visual Studio Code.

Github Collaboration

With Microsoft adopting the Open Source culture at a rapid pace during the last few years, this collaboration between VS Code and GitHub Teams is an exciting prospect. Visual Studio Code is growing in popularity and has been ranked as the #1 developer tool in 2018. There are monthly releases with new features back to back and that has been a strong reason why the developer community has embraced this tool. Following the launch of LiveShare, this extension to manage the GitHub Pull Requests from within the VSCode editor will make developers lives much easier.

This is a huge benefit for developers from a productivity standpoint – since they don’t need to leave their editor and navigate to GitHub for reviewing Pull Requests. They can verify the Pull Requests and add comments from right inside the VS Code editor. This is possible because of the new APIs that has been integrated with VSCode to provide the ability to verify PRs.

Over the last 9 months, I have been doing all my .NET, Java and Python development from VS Code and it just works great for all languages. The only time I get out of the editor during development is while reviewing Pull Requests. But things have changed for the better now. With the GitHub PR extension for VS Code you get a very powerful integrated experience from within the code editor.

3 things I love about this extension apart from what is mentioned above are —

  • While doing the Code Reviews, you can leverage the color theme and styling which you are used to inside your code editor. This will help you to look at the changes faster and with more accuracy.
  • Doing the Code Reviews within the VS Code editor will enable you to leverage the already installed extensions. Having some Static Code Analysis tools will help you to be more accurate with the code reviews and point out discrepancies which could have missed a manual review.
  • You can switch your VS Code into a Code Review mode and pull in the code changes locally for an in-depth analysis. Once you have completed your review, you have the option to exit the code review and checkout other branches to continue with your development work.

Few things to keep in mind —

  • You will need to have VSCode version 1.27.0 or higher.
  • You can download the extension from Marketplace.
  • You will need to connect your VS Code with your GitHub account. The authentication steps are pretty straight forward and you just need to follow the step by step instructions.

Installing the extension from Marketplace is simple —

GitHub Pull Request Extension
In your VS Code editor, after you have installed the extension you can click on the ‘Source Control’ icon to view the new section called ‘GitHub Pull Requests’ as shown below —

GitHub Pull Requests

To summarize, this new extension allows you to do the following —

  • Authenticate and connect VS Code to GitHub.
  • List and browse PRs from within VS Code.
  • Review PRs from within VS Code with in-editor commenting.
  • Validating PRs from within VS Code with easy checkouts.
  • Terminal integration that enables UI and CLIs to co-exist.

You can watch the video by Kenneth, Program Manager for a working demo of this extension here.



Categories: C#, Visual Studio, Visual Studio Code

1 reply

  1. great synopsis Samir! Thanks for summarizing that, it was more than what I got from the info page for VSCode.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: