From 30c4e1aee99f5ad76dc8b673f80b4107e9aa8447 Mon Sep 17 00:00:00 2001
From: Michael Kriese <michael.kriese@visualon.de>
Date: Tue, 24 Sep 2019 08:54:34 +0200
Subject: [PATCH] fix(worker): fix wrong status check (#4534)

---
 lib/workers/pr/index.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/workers/pr/index.js b/lib/workers/pr/index.js
index dc953c5432..784490b636 100644
--- a/lib/workers/pr/index.js
+++ b/lib/workers/pr/index.js
@@ -66,7 +66,10 @@ async function ensurePr(prConfig) {
         config.forcePr = true;
       }
     }
-    if (config.forcePr || (await getBranchStatus()) === 'failure') {
+    if (
+      config.forcePr ||
+      ['failure', 'error', 'failed'].includes(await getBranchStatus())
+    ) {
       logger.debug(`Branch tests failed, so will create PR`);
     } else {
       return null;
-- 
GitLab