diff --git a/lib/workers/repository/update/branch/index.ts b/lib/workers/repository/update/branch/index.ts index 8c145295ba2d31..050ce7403f71e6 100644 --- a/lib/workers/repository/update/branch/index.ts +++ b/lib/workers/repository/update/branch/index.ts @@ -171,6 +171,17 @@ export async function processBranch( result: 'already-existed', }; } + if ( + !branchExists && + branchConfig.pendingChecks && + !dependencyDashboardCheck + ) { + return { + branchExists: false, + prNo: branchPr?.number, + result: 'pending', + }; + } // istanbul ignore if if (!branchExists && config.dependencyDashboardApproval) { if (dependencyDashboardCheck) { @@ -209,17 +220,6 @@ export async function processBranch( result: 'commit-limit-reached', }; } - if ( - !branchExists && - branchConfig.pendingChecks && - !dependencyDashboardCheck - ) { - return { - branchExists: false, - prNo: branchPr?.number, - result: 'pending', - }; - } if (branchExists) { // check if branch is labelled to stop config.stopUpdating = branchPr?.labels?.includes(