This repository was archived by the owner on Jul 18, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 1616
1717export interface Configuration {
1818 publish : string ;
19- scripts : string [ ] ;
19+ scripts ? : string [ ] ;
2020 version ?: string ;
2121 access ?: string ;
2222 tag ?: string [ ] ;
Original file line number Diff line number Diff line change @@ -143,13 +143,17 @@ const PrepareStep: NpmStep = {
143143 }
144144
145145 // raise the check
146+ const body =
147+ ctx . configuration ?. parameters ?. scripts ?. length > 0
148+ ? `Running \`npm run --if-present ${ ctx . configuration ?. parameters ?. scripts ?. join (
149+ " " ,
150+ ) } \``
151+ : `Running npm Build` ;
146152 params . check = await github . createCheck ( ctx , params . project . id , {
147153 sha : commit . sha ,
148154 title : "npm run" ,
149155 name : `${ ctx . skill . name } /${ ctx . configuration ?. name } /run` ,
150- body : `Running \`npm run --if-present ${ ctx . configuration ?. parameters ?. scripts . join (
151- " " ,
152- ) } \``,
156+ body,
153157 } ) ;
154158
155159 return status . success ( ) ;
@@ -277,7 +281,7 @@ const NpmScriptsStep: NpmStep = {
277281 ?. after ||
278282 ( ctx . data as subscription . types . OnTagSubscription ) . Tag ?. [ 0 ] ?. commit ;
279283 const cfg = ctx . configuration ?. parameters ;
280- const scripts = cfg . scripts ;
284+ const scripts = cfg . scripts || [ ] ;
281285
282286 // Run scripts
283287 for ( const script of scripts ) {
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ export const Skill = skill<
6969 type : ParameterType . StringArray ,
7070 displayName : "npm scripts" ,
7171 description : "Provide name of npm scripts to run in order" ,
72- required : true ,
72+ required : false ,
7373 } ,
7474 version : {
7575 type : ParameterType . String ,
You can’t perform that action at this time.
0 commit comments