即使我查看了自己的更改,拉请求也已完成 [英] Pull request completed even though I reviewed my own changes

查看:73
本文介绍了即使我查看了自己的更改,拉请求也已完成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的团队在VSTS中有一个Git存储库,它在主分支上设置了分支策略。 在政策中,我们要求最少数量的审核者为1,并且"允许用户审核自己的代码"。未经检查,并且"< label
class =" policy-self-approve"" for =" policy-reviewer-allow-downvotes">即使某些评论者拒绝了更改,也可以完成提取请求。未经检查。 据我了解这一点,这应该意味着对于每次提交,除了提交者之外的其他
必须检查该更改以便拉取请求能够完成。< / label>


< label class =" policy-self-approve" for =" policy-reviewer-allow-downvotes">另一位开发人员检查了一些更改并创建了拉取请求。 他的代码中存在问题。 通常情况下,我只需将其发送回
即可修复,但对于这些分支政策的新手,我想测试一下。 所以我修复了问题并将我的更改推回到源流中。 然后我回到网络界面查看拉取请求,看到我的更改
现在包含在拉取请求中。 我没有做任何事情来包括它们,它们现在只是请求的一部分。 在拉取请求审核屏幕上,我能够批准待处理的更改,包括我的更改。 一旦我这样做,
拉取请求就完成了,包括我在内的所有更改现在都在主分支中可见。< / label>


看起来好像是意图分支策略的目的是防止用户将未经审核的更改提交给受控代码分支,但实现似乎只关心谁提交了pull请求,而不是其更改包含在pull
请求中。 我是否在分支策略的设置中遗漏了某些内容,这会阻止其他更改被包含在拉取请求中,或者是否会真正阻止用户查看自己的代码?< label class =" policy-self-批准"
for =" policy-reviewer-allow-downvotes">< / label>

解决方案

嗨Benjamin_CATI,



感谢您在此发帖。



这个论坛正在讨论Team Foundation Server。您的问题与Visual Studio Team Service有关。我将把这个帖子移到相应的论坛。



最好的问候


Limitxiao Gao


My team has a Git repository in VSTS that has branch policies set on the master branch.  In the policy, we require the minimum number of reviewers to be 1, and the "Allow users to review their own code" is unchecked, and the "<label class="policy-self-approve" for="policy-reviewer-allow-downvotes">Pull request can be completed even if some reviewers rejected changes" is unchecked.  As I understand this, this should mean that for each commit, someone other than the committer must review that change for the pull request to be able to be completed.</label>

<label class="policy-self-approve" for="policy-reviewer-allow-downvotes">Another developer checked in some changes and created a pull request.  There was a problem in his code.  Normally I would simply send it back to them to fix, but being new to these branch policies, I wanted to test it out.  So I fixed the problem and pushed my changes back into the source stream.  I then went back into the web interface to review the pull request, and saw that my changes were now included in the pull request.  I hadn't done anything to include them, they were just part of the request now.  On the pull request review screen I was able to approve the changes that were pending, including mine.  Once I did so, the pull request was completed and all changes, including mine, were now visible in the master branch.</label>

It seems like the intent of the branch policies is to prevent users from committing un-reviewed changes to a controlled code branch, yet the implementation seems to only care about who submitted the pull request, not whose changes are included in the pull request.  Am I missing something in the setup of the branch policies, either that would prevent additional changes from being included in the pull request, or that would truly prevent a user from reviewing their own code?<label class="policy-self-approve" for="policy-reviewer-allow-downvotes"></label>

解决方案

Hi Benjamin_CATI,

Thank you for posting here.

This forum is discussing Team Foundation Server. Your issue is related to Visual Studio Team Service. I will move this thread to corresponding forum.

Best Regards

Limitxiao Gao


这篇关于即使我查看了自己的更改,拉请求也已完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆