ossf / criticality_score

Gives criticality score for an open source project
Apache License 2.0
1.31k stars 119 forks source link

Updated issues, closed issues, and issue comments are based on 2160 days instead of 90 #603

Closed Eiim closed 5 months ago

Eiim commented 5 months ago

Because of this line in constants.go:

IssueLookback time.Duration = time.Hour * 24 * 90 * 24

the updated issues, closed issues, and issue comments are based on 2160 (90*24) days instead of 90, as suggested in the README.

For example, running criticality_score https://github.com/taeiim/Android-Study provides the following results, despite no issues having been updated since 2018:

legacy.updated_issues_count: 40
legacy.closed_issues_count: 40
legacy.issue_comment_frequency: 2.45

I'm not quite certain what to make of this. It doesn't feel like it could be accidental, but it seems to be directly contrary to the description of the metrics. Any insight would be appreciated.

calebbrown commented 5 months ago

Thank you for the bug report.

I will take a look. The original Python implementation didn't have this bug, so it looks like this is a typo introduced during the conversion to Go.