Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Stash Approver Role

Brett Lyons May 29, 2014

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?

2 answers

1 accepted

0 votes
Answer accepted
Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 16, 2014

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.

0 votes
Brett Lyons June 16, 2014

Nothing for this?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events