Search code examples
azureazure-repos

Description of "Allow requestors to approve their own changes" is confusing


The description on this page https://learn.microsoft.com/en-us/azure/devops/repos/git/branch-policies?view=azure-devops#require-a-minimum-number-of-reviewers says:

If Allow requestors to approve their own changes is selected, the creator of the pull request may vote on its approval. If not, they can still vote Approve on their pull request, but their vote won't count toward the Minimum number of reviewers.

This means it is assumed that the person that did changes on the source branch is at the same time the creator of the pull request. In our case often a different person than the developer is creating the pull request. Is this setting then only related to the creator of the pull request (and not caring about the commit pusher) or the person that pushed commits to be reviewed within the pull request?

If it is only about the creator of the pull request then the name of this setting should be changed since it has nothing to do with the actual changes (=commits) on source branch of the pull request.

Did I misunderstand something here?

Thank you


Solution

  • You are making a good point, Azure DevOps is implying here that the person who worked on a branch is also the initiator of the PR. This is not something that is 100% guaranteed, because it can happen that I created a dev branch, worked on code, made several commits, then my teammate creates a PR from my branch.

    (The "most recent pusher" setting is probably closer to what you are looking for, which controls based on who pushed the latest commit from a local repository.)