On this page I can find the following quote:
"If your team requires stricter control, consider using branch permissions to restrict who can merge a pull request to particular users or groups"
However on the page about branch permissions there is only a possibility to
- Prevent all changes (except by user/group)
- Prevent changes without a pull request (except by user/group)
How am I supposed to restrict merging a pull requests (to master), except by a particular user or group?
Suppose you have 10 users, but you only want to let your users "Aloysius" and "Bartholomew" merge PR's to master. Then setup the config like so by setting both rules:
1. Prevent changes (to master) without a pull request (with no exceptions)
2. Prevent all changes (to master) with "Aloysius" and "Bartholomew" set as the exceptions.
The combination of those two rules makes it so only Aloysius and Bartholomew can get work into 'master', but they must use PR's to do so.
Note: under this setup they can merge any branch into 'master', including branches they did not create or push themselves, and branches that don't contain any commits by them. But only they can click on the 'Merge' button if the target of the PR is 'master'.
Hi Patrik! You'll need to use a combination of branch permissions and default reviewers. I assume you don't want changes to be pushed directly to Master without a pull request, so first, you'll need to apply branch permissions and choose to 'Prevent changes without a pull request' (this prevents pushing changes directly to the specified branch; changes are allowed only with a pull request).
Second, you'll need to add default reviewers (this can be a single user or a group). This will allow you to set a group of users that need to approve the change before it can be merged to Master, for more info you can read Add default reviewers to pull requests.
Will that work for you?
Kind regards,
Ana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.