Skip to content

Suggest Edit

Ankit Sinha edited this page Apr 14, 2021 · 4 revisions

Context

Azure DevOps contains Suggestions but this is mainly used for small syntax fix or typos. Often times you will want to suggest changes that spans multiple files. But there is no good way to suggest edits that span multiple lines or files to the author of PR.

Feature

This extension provides a mechanism to suggest diffs of staged changes to the author as a git patch. As a reviewer, once you have checked out the PR, you can make necessary changes that you would want to suggest and stage them (do not commit them). From the command palette select AzDO Pull Requests: Suggest Edit. The extension will create a patch document and submit it as a comment on the PR. Azure DevOps will render this as any other comment with body containing the diff in markdown code block. However the reviewer can open the PR description page on VS Code and the extension will show an additional Apply Patch button on this comment. Apply Patch will git apply the patch on the checkout PR.

Clone this wiki locally