简体   繁体   中英

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

I have about 30-40 git repositories in TFS 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. 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. Can I use the .NET C# API to do this? If so, are there any examples?

There's no TFS REST API and .Net object API about Git branch policy currently. 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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