I managed to implement "isAdminMergeCheck" following a tutorial: https://developer.atlassian.com/server/bitbucket/tutorials-and-examples/controlling-when-pull-requests-can-be-merged/
But for my check, I need to call this plugin only for certain branches (only for "master" and "develop"). Yet, using the Atlassian API, i can't get it. I tried using "getPullRequest().getToRef()" but I don't think it contains information about destiny branch. Or maybe I can't use it?
How to check destination branch in MergeCheck? Or how to call mergeCheck only for certain branches?
You can get the name of the destination branch of the pull request by using `request.getToRef().getId()` where `request` is your `PullRequestMergeHookRequest`.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.