Is there any way to define a user role for an allowed approver within Stash? I have set up the repository so that pull requests must be approved before merging. I'd like the ability to limit the approvers to say, senior developers, controlled by role, on certain repositories. Any way to do this?
The best thing you can do is to write a generic plugin that listens to these events:
@EventListener public void OpenedListener(final PullRequestOpenedEvent openedEvent) { Set<PullRequestParticipant> reviewers = openedEvent.getPullRequest().getReviewers(); } @EventListener public void RolesUpdatedListener(final PullRequestRolesUpdatedEvent rolesUpdatedEvent) { Set<StashUser> added = rolesUpdatedEvent.getAddedReviewers(); Set<StashUser> removed = rolesUpdatedEvent.getRemovedReviewers(); }
And reject/reset the change if the reviewers are not in the group you want.
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.