File tree Expand file tree Collapse file tree 2 files changed +36
-12
lines changed
Expand file tree Collapse file tree 2 files changed +36
-12
lines changed Original file line number Diff line number Diff line change @@ -45,15 +45,27 @@ 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 ) ) {
5050 args . push ( '--categories' ) ;
51- args . push ( categories ) ;
51+ let categories = categoriesString . split ( ',' ) ;
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 }
53- let languages = core . getInput ( 'languages' ) ;
54- if ( ! client . isNullOrWhiteSpace ( languages ) ) {
59+ let languagesString = core . getInput ( 'languages' ) ;
60+ if ( ! client . isNullOrWhiteSpace ( languagesString ) ) {
61+ let languages = languagesString . split ( ',' ) ;
5562 args . push ( '--languages' ) ;
56- args . push ( languages ) ;
63+ for ( let i = 0 ; i < languages . length ; i ++ ) {
64+ let language = languages [ i ] ;
65+ if ( ! client . isNullOrWhiteSpace ( language ) ) {
66+ args . push ( language . trim ( ) ) ;
67+ }
68+ }
5769 }
5870 args . push ( '--github' ) ;
5971 yield client . run ( args , 'microsoft/security-devops-action' ) ;
Original file line number Diff line number Diff line change @@ -21,16 +21,28 @@ 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 ) ) {
2626 args . push ( '--categories' ) ;
27- args . push ( categories )
27+ let categories = categoriesString . split ( ',' ) ;
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
30- let languages : string = core . getInput ( 'languages' ) ;
31- if ( ! client . isNullOrWhiteSpace ( languages ) ) {
36+ let languagesString : string = core . getInput ( 'languages' ) ;
37+ if ( ! client . isNullOrWhiteSpace ( languagesString ) ) {
38+ let languages = languagesString . split ( ',' ) ;
3239 args . push ( '--languages' ) ;
33- args . push ( languages )
40+ for ( let i = 0 ; i < languages . length ; i ++ ) {
41+ let language = languages [ i ] ;
42+ if ( ! client . isNullOrWhiteSpace ( language ) ) {
43+ args . push ( language . trim ( ) ) ;
44+ }
45+ }
3446 }
3547
3648 args . push ( '--github' ) ;
You can’t perform that action at this time.
0 commit comments