diff --git a/src/main/java/com/dabsquared/gitlabjenkins/trigger/handler/merge/MergeRequestHookTriggerHandlerImpl.java b/src/main/java/com/dabsquared/gitlabjenkins/trigger/handler/merge/MergeRequestHookTriggerHandlerImpl.java index cf71f2399..19ce4fcc6 100644 --- a/src/main/java/com/dabsquared/gitlabjenkins/trigger/handler/merge/MergeRequestHookTriggerHandlerImpl.java +++ b/src/main/java/com/dabsquared/gitlabjenkins/trigger/handler/merge/MergeRequestHookTriggerHandlerImpl.java @@ -258,6 +258,11 @@ private String getTargetBranchFromBuild(Run mergeBuild) { return cause == null ? null : cause.getData().getTargetBranch(); } + private String getTargetMergeRequestStateFromBuild(Run mergeBuild) { + GitLabWebHookCause cause = mergeBuild.getCause(GitLabWebHookCause.class); + return cause == null ? null : cause.getData().getMergeRequestState(); + } + private boolean isAllowedByConfig(MergeRequestObjectAttributes objectAttributes) { return triggerConfig.apply(objectAttributes); }