diff --git a/lib/workers/pr/index.js b/lib/workers/pr/index.js index 0d8ab9bf092d14b2f6ef53bb5fd52f5334e6dd94..5633924ae71ce070a04cf79bb0458ebacd7fd527 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();