From 68f0da5ade827174aa9df3f06273ce0de9675e0b Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@arkins.net> Date: Wed, 17 Jan 2018 15:34:08 +0100 Subject: [PATCH] refactor: remove legacy code detecting mistakenly closed PRs --- lib/workers/branch/check-existing.js | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/lib/workers/branch/check-existing.js b/lib/workers/branch/check-existing.js index 41b15cee1a..7d646f4d60 100644 --- a/lib/workers/branch/check-existing.js +++ b/lib/workers/branch/check-existing.js @@ -22,19 +22,6 @@ async function prAlreadyExisted(config) { ); if (pr) { logger.debug('Found closed PR with current title'); - // this code exists to ignore mistakenly closed PRs which occurred due to a bug - // TODO: Remove this by end of June 2018 - const closedAt = moment(pr.closed_at); - const problemStart = moment('2017-10-15T20:00:00Z'); - const problemStopped = moment('2017-10-16T06:00:00Z'); - if (problemStart.isBefore(closedAt) && closedAt.isBefore(problemStopped)) { - logger.info( - { closedAt, problemStart, problemStopped }, - 'Renaming mistakenly closed PR' - ); - await platform.updatePr(pr.number, `${pr.title} - autoclosed`); - return null; - } return pr; } // Check for legacy PR title format -- GitLab