diff --git a/lib/workers/branch/index.ts b/lib/workers/branch/index.ts index 4173209ffa0c0d84955ff930eb79254cf2a0175b..46cc828e91d558c232e38c1fed70bea245eff731 100644 --- a/lib/workers/branch/index.ts +++ b/lib/workers/branch/index.ts @@ -338,13 +338,21 @@ export async function processBranch( } } - // istanbul ignore if - if ( + const userRebaseRequested = dependencyDashboardCheck === 'rebase' || - config.dependencyDashboardRebaseAllOpen - ) { + config.dependencyDashboardRebaseAllOpen || + config.rebaseRequested; + + if (userRebaseRequested) { logger.debug('Manual rebase requested via Dependency Dashboard'); config.reuseExistingBranch = false; + } else if (branchExists && config.rebaseWhen === 'never') { + logger.debug('rebaseWhen=never so skipping branch update check'); + return { + branchExists, + prNo: branchPr?.number, + result: BranchResult.NoWork, + }; } else { config = { ...config, ...(await shouldReuseExistingBranch(config)) }; } @@ -430,16 +438,7 @@ export async function processBranch( }); } } - const forcedManually = - !!dependencyDashboardCheck || config.rebaseRequested || !branchExists; - if (!forcedManually && config.rebaseWhen === 'never') { - logger.debug(`Skipping commit (rebaseWhen=never)`); - return { - branchExists, - prNo: branchPr?.number, - result: BranchResult.NoWork, - }; - } + const forcedManually = userRebaseRequested || !branchExists; config.forceCommit = forcedManually || branchPr?.isConflicted; const commitSha = await commitFilesToBranch(config); // istanbul ignore if @@ -466,8 +465,7 @@ export async function processBranch( // but do not break when there are artifact errors if ( !config.artifactErrors?.length && - !dependencyDashboardCheck && - !config.rebaseRequested && + !userRebaseRequested && commitSha && config.prCreation !== 'immediate' ) { diff --git a/lib/workers/repository/dependency-dashboard.ts b/lib/workers/repository/dependency-dashboard.ts index 7953327c40e64bacd70c7dce5356a71e09c5d120..7220cb3483b1213de6d9c5bb576247814a9cdb7e 100644 --- a/lib/workers/repository/dependency-dashboard.ts +++ b/lib/workers/repository/dependency-dashboard.ts @@ -271,14 +271,6 @@ export async function ensureDependencyDashboard( issueBody += '## Other Branches\n\n'; issueBody += `These updates are pending. To force PRs open, click the checkbox below.\n\n`; for (const branch of otherBranches) { - logger.info( - { - prBlockedBy: branch.prBlockedBy, - prNo: branch.prNo, - result: branch.result, - }, - 'Blocked PR' - ); issueBody += getListItem(branch, 'other'); } issueBody += '\n';