How do I add a required reviewer when people of a given team create a pull request in DevOps? - azure-devops

After hours of googling and search, I can't find how to add a required reviewer when people of a given team create a pull request in DevOps.
Some people will be able to contribute to our repository, but they are external to our company, that's why we want to enforce this control.
Does anyone ever did it?
Thanks.

It seems that you want to conditionally set the required reviewers according to which team the pull request creator comes from. If so, I think there is no such built-in function currently provided.
Currently only the filter condition of "based on which files changed" is provided.
You could add this feature request on our UserVoice site , which is our main forum for product suggestions. After suggest raised, you can vote and add your comments for this feedback. The product team would provide the updates if they view it.

You can do this with a branch policy in Azure DevOps Repos. In ADO, go to project settings and click Repositories in the menu in the Repos section of the project settings page. Click the repository you would like to protect with code reviews and then select the Policies tab. Next select the git branch needing reviews.
On the bottom of the branch policies page you can select Automatically included reviewers. Click the + button to add reviewers. When adding the reviewers you can select if these selected reviewers are required or optional. This is actually something of a rule-builder, you can add multiple 'rules' by repeatedly going through click + and add reviewers
There is also some documentation on branch policies that might be helpful

This is my solution, this has been work for year
Azure DevOps: Automatically add different Reviewers based on Pull Request author using Microsoft Power Automate

Related

In Azure DevOps which ticket was a branch created for?

In Azure DevOps you can select a ticket on the Sprint task board and there is a menu option Create Branch which you can use to create a branch in the repo to work on that ticket.
Having done this, if you go to the Branches view in DevOps, how on earth do you see which ticket each branch was created for?
Based on your concern and description, currently, on the Branches view in DevOps, there is no optioned field for which ticket each branch was created for, also, regarding this limit for your "Branches view show which ticket each branch was created for" requirement, you could create a feature request via: https://developercommunity.visualstudio.com/report?space=21&entry=suggestion . That will allow you to directly interact with the appropriate Product Group, and make it more convenient for the product group to collect and categorize your suggestions.
Besides, a workaround for your scenario is that it is suggested that you could name the branch with the related WIT ID to help recognize it, for example, you can name the new created branch like WIT ID "Task6" to help specify the branch when creating it.
Pic1:
Pic2:
You could also check the related branch name in "Details" and "History" section when opening the WIT.
In "Details" section.
In "History" section.
Hope it's helpful to you.

I can't complete a pull request in Azure DevOps

My colleague submitted a pull request on a repository. I made a recommendation on renaming a function but I clicked "Approve with recommendations". However, from here I cannot do anything. I cannot "Complete" the pull request. The Complete button remains disabled.
We made a team and we gave the team Project Contributors. WHat else do we need to do? I've used Github for years and I cannot figure out why Azure DevOps UI is so terrible.
Do you have any merge conflicts in the pull request? Make sure to resolve them first.
Also, make sure that your user is not part of any group that has a Deny-policy possible overriding your Project Contributor rights.
Lastly, check the branch policies (link) to see if anything is hindering you from completing the request.

Is it possible to fill reviewers from Contributors group on creating Pull Request on Azure DevOps?

Is it possible to fill reviewers from Contributors group on creating Pull Request?
Is it possible out of the box or need to install some extension?
My guess is you want it to pre-fill the reviewers with a set list, if so then you want to go into Project Settings - Repositories and set a policy on the relevant branch to automatically include reviewers:

Permission required so users can add Required Reviewer to Pull Requests

Members of my team sometimes need to add required Reviewers to their pull requests to ensure that a certain person actually performs the review.
We have a policy where a group of developers is automatically added to the pull request, which for 99% of the time is fine, but sometimes we need to add an extra person or 2.
There isn't a permission that is standing out explicitly showing which setting to use.
Any clues would be good
Looks like you are talking about this option. Some users are lacking it.
It's a new Pull Request Experience for Azure Repos. It should be the same permission to remove a required reviewer from Azure Devops
When you want to remove that required reviewer from the Automatically include code reviewers, you need to make sure someone who has the permissions to Edit policies (Project Administrators) to
Note: You need to check the Branch policies of the branch which you want to merge, for example, you merge from Dev to master, you need check the Branch policies of the master branch.
Then, after remove that required reviewer, you could go back to your pull request and click the X button:
So it should be the same let somebody to make required for reviewers. Try to assign them edit policy permission.
Hope this helps.

Make everyone a reviewer of VSTS pull requests

We want to set up a pool code review system where any developer can see a list of all pending code review requests and pick some to review. We're using Visual Studio Team Services.
As a first step, I need to allow the entire Project Collection Valid Users group to be added as reviewer of a pull request. (Currently the field seems to accept only users who are explicit members of the project team.) The second step is to grant read-access to all projects to all collection valid users.
The latter step seems to be answered by this answer.
But I'm completely stuck on making everyone a pull request reviewer. Is this even possible? If so how? (I'd prefer not to rely on a third-party extension if it can be done without.)
You can use below steps to make everyone as reviewers for VSTS pull requests:
Add an account level group to add all users as members for the group
In Security Page (https://account.visualstudio.com/_admin/_security) -> Create group -> input group name (assume it’s Engineering here) -> add all the users as members for the Engineering group.
Add the account level group (Engineering group) for each projects
In a project security page (https://account.visualstudio.com/project/_admin/_security) -> add the Engineering Group as a member for the project’s group or team.
Select the project team/group (which you add Engineering group as a member) for PR reviewers in the project
You can install Pull Request Dashboard extension to view the PRs clearly
You can install Pull Request Dashboard extension, so that users can view Pull Requests in the project by different kinds of categories: Request By me, Assigned To Me and Other Open Pull Requests.
By default, nothing like everyone, you can add as many people you want as reviewer.