@@ -19,7 +19,7 @@ interface InitSuccessStatusReport extends actionsUtil.StatusReportBase {
1919 paths_ignore : string ;
2020 // Commas-separated list of languages where the default queries are disabled
2121 disable_default_queries : string ;
22- // Comma-separated list of queries sources, from the 'queries' config field
22+ // Comma-separated list of queries sources, from the 'queries' config field or workflow input
2323 queries : string ;
2424}
2525
@@ -44,9 +44,20 @@ async function sendSuccessStatusReport(
4444 ]
4545 ? languages
4646 : "" ;
47- const queries = ( config . originalUserInput . queries || [ ] )
48- . map ( ( q ) => q . uses )
49- . join ( "," ) ;
47+
48+ const queries : string [ ] = [ ] ;
49+ let queriesInput = actionsUtil . getOptionalInput ( "queries" ) ?. trim ( ) ;
50+ if ( queriesInput === undefined || queriesInput . startsWith ( "+" ) ) {
51+ queries . push (
52+ ...( config . originalUserInput . queries || [ ] ) . map ( ( q ) => q . uses )
53+ ) ;
54+ }
55+ if ( queriesInput !== undefined ) {
56+ queriesInput = queriesInput . startsWith ( "+" )
57+ ? queriesInput . substr ( 1 )
58+ : queriesInput ;
59+ queries . push ( ...queriesInput . split ( "," ) ) ;
60+ }
5061
5162 const statusReport : InitSuccessStatusReport = {
5263 ...statusReportBase ,
@@ -55,7 +66,7 @@ async function sendSuccessStatusReport(
5566 paths,
5667 paths_ignore : pathsIgnore ,
5768 disable_default_queries : disableDefaultQueries ,
58- queries,
69+ queries : queries . join ( "," ) ,
5970 } ;
6071
6172 await actionsUtil . sendStatusReport ( statusReport ) ;
0 commit comments