Git VSTS中的签到政策

时间:2017-09-21 10:10:15

标签: git branch azure-devops checkin-policy

如何在VSTS中设置git的签到策略,因为我只能看到可用的分支策略。我在Git中有任何可用于签入策略的插件,因为我想在签入策略之前应用以下内容,然后开发人员检查 - 在任何代码中

•   Builds: Requires that the last build was successful before a check-in.
•   Code Analysis: Requires that code analysis is run before check-in.
•   Work Items: Requires that one or more work-items to be associated with the check-in.
•   Comments: Requires that a standard comment any code check-in

1 个答案:

答案 0 :(得分:2)

关于使用VSTS的Git,只有分支策略,它用于Pull Request而不是check-in / commit / push(完成pull请求后的合并代码)。您可以要求成功构建,工作项关联等。

关于签入/提交策略,您需要使用git hook(检查注释,工作项(注释中的#ID,代码中的文件(例如代码分析文件))。

更多信息,请参阅Customizing Git - An Example Git-Enforced Policy

相关帖子:Setup a git commit message policy