简体   繁体   English

REST API是否可用于将TFS Git分支策略应用于git分支

[英]Is REST API available to apply TFS Git branch policies to git branches

I have about 30-40 git repositories in TFS Git. 我在TFS Git中大约有30-40个git存储库。 I would like to apply branch policies to the 'master' branch only, but I do not want to manually do this to each git repo. 我只想将分支策略应用于'master'分支,但是我不想对每个git repo手动执行。 I value my time. 我珍惜我的时间。 I know about the TFS REST API, but I cannot find anything to apply policies to branches in a git repository. 我了解TFS REST API,但找不到任何可将策略应用于git存储库中的分支的信息。 Can I use the .NET C# API to do this? 我可以使用.NET C#API来做到这一点吗? If so, are there any examples? 如果是这样,有什么例子吗?

There's no TFS REST API and .Net object API about Git branch policy currently. 当前没有关于Git分支策略的TFS REST API和.Net对象API。 You need to add branch policy for your branch manually. 您需要为分支机构手动添加分支机构策略。

You could vote this uservoice: https://visualstudio.uservoice.com/forums/330519-team-services/suggestions/17039236-tfs-api-for-git-branch-policy 您可以对此用户投票进行投票: https ://visualstudio.uservoice.com/forums/330519-team-services/suggestions/17039236-tfs-api-for-git-branch-policy

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM