File tree Expand file tree Collapse file tree 2 files changed +18
-6
lines changed
Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -45,10 +45,16 @@ function run() {
4545 }
4646 args . push ( '-p' ) ;
4747 args . push ( policy ) ;
48- let categories = core . getInput ( 'categories' ) ;
49- if ( ! client . isNullOrWhiteSpace ( categories ) ) {
48+ let categoriesString = core . getInput ( 'categories' ) ;
49+ if ( ! client . isNullOrWhiteSpace ( categoriesString ) ) {
50+ let categories = categoriesString . split ( ',' ) ;
5051 args . push ( '--categories' ) ;
51- args . push ( categories ) ;
52+ for ( let i = 0 ; i < categories . length ; i ++ ) {
53+ let category = categories [ i ] ;
54+ if ( ! client . isNullOrWhiteSpace ( category ) ) {
55+ args . push ( category . trim ( ) ) ;
56+ }
57+ }
5258 }
5359 let languages = core . getInput ( 'languages' ) ;
5460 if ( ! client . isNullOrWhiteSpace ( languages ) ) {
Original file line number Diff line number Diff line change @@ -21,10 +21,16 @@ async function run() {
2121 args . push ( '-p' ) ;
2222 args . push ( policy ) ;
2323
24- let categories : string = core . getInput ( 'categories' ) ;
25- if ( ! client . isNullOrWhiteSpace ( categories ) ) {
24+ let categoriesString : string = core . getInput ( 'categories' ) ;
25+ if ( ! client . isNullOrWhiteSpace ( categoriesString ) ) {
26+ let categories = categoriesString . split ( ',' ) ;
2627 args . push ( '--categories' ) ;
27- args . push ( categories )
28+ for ( let i = 0 ; i < categories . length ; i ++ ) {
29+ let category = categories [ i ] ;
30+ if ( ! client . isNullOrWhiteSpace ( category ) ) {
31+ args . push ( category . trim ( ) ) ;
32+ }
33+ }
2834 }
2935
3036 let languages : string = core . getInput ( 'languages' ) ;
You can’t perform that action at this time.
0 commit comments