In recent versions of Bitbucket the PR restrictions are implemented via merge check hooks, and are listed as hooks too on the REST interface.
The problem is that when someone changes the hooks for this repo, and BEC enforces the hooks, it also deletes the merge check hooks. Then it has to enforce the pr restrictions again.
It's just pure luck that hooks are checked before pr restrictions, so at the end we arrive to the correct config. But this should be fixed.
Consider a repo with some basic PR restrictions and hooks:
In recent versions of Bitbucket the PR restrictions are implemented via merge check hooks, and are listed as hooks too on the REST interface.
The problem is that when someone changes the hooks for this repo, and BEC enforces the hooks, it also deletes the merge check hooks. Then it has to enforce the pr restrictions again.
It's just pure luck that hooks are checked before pr restrictions, so at the end we arrive to the correct config. But this should be fixed.