diff --git a/lib/workers/pr/index.js b/lib/workers/pr/index.js index f7c34de6d95cf5ebf59cdfe6e325cf191a446d05..1e4d53a9cf5ad68c888d5f638889d0176e3d9c04 100644 --- a/lib/workers/pr/index.js +++ b/lib/workers/pr/index.js @@ -179,7 +179,10 @@ async function ensurePr(prConfig) { if (existingPr) { logger.debug('Processing existing PR'); // istanbul ignore if - if (config.automerge && (await getBranchStatus()) === 'failure') { + if ( + config.automerge && + ['failure', 'error', 'failed'].includes(await getBranchStatus()) + ) { logger.debug(`Setting assignees and reviewers as status checks failed`); await addAssigneesReviewers(config, existingPr); } @@ -299,7 +302,10 @@ async function ensurePr(prConfig) { } } // Skip assign and review if automerging PR - if (config.automerge && (await getBranchStatus()) !== 'failure') { + if ( + config.automerge && + !['failure', 'error', 'failed'].includes(await getBranchStatus()) + ) { logger.debug( `Skipping assignees and reviewers as automerge=${config.automerge}` );