ADO’s PR’s Suggestions

Made by DallE - I wanted something completely different. But as they say

This year I do tons of code reviews. We’ve hired an external team from India and they produce a lot of code that must be carefully reviewed. Recently I was told about a feature that can make my/developer’s life a bit more comfortable. The feature is called „Suggestion”.

First of all – we use the Azure DevOps suite for project management purposes. I worked with others in the past but this ADO stuff is really nice and useful.

So, assume that we have PR with code to be reviewed:

Exemplary pull request with simple code change
Exemplary pull request with simple code change

Imagine I found a flaw that needs to be corrected. For example, I don’t like enum members’ names starting with small letters. Usually, I select the code that I want to comment on and click the comment icon. Toolbox appears, and I can add my thoughts there.

After selecting the code I want to comment on, I click the comment icon and put my thoughts inside the toolbox.

But there is an easier way. Suggestion! So instead of writing my comment, which will be processed by the developer (with a chance to be misunderstood), I write my suggestion, of how I’d like the code to be like.

Instead of writing a comment, I click the „Insert a suggestion” button
I don’t write comments, but the code itself

When I finished, the „Commit all changes” button appears. It might me clicked and then standard commit toolbox appears.

Now, my suggestions may be committed

After commit, my suggestion is marked accordingly (as committed).

Done. Suggestion committed.

I hope you will find this useful 🙂 Have a nice day.

Warning: A non-numeric value encountered in /home/platne/serwer17076/public_html/wp-content/themes/Newspaper/includes/wp_booster/td_block.php on line 1008