From 0cad222e9d65d41c06d873170a65d45760238fac Mon Sep 17 00:00:00 2001 From: John Briggs Date: Mon, 19 Aug 2019 14:28:41 -0400 Subject: [PATCH] Fix wasLastUpdatedBefore to be in days, not hours (#8) The parameters and variables names make it seem like this is the intended behavior. --- src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index c6154e307..e2524b932 100644 --- a/src/main.ts +++ b/src/main.ts @@ -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;