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!
What version of Bitbucket are you on? I don't think mergeRequest.veto() works on Bitbucket 6.
If you just want to block "Needs Work" pull-requests from merging, our Control Freak plugin provides that with just a few clicks:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thejeswara, ee need more context to be able to help you:
Please give us a better description of your situation or environment, otherwise we have no idea to know what's going on.
Cheers,
Ana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This script is about checking and blocking users until they wil get approval to merge the code on bitbucket branches.
It will be helpful if you forward this ticket to groovy script expert.
Thanks,
Thejes
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thejes,
I'm afraid I won't be able to do that, as plugins are from third-party vendors. What you can do is to try to find the plugin vendor in our Marketplace section in Community, find them in the Marketplace and contact them directly, or let us know which plugin it is to see if someone with knowledge about it could help you.
Kind regards,
Ana.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.