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:
parent
903ff7344d
commit
0cad222e9d
|
@ -92,7 +92,7 @@ function isLabeledStale(issue: Issue, label: string): boolean {
|
||||||
}
|
}
|
||||||
|
|
||||||
function wasLastUpdatedBefore(issue: Issue, num_days: number): 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 =
|
const millisSinceLastUpdated =
|
||||||
new Date().getTime() - new Date(issue.updated_at).getTime();
|
new Date().getTime() - new Date(issue.updated_at).getTime();
|
||||||
return millisSinceLastUpdated >= daysInMillis;
|
return millisSinceLastUpdated >= daysInMillis;
|
||||||
|
|
Loading…
Reference in New Issue