The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Stash Approver Role

Brett Lyons
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

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 Champions.
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
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 16, 2014

Nothing for this?

TAGS
AUG Leaders

Atlassian Community Events