I've done a lot of research and haven't had any luck chasing down how to do this.
I am writing a stash plugin and want to know if its possible to get the "to branch" name programmatically?
I would have assumed it would be available somewhere in MergeRequest "request" or request.getPullRequest().
Any help or guidance would be appreciated I've been chasing this off and on for weeks.
Community moderators have prevented the ability to post new answers.
I think you are looking for PullRequest.getFromRef() and PullRequest.getToRef() .
An example for people:
if (!context.getMergeRequest().getPullRequest().getToRef().getId().equalsIgnoreCase("refs/heads/develop"))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.