Need to ensure that any PR on branch Target which contains files in \dir\subdir\subsub\... are approved by John Doe or Steve Smith. There may other approvers (Tom, Dick, Harry, Mary) but at least one the approvers must be John or Steve
Hi David,
Another option is to use the concept of Code Owners. These are engineers who:
- are experts in a specific code area
- can give valuable feedback to other team members
- are interested that the code quality stays great
On Bitbucket, you can use the app Code Owners for Bitbucket.
These are the necessary steps for your use case:
1. put a file called CODEOWNERS into your repository
2. add Code Owners groups (line 1+2) to that file. Alternatively, you can also reference a Bitbucket user reviewer groups instead of defining your own groups for easier maintenance.
3. a rule with a file glob with the assigned code owner groups (line 3)
4. and a merge check (line 4)
@@@mandatory_reviewers @JohnDoe @SteveSmith
@@@other_reviewers @Tom @Dick @Harry @Mary
dir/subdir/subsub/** @@mandatory_reviewers @@other_reviewers
Check(@@mandatory_reviewers >= 1)
You can play around with this without installing the app, by using our Code Owners Playground.
Let me know if you have any questions. More details can be found in our docs.
Best regards,
Michael from Mibex (vendor of the app Code Owners)
Hi David, welcome to the community!
I believe Bitbucket server/datacenter does not have file/path reviewer configuration.
We have built Workzone to enable teams like yours to cover exactly this use case.
You can define which reviewers need to review which files/paths and you can enforce required approvals for each file/path by setting an approval quota. Workzone can block PR merges until all required approvals are given.
This is also a huge time-saver for your team as Workzone only adds relevant file/path reviewers _if_ the file/path is part of the PR changeset.
Let us know if you need help setting this up or schedule a quick demo.
Hope this helps!
Best, Ulrich
// Izymes - Tools for efficient teams
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.