From adf707feea910bf39715cd5e414cc45520233f13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Markacz?= <tomas@markacz.com> Date: Wed, 16 Oct 2019 18:10:29 +0200 Subject: [PATCH] fix(branch): fix PR creation not pending for GitLab (#4664) When using GitLab, branch status can have status `created` which should be interpreted as pending for PR creation configuration option. --- lib/workers/pr/index.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/workers/pr/index.js b/lib/workers/pr/index.js index 0d8ab9bf09..5633924ae7 100644 --- a/lib/workers/pr/index.js +++ b/lib/workers/pr/index.js @@ -50,10 +50,7 @@ async function ensurePr(prConfig) { logger.debug( `Branch is configured for branch automerge, branch status) is: ${await getBranchStatus()}` ); - if ( - (await getBranchStatus()) === 'pending' || - (await getBranchStatus()) === 'running' - ) { + if (['created', 'pending', 'running'].includes(await getBranchStatus())) { logger.debug('Checking how long this branch has been pending'); const lastCommitTime = await platform.getBranchLastCommitTime(branchName); const currentTime = new Date(); -- GitLab