diff --git a/lib/workers/repository/update/branch/handle-existing.ts b/lib/workers/repository/update/branch/handle-existing.ts index aa99ace74af5c8a92c710962ef70885d6e5def7e..bc7a79deb7c00ec817a24ec868753cca5b7160b3 100644 --- a/lib/workers/repository/update/branch/handle-existing.ts +++ b/lib/workers/repository/update/branch/handle-existing.ts @@ -47,8 +47,6 @@ export async function handleClosedPr( await scm.deleteBranch(config.branchName); } } - } else if (pr.state === 'merged') { - logger.debug(`Merged PR with PrNo: ${pr.number} is blocking this branch`); } } diff --git a/lib/workers/repository/update/branch/index.spec.ts b/lib/workers/repository/update/branch/index.spec.ts index 4a438e25442d8668a9313e6e252c1f470ff0c3eb..7ec2535e19f3f6c09bc35c6308f0eb2405018135 100644 --- a/lib/workers/repository/update/branch/index.spec.ts +++ b/lib/workers/repository/update/branch/index.spec.ts @@ -318,7 +318,7 @@ describe('workers/repository/update/branch/index', () => { expect(scm.deleteBranch).toHaveBeenCalledTimes(1); }); - it('skips branch if merged PR found', async () => { + it('allows branch even if merged PR found', async () => { const pr = partial<Pr>({ number: 13, state: 'merged', @@ -329,7 +329,7 @@ describe('workers/repository/update/branch/index', () => { await branchWorker.processBranch(config); expect(reuse.shouldReuseExistingBranch).toHaveBeenCalledTimes(0); expect(logger.debug).toHaveBeenCalledWith( - `Merged PR with PrNo: ${pr.number} is blocking this branch` + `Matching PR #${pr.number} was merged previously` ); }); diff --git a/lib/workers/repository/update/branch/index.ts b/lib/workers/repository/update/branch/index.ts index 003da47bb0c4ba2de3262c8334a6c7f33165dcbc..b66fd7850efbe15a4d036be9b08a4e5e2249553c 100644 --- a/lib/workers/repository/update/branch/index.ts +++ b/lib/workers/repository/update/branch/index.ts @@ -155,8 +155,7 @@ export async function processBranch( config.automerge = false; config.automergedPreviously = true; } - } - if (!branchPr && existingPr && !dependencyDashboardCheck) { + } else if (!branchPr && existingPr && !dependencyDashboardCheck) { logger.debug( { prTitle: config.prTitle }, 'Closed PR already exists. Skipping branch.'