Azure Git repos provide protection to branches with branch policies. The cross-repo branch policy in a team project now lets you define policies applicable to a branch pattern, where it would even be applied to future branches which are adhering to the specified pattern. Let’s explore this feature in bit of detail.
In the team project settings page, now you get all repositories policies tab, where you can define branch policies effective to all repos in the team project.
You can apply policy to protect default branch in each repo. Or you can define a pattern, which will protect the current and future branches matching the pattern. Currently available branches matching the pattern in each repo in the team project will be listed as you type in the pattern.
Then you can create the branch policy for the given pattern as normal branch protection policy in Azure Git repo. Which can even include reviewers, build policies etc.
The policies will be applied to any branch meeting the pattern in any repo in the team project.
This feature is really useful when you have a single repo in a team project to auto apply the policies. Multiple repos in single project get the policies applied but the build policies have to be controlled with path filters in project level using cross project policies, or use inherited policies combined with individual repo branch level build policies. However, that will require the build policies to be applied to each new branch created.
Ideally, a feature to apply pattern based policies to single repo within a team project, with the option to decide cross repo policy inheritance to be overridden would be greatly benefiting the maintenance of branch protection policies in Azure Git repos.
Wednesday, 8 July 2020
Subscribe to:
Post Comments (Atom)
Popular Posts
-
az aks get-credentials is used to get the kubeconfig updated so that we can access AKS clusters from a terminal (You need to first use az ...
-
GitHub Actions are the CI/CD workflow implementation tool built into GitHub repos. While using the GitHub Actions workflows you may want to ...
-
Some times a silly mistake can waste lot of time of a developer. The exception “System.IO.IOException: The response ended prematurely.” whil...
-
Pull Request are the controlled way to bring in the changes to your stable branches in your Azure Git repos, or for that matter all Git prov...
-
Using Azure Redis cache with C# throws an error message such as below while accessing the Redis cache via a private endpoint. StackExchange...
No comments:
Post a Comment