File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
java/org/jenkinsci/plugins/gogs
resources/org/jenkinsci/plugins/gogs/GogsProjectProperty Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,10 @@ public String getGogsBranchFilter() {
5858 return this .gogsBranchFilter ;
5959 }
6060
61+ public boolean getHasBranchFilter () {
62+ return gogsBranchFilter != null && gogsBranchFilter .length () > 0 ;
63+ }
64+
6165 private static final Logger LOGGER = Logger .getLogger (GogsWebHook .class .getName ());
6266
6367 @ Extension
Original file line number Diff line number Diff line change 66 <f : password field =" gogsSecret" />
77 </f : entry >
88 </f : optionalBlock >
9- <f : optionalBlock title =" Branch Filter" inline =" true" checked =" ${instance.gogsBranchFilter != null }" >
10- <f : entry title =" ${%BranchFilter}" description = " default: master " >
11- <f : textbox default = " master " field =" gogsBranchFilter" />
9+ <f : optionalBlock title =" Branch Filter" inline =" true" checked =" ${instance.hasBranchFilter }" >
10+ <f : entry title =" ${%BranchFilter}" >
11+ <f : textbox field =" gogsBranchFilter" />
1212 </f : entry >
1313 </f : optionalBlock >
1414 </f : section >
You can’t perform that action at this time.
0 commit comments