From 944ddd5cfbbc594d31533296420c7ff0559c2236 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juha=20Syrj=C3=A4l=C3=A4?= Date: Sat, 24 Oct 2015 18:35:00 +0300 Subject: [PATCH 1/2] Add missing getter for acceptMergeRequestOnSuccess. It seems that jenkins doesn't update checkbox status if getter is missing. Fixes #120 and https://issues.jenkins-ci.org/browse/JENKINS-31122 --- .../java/com/dabsquared/gitlabjenkins/GitLabPushTrigger.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/dabsquared/gitlabjenkins/GitLabPushTrigger.java b/src/main/java/com/dabsquared/gitlabjenkins/GitLabPushTrigger.java index 42e5c63..a1ac315 100644 --- a/src/main/java/com/dabsquared/gitlabjenkins/GitLabPushTrigger.java +++ b/src/main/java/com/dabsquared/gitlabjenkins/GitLabPushTrigger.java @@ -128,6 +128,10 @@ public class GitLabPushTrigger extends Trigger> { return addVoteOnMergeRequest; } + public boolean getAcceptMergeRequestOnSuccess() { + return acceptMergeRequestOnSuccess; + } + public boolean getAllowAllBranches() { return allowAllBranches; } From f933c79b173b0b92836bfc0b7b4375c18844e9c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juha=20Syrj=C3=A4l=C3=A4?= Date: Sat, 24 Oct 2015 20:01:32 +0300 Subject: [PATCH 2/2] Make Accept merge request on success to default to false. Accepting automatically merge requests when jenkins job is successful is not that common workflow. Also manually fixing missed merge request acception is easier than fixing unintended merge request. https://en.wikipedia.org/wiki/Principle_of_least_astonishment --- .../com/dabsquared/gitlabjenkins/GitLabPushTrigger/config.jelly | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/com/dabsquared/gitlabjenkins/GitLabPushTrigger/config.jelly b/src/main/resources/com/dabsquared/gitlabjenkins/GitLabPushTrigger/config.jelly index 3655f8f..46ddcf0 100644 --- a/src/main/resources/com/dabsquared/gitlabjenkins/GitLabPushTrigger/config.jelly +++ b/src/main/resources/com/dabsquared/gitlabjenkins/GitLabPushTrigger/config.jelly @@ -22,7 +22,7 @@ - +