@@ -274,9 +274,11 @@ export class GithubApp {
274
274
user = r . user ;
275
275
project = r . project ;
276
276
277
- const runPrebuild = this . appRules . shouldRunPrebuild ( config , branch == repo . default_branch , false , false ) ;
277
+ const runPrebuild =
278
+ this . prebuildManager . shouldPrebuild ( config ) &&
279
+ this . appRules . shouldRunPrebuild ( config , branch == repo . default_branch , false , false ) ;
278
280
if ( ! runPrebuild ) {
279
- const reason = `Not running prebuild, the user did not enable it for this context` ;
281
+ const reason = `Not running prebuild, the user did not enable it for this context or did not configure prebuild task(s) ` ;
280
282
log . debug ( logCtx , reason , { contextURL } ) ;
281
283
span . log ( { "not-running" : reason , config : config } ) ;
282
284
return ;
@@ -448,7 +450,8 @@ export class GithubApp {
448
450
const contextURL = pr . html_url ;
449
451
450
452
const isFork = pr . head . repo . id !== pr . base . repo . id ;
451
- const runPrebuild = this . appRules . shouldRunPrebuild ( config , false , true , isFork ) ;
453
+ const runPrebuild =
454
+ this . prebuildManager . shouldPrebuild ( config ) && this . appRules . shouldRunPrebuild ( config , false , true , isFork ) ;
452
455
let prebuildStartPromise : Promise < StartPrebuildResult > | undefined ;
453
456
if ( runPrebuild ) {
454
457
const commitInfo = await this . getCommitInfo ( user , ctx . payload . repository . html_url , pr . head . sha ) ;
@@ -461,11 +464,16 @@ export class GithubApp {
461
464
prebuildStartPromise . catch ( ( err ) => log . error ( err , "Error while starting prebuild" , { contextURL } ) ) ;
462
465
return prebuildStartPromise ;
463
466
} else {
464
- log . debug ( { userId : user . id } , `Not running prebuild, the user did not enable it for this context` , null , {
465
- contextURL,
466
- userId : user . id ,
467
- project,
468
- } ) ;
467
+ log . debug (
468
+ { userId : user . id } ,
469
+ `Not running prebuild, the user did not enable it for this context or did not configure prebuild task(s)` ,
470
+ null ,
471
+ {
472
+ contextURL,
473
+ userId : user . id ,
474
+ project,
475
+ } ,
476
+ ) ;
469
477
return ;
470
478
}
471
479
}
0 commit comments