Hi @Serkan Erdur
You could try something like this:-
import com.atlassian.sal.api.component.ComponentLocatorimport com.atlassian.bitbucket.user.UserServiceimport com.atlassian.bitbucket.pull.PullRequestParticipantdef targetGroup = "NameOfYourReviewerGroup"def userService = ComponentLocator.getComponent(UserService)def approvedBySpecificGroup = mergeRequest.pullRequest.reviewers.findAll { it.approved }.any { participant -> userService.isUserInGroup(participant.user, targetGroup)}approvedBySpecificGroup
The example above is similar to the code you provided, with a minor modification.
Let me know how it goes.
Thank you and Kind regards,Ram
I think it should return !approvedBySpecificGroup because merge is blocked if condition is true.Nevertheless this changed nothing.
It looks like you're new here. Sign in or register to get started.