Dear Bitbucket Community,
I would want to ask if you have any information about branch restriction where I need 2 approvals for PRs:
- 1 of the approvals must be from "default reviewers"
- 1 of the approvals can be from anyone who can access the repository.
and if there are two approvals, anyone who has access to the repository, to be able to merge or if there aren't enough approvals, only the default reviewers to be able to merge.
The configs which I tried were:
- From: Repository Settings -> Branch restrictions -> Actions (on the desired branch) -> Edit -> Merge Settings -> Minimum number of approvals (2) and Minimum number of approvals from default reviewers (1) , because if one approval is set from default reviewers it will be also counted in "Minimum number of approvals". Also set "Prevent a merge with unresolved merge checks" to prevent merges if the approvals are not enough, but everyone will be able to merge, but in this case, the default reviewers cannot merge without all approvals too. If I set restriction in "Branch Permissions" inside the list "Merge access via pull request", then only the whitelisted users will be able to merge which is not what I need and if "Prevent a merge with unresolved merge checks" is enabled, it will also avoid merge, even if the users are with "Admin" permissions for the repository.
Best Regards,
Elena