Merge Request Reviews in VS Code
## Problem to Solve As a developer who is writing code and working with merge requests context switching between my local editor (VS Code) and GitLab is time consuming and often ineffective (see [Additional Details](#additional-details)) for actually performing the review. Comments that are left on merge requests that I've contributed to are also challenging to recall and need to be continuously referenced to ensure that all comments are addressed. ## Vision We want to move more of GitLab closer to where developers are. By expanding merge request reviews and discussions to VS Code developers won't need to context switch between tools and can more efficiently contribute feedback and changes to projects. ## Additional Details In watching a [series of Code Reviews](https://gitlab.com/gitlab-org/create-stage/-/issues/12736) (Internal Only), many developers switch between the Merge Request page within GitLab and their local editor. Often developers need to be in their local editor for: - Additional context of the change being proposed - More familiar review interface - Execution of the change/test change in development environment - Generating patch/proposed changes While the current code review process could be extended to support some additional aspects of context and interface the ability to execute and run tests or provide more complicated suggestions is more challenging to achieve. Leveraging tools developers already have and are configured to run the application can provide a better experience for those involved in the merge request process. ## Proposal We should incorporate the Merge Request process in to VS Code so that feedback can be given and feedback can be resolve without needing to context switch to a new tool. ### What could this look like? In a complete state Engineers unlock two additional workflows: 1. As a reviewer - engineers can view a branch through VS Code without actually checking out that branch. Each file being examined as part of the review can have comments left on individual lines within the review. These comments are also present in the GitLab web interface. 1. As a contributor - engineers will be able to access the feedback provided to them on their Merge Request and respond through changes in their code and through comments without leaving their editor. The MR is also available as part of the Web View interface within VS Code which allows engineers to provide more general comments as well as interact with the Merge Request via quick actions (change label, assignee's, state, etc...). ### Where do we start? - [VS Code Webview Cleanup](https://gitlab.com/groups/gitlab-org/-/epics/4604): Currently within the VS Code extension experimental Webview features already exist which provide in application access to Merge Requests and Issues. These Webview features allow you to generally comment on Merge Requests and interact with them via quick actions. ## Progress - **2020-10-14:** During the %"13.6" development cycle (Oct. 18 - Nov. 17) we'll be working through [webview cleanup](https://gitlab.com/groups/gitlab-org/-/epics/4604). The goal is to move away from their experimental/defaulted-off state and enable them for all users as a foundation to continue building experiences on. - **2020-11-12:** A POC exploration in to executing on Reviews in VS Code was completed. You can watch a walk through of that effort on [YouTube](https://youtu.be/kKA6i8oqZAA). You can also read https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/issues/243 for the updated details. - **2020-12-08:** MR changes are now available in the merge request list view of GitLab workflow. This allows you to easily see the changes involved with a merge request.
epic