签入 TFS 2013 之前的代码审查 [英] Code Review before checking in to TFS 2013

查看:31
本文介绍了签入 TFS 2013 之前的代码审查的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试实施一个流程,以便经理可以查看在开发人员可以签入到 TFS 2013 之前,所有开发人员的代码.

I'm trying to implement a process so that the manager can Review the code of all developers before the developers can check in to TFS 2013.

在将代码添加到实际项目之前,是否有任何流程需要人工审核代码?

Is there any process to require a review of the code by a human being before it is added to a real project?

我将 TFS 2013 与 Visual Studio 2013 结合使用.

I'm using TFS 2013 with Visual Studio 2013.

推荐答案

TFS 2013 支持开箱即用,并且使用起来非常简单.

TFS 2013 supports this out of the box, and is very straight forward to use.

开发者需要在团队浏览器中提交审核请求:

Developer needs to file a request for review in the team explorer:

  • 转到团队资源管理器
  • 打开待处理的更改
  • 在操作"菜单下,选择请求审核
  • 指定审核人,然后发送.

目标用户(在您的情况下为经理)将收到通知(如果您已在 TFS 上配置电子邮件设置),并且还可以在团队资源管理器 > 我的工作中查看审核请求.

The target user (in your case, the manager) will get notified (if you've configured the Email settings on the TFS), and can also see the review requests in Team Explorer > My Work.

Reviewer 可以查看开发者所做的所有更改,对其进行评论,并将评论发送给开发者.整个事情发生在 Visual Studio 内部,所有评论都保存在 TFS 上,以后可以报告.

Reviewer can see all the changes made by the developer, comment on them, and send the comments to the developer. The whole thing happens inside Visual Studio, and all the comments are kept on TFS and can be reported later.

此外,在完成审核后,审核者可以将他/她对更改的意见指定为看起来不错"、有评论"或需要改进".

Also, upon completion of review, the reviewer can specify his/her opinion of the changes as "Looks Good", "With Comments" or "Needs Work".

请确保您在 MSDN 上阅读了有关此内容的页面:http://msdn.microsoft.com/en-us/library/hh474795.aspx

Make sure you read this page on MSDN regarding this: http://msdn.microsoft.com/en-us/library/hh474795.aspx

您还可以在第 9 频道观看此视频:http://channel9.msdn.com/Series/Visual-Studio-2012-Premium-and-Ultimate-Overview/Visual-Studio-Ultimate-2012-Using-Code-Review-to-Improve-Quality

You can also check out this video on Channel 9: http://channel9.msdn.com/Series/Visual-Studio-2012-Premium-and-Ultimate-Overview/Visual-Studio-Ultimate-2012-Using-Code-Review-to-Improve-Quality

编辑

要防止未经审核就签到,您可以使用签到政策.这是一个需要在签入前进行代码审查的自定义签入政策:

To prevent check-in without a review, you can use a check-in policy. Here's a custom check-in policy that requires code review before check-in:

https://visualstudiogallery.msdn.microsoft.com/c476b708-77a8-40065-b-919ab688f078

但我应该指出,签入策略不是安全机制,将它们视为开发人员发送签入代码的提醒.开发人员可以轻松覆盖它们.

But I should point out that check-in policies are not security mechanisms, think of them as a reminder for the developer to send the code for check-in. Developers can easily override them.

如果您确实需要阻止任何签入,您应该拒绝开发人员的提交权限,并让他们使用代码审查(或搁置集)将更改发送给经理.然后,经理可以在审核后取消搁置更改并提交.

If you really need to prevent any check-ins, you should deny commit permission for developers, and have them send their changes to the manager using a code-review (or shelve set). The manager can then unshelve the changes and commit after reviewing.

这篇关于签入 TFS 2013 之前的代码审查的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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