[HOWTO] Suggest changes directly in Azure DevOps pull requests

There is a convenience feature in Azure DevOps I wasn’t aware of until now. There is the option of proposing changes directly in pull requests.

Perhaps you sometimes find that you only suggest a few small changes (e.g. translations, formatting, …) as part of a pull request review. This is usually done by adding comments to the pull request. Depending on the situation, the author of the pull request then has to change the branch on his local machine for such changes, implement the changes according to the comments and push them. In such situations, suggestions can drastically simplify the process. This works as follows.

  1. Open the corresponding pull request in Azure DevOps
  2. In either Side-by-side or Inline file view, mark the part you want to suggest a change for
    A screenshot showing the files view of a pull request in Azure DevOps where text is selected in a changed line of a specific file
    A screenshot showing a changed file of a pull request in Azure DevOps where text is selected in a changed line
  3. Click on the Comment icon
    A screenshot showing a changed file of a pull request in Azure DevOps with the cursor on the comment icon
  4. In the comment wizard click on the Insert a suggestion icon
    A screenshot showing a changed file of a pull request in Azure DevOps with cursor on Insert a suggestion icon
  5. Edit content in suggestion section and optionally add a comment before or after
    A screenshot showing a changed file of a pull request in Azure DevOps with open comment wizard containing suggestion section
  6. After clicking Comment button, the suggested change appears in the comment with an Apply change button that allows the author of the pull request to accept and apply the suggested change directly in the pull request in Azure DevOps
    A screenshot showing a changed file of a pull request in Azure DevOps with a comment containing a suggested change

Leave a Reply

Powered by WordPress.com.

Up ↑

Discover more from blog.rufer.be

Subscribe now to keep reading and get access to the full archive.

Continue reading