Skip to content

Fix wasLastUpdatedBefore to be in days, not hours#8

Merged
damccorm merged 1 commit intoactions:masterfrom
jrbriggs:patch-1
Aug 19, 2019
Merged

Fix wasLastUpdatedBefore to be in days, not hours#8
damccorm merged 1 commit intoactions:masterfrom
jrbriggs:patch-1

Conversation

@jrbriggs
Copy link
Contributor

The parameters and variables names make it seem like this is the intended behavior.

The parameters and variables names make it seem like this is the intended behavior.
Copy link

@derrickstolee derrickstolee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will chime in that this would match the variable names.


function wasLastUpdatedBefore(issue: Issue, num_days: number): boolean {
const daysInMillis = 1000 * 60 * 60 * num_days;
const daysInMillis = 1000 * 60 * 60 * 24 * num_days;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps it makes sense to adjust to

Suggested change
const daysInMillis = 1000 * 60 * 60 * 24 * num_days;
const daysInMillis = num_days * 24 * 60 * 60 * 1000;

?

Copy link

@localheinz localheinz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

derrickstolee added a commit to microsoft/scalar that referenced this pull request Aug 18, 2019
This is to work around a bug in the action where the timespan computation was in hours, not days. I have proposed the fix in actions/stale#8
@damccorm damccorm merged commit 0cad222 into actions:master Aug 19, 2019
@jrbriggs jrbriggs deleted the patch-1 branch August 19, 2019 18:36
joschi added a commit to dropwizard/dropwizard that referenced this pull request Aug 20, 2019
Issues and PRs will be marked as stale after 90 days and removed if there wasn't any activity 14 days after that.

Refs #2884
Refs #2888
Refs actions/stale#8
joschi added a commit to dropwizard/dropwizard that referenced this pull request Aug 20, 2019
Issues and PRs will be marked as stale after 90 days and removed if there wasn't any activity 14 days after that.

Refs #2884
Refs #2888
Refs actions/stale#8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants