Skip to content

Commit

Permalink
fix: jenkinsci#636 fix Jenkins won't trigger a build of merge commit …
Browse files Browse the repository at this point in the history
…on merged Merge Request
  • Loading branch information
赵立 committed Mar 23, 2021
1 parent 699474c commit efcd270
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit efcd270

Please sign in to comment.