From bc76028249afd7a4a4a85d8fa3f02c3f02b08f12 Mon Sep 17 00:00:00 2001 From: bhawesh96 Date: Thu, 1 Nov 2018 10:45:10 +0530 Subject: [PATCH] fetch-issues.js: Replace hardcode date with dynamic Use 3 months earlier date dynamically rather Closes https://github.com/coala/gh-board/issues/171 --- script/fetch-issues.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/script/fetch-issues.js b/script/fetch-issues.js index e08d58e8..a03fb1da 100644 --- a/script/fetch-issues.js +++ b/script/fetch-issues.js @@ -14,14 +14,12 @@ let earliestDate = process.env.EARLIEST_DATE || '2017-01-01T00:00:00Z'; if (isDeployPreview) { const earliestDateForPr = process.env.EARLIEST_DATE_PR || - '2018-04-01T00:00:00Z'; - if (getTime(earliestDate) < getTime(earliestDateForPr)) { - earliestDate = earliestDateForPr; - console.log('To speed up netlify pr build, set earliest date threshold', - earliestDate); - } + moment().subtract(3, 'months').format('YYYY-MM-DDThh:mm:ssZ'); + earliestDate = earliestDateForPr; } +console.log('The earliest date has been set to', earliestDate); + // review will be ignored if it's written by any author specified here // delimiter: space const ignoreAuthor = process.env.IGNORE_REVIEW_AUTHOR ||