在 TFS/Git 2018 年创建拉取请求时不需要的默认审阅者

Unwanted default reviewer when creating a pull request in TFS/Git 2018

在 TFS 2018 中(具体来说,我使用的是 Microsoft Visual Studio Team Foundation Server 版本 16.131.27701.1)和 Git,每当我创建拉取请求时,项目的默认团队会自动默认分配。有什么办法可以防止这种情况发生吗?开发人员有时会忘记删除默认团队,然后整个团队都会收到电子邮件通知,要求审查代码。

我从 Microsoft 找到了这个 https://developercommunity.visualstudio.com/content/problem/241804/unwanted-default-reviewers-are-being-added-to-pull.html。根据他们的建议,我添加了如下所示的个人代码审阅者,但默认团队仍然出现。

不幸的是,这是 TFS 2018 版的设计行为。

它会自动将 项目团队 添加为审阅者,而不管您选择的回购。

但是对于Azure DevOps 2019和Azure DevOps Service,目前默认不添加审阅者。它与 新导航.

一起发布

详细说明如下:

When we first launched the pull request (PR) experience, we thought it would make sense to assign all PRs to the team context that you had selected when creating the PR. This behavior has been a frustration point, since many people did not notice the connection between the team context and the PR assignment. In fact, this has been one of our top UserVoice suggestions.

As part of the new navigation changes, we took the opportunity to change this default association with teams. You'll notice two changes:

  1. When creating a PR, no reviewers are added by default. The reviewers list does have a feature to make it easier to add individuals and groups that were added to PRs recently. The required reviewers policy can also help teams that want to ensure that specific reviewers are added to review their code.

  2. ...

更多详情请看官方发布:creates a PR without a default team as reviewer.