Enforce only pull request on visual studio team services

前端 未结 2 662
小鲜肉
小鲜肉 2021-02-07 07:01

There is any way I could enforce that some people could contribute by one branch only by pull request I want them to be able to accept pull request but not to direct push change

相关标签:
2条回答
  • 2021-02-07 07:17

    The UI has changed since this question has been asked, the feature is still there:

    Yes this is possible with the last release of Visual Studio Online by setting a Git Branch Policy:

    Branch policies

    To help teams using Git improve the quality of code going into their repo, we’ve added a new capability to set policies on branches. These new policies enable teams to configure requirements for their development branches that are enforced by the server when pushing or merging pull requests. Build breaks can be prevented by using the build policy to require that all changes entering a branch pass a configured build.

    Setting branch pull request policies

    Code review policies can be used to set a minimum number of reviewers for pull requests, or even require specific users to review changes made to specific portions of your codebase.

    Setting code review requirements

    https://www.visualstudio.com/en-us/news/2015-may-15-vso

    0 讨论(0)
  • 2021-02-07 07:18

    There are two things that must be set:

    1. Set a Policy on the branch(es) you want protected, the simplest is to set "Require a minimum number of reviewers". See Microsoft Git Branch Policies

    2. Ensure that Contributors are set not to be exempt from policy enforcement - Example

    0 讨论(0)
提交回复
热议问题