Click here to Skip to main content
15,896,444 members
Articles / All Topics

Setting Wild Card Branch Policies in @VSTS

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
12 Mar 2018MIT2 min read 5.3K   1
How to set wild card branch policies in @VSTS

I’ve probably mentioned it before but keeping up with what’s happening with VSTS is incredible hard with their 3 week cadence and generally huge set of features each 3 weeks. This week at MVP Summit, I had what I thought would be a cool request to allow wild card branch policies. I was thinking of writing a console app to do this but thought it would be interesting to ask the product group as it’s part of the many benefits of being a MVP Smile.

The Ask

So the ask is that instead of each time I create a new branch I need to set the branch policies, I want to be able to set what the policies are before those branches are created. So basically, I would create a branch for release/* branches and then never worry that the policy is not set in the future.

The Solution

As with many other productivity requests, I generally have the individual PMs I was told by Jeremy Epling that this already exists today. Seems I missed another great feature in VSTS Smile with tongue out. To get started, you need to make sure you have a branch under the folder you would like to set the policy. This could mean you create a temporary branch just to set the branch policy.

Once created, you can:

  1. Click on the ellipse on the folder and then
  2. Branch policies

image

and then you can set the policies for any branches created under this folder, you should notice the /* in the branch name that you are setting the policies for.

image

Once you change the policy, you are able to delete the temp branch that has been created and any new branches in this path will automatically inherit the policies created.

Conclusion

There is a lot of great functionality in VSTS and sometimes if you are not following what’s going on properly in the product, you just have to try the experience you would like and might find it exists already.

Hope this helps others! Open-mouthed smile

License

This article, along with any associated source code and files, is licensed under The MIT License


Written By
Architect SSW
South Africa South Africa

Comments and Discussions

 
QuestionCan't delete a branch that has a required policy Pin
Donald Schulz17-Oct-18 5:35
Donald Schulz17-Oct-18 5:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.