设置分支过滤规则

This commit is contained in:
yashin 2018-07-03 15:32:05 +08:00
parent fa8902516a
commit 151ef81c5d
3 changed files with 53 additions and 0 deletions

View File

@ -30,7 +30,44 @@
<f:entry title="${%Set.Build.Desctiption}" field="setBuildDescription">
<f:checkbox default="true"/>
</f:entry>
<f:entry title="${%Allowed.branches}">
<table>
<!--<f:section title="">-->
<f:radioBlock name="branchFilterType" value="All" title="${%Allow.all.branches}"
checked="${instance.branchFilterType == null || instance.branchFilterType == 'All'}"
inline="true" help="/plugin/gitee-plugin/help/help-noBranchFiltering.html"/>
<f:radioBlock name="branchFilterType" value="NameBasedFilter" title="${%Filter.branches.by.name}"
checked="${instance.branchFilterType == 'NameBasedFilter'}" inline="true"
help="/plugin/gitee-plugin/help/help-allowedBranches.html">
<f:entry title="${%Include}">
<f:textbox name="includeBranchesSpec" field="includeBranchesSpec" autoCompleteDelimChar=","/>
</f:entry>
<f:entry title="${%Exclude}">
<f:textbox name="excludeBranchesSpec" field="excludeBranchesSpec" autoCompleteDelimChar=","/>
</f:entry>
</f:radioBlock>
<f:radioBlock name="branchFilterType" value="RegexBasedFilter" title="${%Filter.branches.by.regex}"
checked="${instance.branchFilterType == 'RegexBasedFilter'}" inline="true"
help="/plugin/gitee-plugin/help/help-filterBranchesByRegex.html">
<f:entry title="${%Target.Branch.Regex}">
<f:textbox name="targetBranchRegex" field="targetBranchRegex"/>
</f:entry>
</f:radioBlock>
<!--</f:section> -->
<f:optionalBlock title="${%Filter.merge.request.by.label}" field="mergeRequestLabelFilterConfig"
checked="${instance.mergeRequestLabelFilterConfig != null}">
<f:entry title="${%Include}">
<f:textbox field="includeMergeRequestLabels" name="include" value="${instance.mergeRequestLabelFilterConfig.include}"
autoCompleteDelimChar=","/>
</f:entry>
<f:entry title="${%Exclude}">
<f:textbox field="excludeMergeRequestLabels" name="exclude" value="${instance.mergeRequestLabelFilterConfig.exclude}"
autoCompleteDelimChar=","/>
</f:entry>
</f:optionalBlock>
</table>
</f:entry>
<f:entry title="${%Secret.Token}" help="/plugin/gitee-plugin/help/help-secretToken.html">
<table>
<f:readOnlyTextbox field="secretToken" id="secretToken"/>

View File

@ -22,3 +22,11 @@ GiteePushTrigger.CannotConnectToGitee=Cannot connect to Gitee: {0}
GiteePushTrigger.NoSourceRepository=Repository url must be saved first.
GiteePushTrigger.LabelsNotFound=Following labels doesn''t exist in source repository: {0}
GiteePushTrigger.LabelsMatched=Matching {0} label{0,choice,1#|2#s}.
Allowed.branches=Allowed branches
Allow.all.branches=Allow all branches to trigger this job
Filter.branches.by.name=Filter branches by name
Filter.branches.by.regex=Filter branches by regex
Target.Branch.Regex=Target Branch Regex
Filter.merge.request.by.label=Filter merge request by label
Exclude=Exclude
Include=Include

View File

@ -22,3 +22,11 @@ GiteePushTrigger.CannotConnectToGitee=\u65E0\u6CD5\u94FE\u63A5\u5230 Gitee \uFF1
GiteePushTrigger.NoSourceRepository=\u8BF7\u5148\u4FDD\u5B58\u4ED3\u5E93 URL \u5730\u5740\u3002
GiteePushTrigger.LabelsNotFound=\u4EE5\u4E0B\u6807\u7B7E\u4E0D\u5728\u76EE\u6807\u4ED3\u5E93\u4E2D \uFF1A{0}
GiteePushTrigger.LabelsMatched=\u5339\u914D {0} \u6807\u7B7E {0,choice,1#|2#s} \u3002
Allowed.branches=\u5141\u8BB8\u89E6\u53D1\u6784\u5EFA\u7684\u5206\u652F
Allow.all.branches=\u5141\u8BB8\u6240\u6709\u5206\u652F\u89E6\u53D1\u6784\u5EFA
Filter.branches.by.name=\u6839\u636E\u5206\u652F\u540D\u8FC7\u6EE4
Filter.branches.by.regex=\u6839\u636E\u6B63\u5219\u8868\u8FBE\u5F0F\u8FC7\u6EE4\u5206\u652F
Target.Branch.Regex=\u76EE\u6807\u5206\u652F\u7684\u6B63\u5219\u8868\u8FBE\u5F0F
Filter.merge.request.by.label=\u6839\u636E\u6807\u7B7E\u8FC7\u6EE4PR
Exclude=\u6392\u9664
Include=\u5305\u62EC