From 03cd834a218216cbab892601521f13fd02629f59 Mon Sep 17 00:00:00 2001 From: Michael Kriese <michael.kriese@visualon.de> Date: Wed, 27 Feb 2019 18:36:24 +0100 Subject: [PATCH] fix(pr): Check more error status values. (#3276) (#3278) fix(pr): Check more error status values. (#3276) --- lib/workers/pr/index.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/workers/pr/index.js b/lib/workers/pr/index.js index f7c34de6d9..1e4d53a9cf 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}` ); -- GitLab