diff --git a/lib/workers/branch/index.js b/lib/workers/branch/index.js index 6e7183733cc889e8ca45dfe58e06b94b20cb421a..46cf035bbacc2c9656d9cb7bd4d125f070db068b 100644 --- a/lib/workers/branch/index.js +++ b/lib/workers/branch/index.js @@ -39,15 +39,6 @@ async function processBranch(branchConfig, prHourlyLimitReached, packageFiles) { if (masterIssueCheck) { logger.info('Branch has been checked in master issue: ' + masterIssueCheck); } - // istanbul ignore if - if (!branchExists && config.masterIssueApproval) { - if (masterIssueCheck) { - logger.info(`Branch ${config.branchName} is approved for creation`); - } else { - logger.info(`Branch ${config.branchName} needs approval`); - return 'needs-approval'; - } - } try { logger.debug( `Branch has ${dependencies ? dependencies.length : 0} upgrade(s)` @@ -94,6 +85,15 @@ async function processBranch(branchConfig, prHourlyLimitReached, packageFiles) { } return 'already-existed'; } + // istanbul ignore if + if (!branchExists && config.masterIssueApproval) { + if (masterIssueCheck) { + logger.info(`Branch ${config.branchName} is approved for creation`); + } else { + logger.info(`Branch ${config.branchName} needs approval`); + return 'needs-approval'; + } + } if (!branchExists && prHourlyLimitReached && !masterIssueCheck) { logger.info('Reached PR creation limit - skipping branch creation'); return 'pr-hourly-limit-reached';