How can you insert suggestions on a PR in Azure Devops?

Viewed 2970

I found this somewhat recent mention of experimental PR features, and they mentioned the ability to insert and apply suggestions from the PR itself.

That's a feature I've grown very accustomed to with other products, but I'm a bit lost as to how I can access this feature in Azure DevOps in the present day.

enter image description here

Here is what I actually see: No lightbulb icon, etc.

2 Answers

This feature should be enabled by default.

Open any pull request, navigate to the Files tab, choose the file and click a tooltip to enter a comment:

enter image description here

Now in the form that opens you'll see the button to add a suggestion:

enter image description here

The "Insert a suggestion" option is not for the comments to the changed files.

Basically it is used to suggest changes for the following things in a file:

  • A line of content in the file.
  • Multiple selected lines of content in the file.
  • Any selected content in the file.

enter image description here

Related