Building on the theme of code quality and how it helps prevent technical debt, branch policies is a great new feature in TFS that lends itself to improving the quality of the code that goes into the Git repo. In this recipe, you'll learn how to configure code review and Gated check-in policy on the master branch.
To configure branch policies on a branch, the user needs to have administration permission for that branch. To apply branch policy for the entire repo, the user needs admin rights for the repo.
Create a continuous integration build for the FabrikamGit Team; follow the instructions in the Creating a continuous integration build definition in TFBuild recipe in Chapter 4, Building Your Application.
Scenario: The FabrikamGit Team wants to protect the master branch by only allowing commits that pass the Fabrikam CI build and have been code reviewed by at least two people in the Team. If the code being changed falls under the /src/FabrikamFiber...