diff --git a/lib/workers/branch/index.js b/lib/workers/branch/index.js index c3f69a4cb7e2fb5626399b51821233cca007ac95..657299ce31dbded4166684b9e283a19c0f2cd856 100644 --- a/lib/workers/branch/index.js +++ b/lib/workers/branch/index.js @@ -68,19 +68,18 @@ async function processBranch(branchConfig) { if (pr.state === 'open') { logger.debug({ pr }, 'Existing PR is open'); if (!pr.canRebase) { - logger.warn('PR has been edited'); - /* const subject = 'PR has been edited'; + logger.info(subject); let content = 'As this PR has been edited, Renovate will stop updating it in order to not cause any conflicts or other problems.'; content += ' If you wish to abandon your edits and have Renovate recreate this PR then you should rename this PR and then close it.'; await platform.ensureComment(pr.number, subject, content); - */ return 'pr-edited'; } } else { logger.warn({ pr }, 'PR state is not open'); + return 'pr-closed'; } } diff --git a/lib/workers/repository/index.js b/lib/workers/repository/index.js index ef6f1ad13ff73eb5d9078b30c3f9179eaa38e5c8..9dccd72c434b91e177164e27bf3228f4c2d9a7b3 100644 --- a/lib/workers/repository/index.js +++ b/lib/workers/repository/index.js @@ -28,7 +28,7 @@ async function renovateRepository(repoConfig, token, loop = 1) { const res = config.repoIsOnboarded ? await writeUpdates(config) : await ensureOnboardingPr(config); - if (res === 'automerged') { + if (res === 'pr-closed' || res === 'automerged') { logger.info('Restarting repo renovation after automerge'); return renovateRepository(repoConfig, token, loop + 1); } diff --git a/lib/workers/repository/write.js b/lib/workers/repository/write.js index 076f6e06884200d731010ef65c12d1b809c6b5bf..749dfd0d8acf2641a06a384d9565d18fdf361bc6 100644 --- a/lib/workers/repository/write.js +++ b/lib/workers/repository/write.js @@ -17,9 +17,9 @@ async function writeUpdates(config) { try { for (const branch of branches) { const res = await branchWorker.processBranch({ ...branch, tmpDir }); - if (res === 'automerged') { - // Stop procesing other branches because base branch has been changed by an automerge - return 'automerged'; + if (res === 'pr-closed' || res === 'automerged') { + // Stop procesing other branches because base branch has been changed + return res; } } return 'done';