Hello All,
Here I have the code below which is not working properly.
import com.atlassian.bitbucket.pull.PullRequestParticipantStatus
import com.atlassian.bitbucket.scm.pull.MergeRequest
def mergeRequest = mergeRequest as MergeRequest
if (mergeRequest.pullRequest.reviewers.any { it.status == PullRequestParticipantStatus.NEEDS_WORK }) {
mergeRequest.veto("Please consult the reviewer.", "The merge is blocked by at least one reviewer.")
}
Kindly Help me ASAP!
Thanks in advance!