From e053fd28788aa992817cb9e0300df0bed75c2df7 Mon Sep 17 00:00:00 2001 From: yashin Date: Tue, 10 Jul 2018 11:59:51 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=88=86=E6=94=AF=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E6=9C=AA=E8=AE=BE=E7=BD=AE=E5=AF=BC=E8=87=B4500?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../java/com/gitee/jenkins/trigger/GiteePushTrigger.java | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 71d4d43..6bf22bb 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ gitee-jenkins-plugin - 1.0.6-SNAPSHOT + 1.0.7-SNAPSHOT Gitee Jenkins Plugin https://wiki.jenkins-ci.org/display/JENKINS/Gitee+Jenkins+Plugin hpi diff --git a/src/main/java/com/gitee/jenkins/trigger/GiteePushTrigger.java b/src/main/java/com/gitee/jenkins/trigger/GiteePushTrigger.java index 9f61827..c89612b 100644 --- a/src/main/java/com/gitee/jenkins/trigger/GiteePushTrigger.java +++ b/src/main/java/com/gitee/jenkins/trigger/GiteePushTrigger.java @@ -465,6 +465,10 @@ public class GiteePushTrigger extends Trigger> { } private void initializeBranchFilter() { + if (branchFilterType == null) { + branchFilterType = StringUtils.isNotBlank(branchFilterName) ? BranchFilterType.valueOf(branchFilterName) : BranchFilterType.All; + } + branchFilter = BranchFilterFactory.newBranchFilter(branchFilterConfig() .withIncludeBranchesSpec(includeBranchesSpec) .withExcludeBranchesSpec(excludeBranchesSpec) @@ -478,9 +482,6 @@ public class GiteePushTrigger extends Trigger> { @Override protected Object readResolve() throws ObjectStreamException { - if (branchFilterType == null) { - branchFilterType = StringUtils.isNotBlank(branchFilterName) ? BranchFilterType.valueOf(branchFilterName) : BranchFilterType.All; - } initializeTriggerHandler(); initializeBranchFilter(); initializeMergeRequestLabelFilter();