Explore Courses Blog Tutorials Interview Questions
0 votes
in Azure by (45.3k points)

We have branch policies set up in VSTS to prevent pull requests being merged into master unless a build passes and work items are linked. However, I can't work out how to prevent developers pushing directly to master. Setting the "Contribute" permission to Deny does not allow pull requests to be merged.

All developers should be allowed to merge PRs into master but none should be permitted to push directly to master. Is this possible?

1 Answer

0 votes
by (16.8k points)

Branch policies already do exactly what you're saying. When a branch policy is in place, PRs are required.

Make sure your developers don't have the "Exempt From Policy Enforcement" permission.

Browse Categories