All our repos have the following branch restrictions for our develop and master branches:
- Check for at least 2 approval
- Check for at least 1 approval from default reviewers
- deleting this branch not allowed
- rewriting branch history not allowed
- check for unresolved pull request tasks.
- Merge access via pull requests: everyone with access to the repo has merge access
The problem is the above restrictions are completely ignored by bitbucket. Any developer can merge their PRs without anyone approving them. The developers all have write access but not admin access.
We hope that there is a way to enforce this. Any suggestions? It would seem to be a major limitation.
Note: All developers have write access at the repository level, as this is the min requirement to be able to merge.
Even worse, Ive just tested and developers can push the develop and master branches directly, without PR. How do we prevent this, given the branch restrictions are ignored?
Ive just tried removing write access at the repo level to "Nobody has write access". This did block users from pushing directly to the restricted branches, did allow them to push to non restricted branches, BUT still allows them to merge restricted branches without the required Approvals.
Is there no way to force approvals being required?