From 9507062e85f59ab1727e84f91c77e69ae38d5a22 Mon Sep 17 00:00:00 2001
From: Rhys Arkins <rhys@arkins.net>
Date: Wed, 13 Feb 2019 11:47:07 -0500
Subject: [PATCH] =?UTF-8?q?refactor(gitlab):=20don=E2=80=99t=20warn=20for?=
 =?UTF-8?q?=20status=20transition=20errors?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 lib/platform/gitlab/index.js | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/lib/platform/gitlab/index.js b/lib/platform/gitlab/index.js
index 11b2fa5a1a..7a2469717b 100644
--- a/lib/platform/gitlab/index.js
+++ b/lib/platform/gitlab/index.js
@@ -383,8 +383,17 @@ async function setBranchStatus(
   try {
     await get.post(url, { body: options });
   } catch (err) /* istanbul ignore next */ {
-    logger.debug({ err });
-    logger.warn('Failed to set branch status');
+    if (
+      err.message &&
+      err.messages.startsWith(
+        'Cannot transition status via :enqueue from :pending'
+      )
+    ) {
+      logger.info('Ignoring status transition error');
+    } else {
+      logger.debug({ err });
+      logger.warn('Failed to set branch status');
+    }
   }
 }
 
-- 
GitLab