So you using Visual Studio Team Services (VSTS) and you have some build definitions and your team are doing pull requests but you want their branch to run a build before the pull request is reviewed.
The steps to add gated check in are like so:-
- Log into VSTS
- Go to the Code Menu and then select Branches
- From the list of branches look to the right of master for 3 dots … (ellipses)
- Click the 3 dots and then select branch policies
- Look on the left under Branch policies
- Click on Add build Policy
- Choose your build pipeline
- Fill that out and then give it a name
- Make sure it’s enabled
- Now when a user goes to create a pull request and pushes they’re code
- The gated check-in will check that the users branch builds before anyone can review the pull request.
This add a quality gate to your check-ins using VSTS.
Hope that helps