One of our main goals is to help you and your team collaborate more effectively and efficiently on your software projects. That’s why we are constantly improving our Version Control features, especially the ones related to the pull request workflow. Starting in Visual Studio version 17.11, you can enjoy a smoother and smarter pull request experience, from creating to reviewing to merging. You can link your Azure DevOps work items, and in both Azure DevOps and GitHub you can create draft PRs and use default templates. You can even get AI assistance to write your pull request descriptions. Plus, you can view and respond to your pull request comments right in the editor, without leaving Visual Studio. Sounds awesome, right? Download the latest Visual Studio release and see for yourself!
Create all your pull requests in Visual Studio
We were so excited by the enthusiastic reception to the new Create a Pull Request flow and the subsequent updates. This feature had hundreds of survey responses, and we read every single comment. We’ve delivered on the top concerns, enabling Azure DevOps work item linking, default Pull Request templates, and draft PRs.
- The Azure DevOps “New Pull Request” window now has a section where you can add your linked work items. These items are reflected in the web as being linked – avoiding the context switch to the web and fulfilling many branch policies that require a linked ticket.
- Default pull request templates will auto-populate in the description box if there’s one available. Learn more about how to add default templates in your repository in the GitHub documentation and Azure DevOps documentation.
- Create your pull request as a draft using the drop down menu on the “Create” button. This lets your colleagues know it’s a work in progress.
- Learn more about the GitHub Copilot generated pull request descriptions in our previous blog.
View your pull request comments in the editor
Mapping between your code editor and your browser to view pull request comments can be a hassle. We’ve added your GitHub and Azure DevOps pull request comments directly in your working file. You can now stay in your context, make necessary code changes, and interact with your colleagues’ suggestions without switching contexts to the browser.
Enable the feature flag, “Pull Request Comments”, then checkout any branch with an active pull request branch and click on “Show comments in file”. You can also click on the “PR #” entry point from the Git Changes window or from the Git top level menu with Git > GitHub or Azure DevOps > Show comments in File.
You can navigate between files in the pull request and comments in the files using the toolbar. Leverage the following keyboard shortcuts:
Go to the previous file in the pull request | Ctrl+Shift+Alt+F6 |
Go to the next file in the pull request | Ctrl+Alt+F6 |
Go to the previous comment | Ctrl+Shift+Alt+F8 |
Go to the next comment | Ctrl+Alt+F8 |
Move focus back to the code from a comment | Esc |
In the last preview we included better support for @ mentions and work item references for your comments. We also improved the UI with the addition of avatars, other visual tweaks to improve accessibility, and we enabled better syncing with the server.
Contribute to what’s next
A smoother pull request experience helps your collaborations thrive! Be sure to try out the latest features in Visual Studio 17.11 GA and share your feedback in the following surveys:
We plan to continue improving the pull request experience based on your feedback, so let us know what’s missing and what you’re looking forward to! We’ve got a lot of functionality on the roadmap, including adding new pull request comments and seeing the comments in the diff view between your source and target.
We appreciate the time you’ve spent reporting issues/suggestions and hope you continue to give us feedback when using Visual Studio on what you like and what we can improve. Your feedback is critical to help us make Visual Studio the best tool it can be! You can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones.
Stay connected with the Visual Studio team by following us on YouTube, Twitter, LinkedIn, Twitch and on Microsoft Learn.
The post Level up your collaborations with the pull request experience in Visual Studio appeared first on Visual Studio Blog.