diff --git a/lib/config/definitions.js b/lib/config/definitions.js index ddf102736f3e0b8c0e8c7ebbc49c327f120269f7..b568b101a2e6a260a8db44b4c271a10b65e8d6a8 100644 --- a/lib/config/definitions.js +++ b/lib/config/definitions.js @@ -697,6 +697,7 @@ const options = [ default: { enabled: false, recreateClosed: true, + rebaseStalePrs: true, branchName: template('branchName', 'lock-file-maintenance'), commitMessage: template('commitMessage', 'lock-file-maintenance'), prTitle: template('prTitle', 'lock-file-maintenance'), diff --git a/lib/workers/branch/index.js b/lib/workers/branch/index.js index 2a6d29bc36aac3385ac7846a8de15521ee1eb34e..4a7bfd3e858004531a7ede7a0b007c1ca757f1c9 100644 --- a/lib/workers/branch/index.js +++ b/lib/workers/branch/index.js @@ -141,8 +141,12 @@ async function processBranch(branchConfig) { } const committedFiles = await commitFilesToBranch(config); - if (config.type === 'lockFileMaintenance' && !config.committedFiles) { - logger.debug( + if ( + config.type === 'lockFileMaintenance' && + !committedFiles && + !config.parentBranch + ) { + logger.warn( 'Deleting lock file maintenance branch as master lock file no longer needs updating' ); return 'delete'; diff --git a/test/config/__snapshots__/index.spec.js.snap b/test/config/__snapshots__/index.spec.js.snap index 4985f2587ceccf25e8b43613e915e5b11bcbe0ba..9e6bbef6554cb70fa6dcc565cd1a66b404d6bbb6 100644 --- a/test/config/__snapshots__/index.spec.js.snap +++ b/test/config/__snapshots__/index.spec.js.snap @@ -38,6 +38,7 @@ Please make sure the following warnings are safe to ignore: {{/each}} {{/if}}", "prTitle": "Lock file maintenance", + "rebaseStalePrs": true, "recreateClosed": true, "schedule": Array [ "on monday",