Skip to content

Commit

Permalink
Fix wasLastUpdatedBefore to be in days, not hours (#8)
Browse files Browse the repository at this point in the history
The parameters and variables names make it seem like this is the intended behavior.
  • Loading branch information
jrbriggs authored and Danny McCormick committed Aug 19, 2019
1 parent 903ff73 commit 0cad222
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.ts
Expand Up @@ -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;
Expand Down

0 comments on commit 0cad222

Please sign in to comment.