解决分支过滤未设置导致500

This commit is contained in:
yashin 2018-07-10 11:59:51 +08:00
parent adc6bf8691
commit e053fd2878
2 changed files with 5 additions and 4 deletions

View File

@ -14,7 +14,7 @@
</properties>
<artifactId>gitee-jenkins-plugin</artifactId>
<version>1.0.6-SNAPSHOT</version>
<version>1.0.7-SNAPSHOT</version>
<name>Gitee Jenkins Plugin</name>
<url>https://wiki.jenkins-ci.org/display/JENKINS/Gitee+Jenkins+Plugin</url>
<packaging>hpi</packaging>

View File

@ -465,6 +465,10 @@ public class GiteePushTrigger extends Trigger<Job<?, ?>> {
}
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<Job<?, ?>> {
@Override
protected Object readResolve() throws ObjectStreamException {
if (branchFilterType == null) {
branchFilterType = StringUtils.isNotBlank(branchFilterName) ? BranchFilterType.valueOf(branchFilterName) : BranchFilterType.All;
}
initializeTriggerHandler();
initializeBranchFilter();
initializeMergeRequestLabelFilter();