Forums

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

ScriptRunner: how to check if a user from a specific reviewer group approved

Serkan Erdur
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!
January 23, 2026
Even if a user from XyzReviewers group approves this behaves like not, in a conditional merge check script.

import
com.atlassian.sal.api.component.ComponentLocator
import com.atlassian.bitbucket.user.UserService

def userService = ComponentLocator.getComponent(UserService)
!mergeRequest.pullRequest.reviewers.findAll { it.approved }.any {
    userService.isUserInGroup(it.user, "XyzReviewers ")
}

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events