Fix wasLastUpdatedBefore to be in days, not hours (#8)

The parameters and variables names make it seem like this is the intended behavior.
This commit is contained in:
John Briggs 2019-08-19 14:28:41 -04:00 committed by Danny McCormick
parent 903ff7344d
commit 0cad222e9d
1 changed files with 1 additions and 1 deletions

View File

@ -92,7 +92,7 @@ function isLabeledStale(issue: Issue, label: string): boolean {
}
function wasLastUpdatedBefore(issue: Issue, num_days: number): boolean {
const daysInMillis = 1000 * 60 * 60 * num_days;
const daysInMillis = 1000 * 60 * 60 * 24 * num_days;
const millisSinceLastUpdated =
new Date().getTime() - new Date(issue.updated_at).getTime();
return millisSinceLastUpdated >= daysInMillis;