Hi community,
I would like to restrict merging on a repository
1. Only the creator of the PR is able to merge or users in group X
2. At least 2 reviewers, one has to be from from group X
How can I achieve this goal?
The paid ScriptRunner for Bitbucket add-on might have an ability to do this. I'm not familiar enough with it to say for sure, but scan through the docs or try an evaluation and click around. It might work!
Otherwise write your own pre-receive plugin for Bitbucket Server. YACC is a good starting point since it's open source - download Atlassian SDK, clone YACC, type "atlas-run", and start hacking! (Note: every time you type "atlas-package" afterwards, your local developer Bitbucket instance will reload to grab your latest logic). The key call would be something like this in the hook:
if (thingsAreGood) {
return RepositoryHookResult.accepted();
} else {
return RepositoryHookResult.rejected("summaryRejectMessage", "detailedRejectMessage");
}
My own free Control Freak add-on cannot handle the scenario you described.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.