Skip to content

Commit

Permalink
fetch-issues.js: Replace hardcode date with dynamic
Browse files Browse the repository at this point in the history
Use 3 months earlier date dynamically rather

Closes coala#171
  • Loading branch information
bhawesh96 authored and gitmate-bot committed Feb 1, 2019
1 parent b872c70 commit bc76028
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions script/fetch-issues.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ||
Expand Down

0 comments on commit bc76028

Please sign in to comment.