Skip to content
Snippets Groups Projects
Commit eec2072a authored by Rhys Arkins's avatar Rhys Arkins
Browse files

fix: reorder master issue approval check

parent d6d9ded1
No related branches found
Tags 38.107.1
No related merge requests found
......@@ -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';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment