diff --git a/lib/workers/repository/update/branch/check-existing.spec.ts b/lib/workers/repository/update/branch/check-existing.spec.ts index c1f219f22aea3944162f7aab68a0ab35f5f656a5..a26f611cbca2585f911751aa1e888ba5d2a63634 100644 --- a/lib/workers/repository/update/branch/check-existing.spec.ts +++ b/lib/workers/repository/update/branch/check-existing.spec.ts @@ -20,13 +20,13 @@ describe('workers/repository/update/branch/check-existing', () => { }); it('returns false if recreating closed PRs', async () => { - config.recreateWhen = 'always'; + config.recreateClosed = true; expect(await prAlreadyExisted(config)).toBeNull(); expect(platform.findPr).toHaveBeenCalledTimes(0); }); it('returns false if check misses', async () => { - config.recreateWhen = 'auto'; + config.recreateClosed = false; expect(await prAlreadyExisted(config)).toBeNull(); expect(platform.findPr).toHaveBeenCalledTimes(1); }); diff --git a/lib/workers/repository/update/branch/check-existing.ts b/lib/workers/repository/update/branch/check-existing.ts index c0fdba11548862995ff25531e86ca1d4ee313c9b..e0c2bae0f722aa46ae8331e94106866184fe15c0 100644 --- a/lib/workers/repository/update/branch/check-existing.ts +++ b/lib/workers/repository/update/branch/check-existing.ts @@ -8,8 +8,8 @@ export async function prAlreadyExisted( config: BranchConfig ): Promise<Pr | null> { logger.trace({ config }, 'prAlreadyExisted'); - if (config.recreateWhen === 'always') { - logger.debug('recreateWhen is "always". No need to check for closed PR.'); + if (config.recreateClosed) { + logger.debug('recreateClosed is true. No need to check for closed PR.'); return null; } logger.debug(