fix zero division error (#429)

Signed-off-by: MregXN <46479059+MregXN@users.noreply.github.com>
This commit is contained in:
MregXN 2024-01-04 01:21:58 +08:00 committed by GitHub
parent 89e035bc25
commit a2d1f6e3bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -141,7 +141,7 @@ for repo in my_repos:
issue.html_url, age_str, humanize.naturaldelta(time_to_triage)))
bugs.append(bug)
average_days_to_triage = (total_time_to_triage / triaged_count).total_seconds() / ONE_DAY.total_seconds()
average_days_to_triage = (total_time_to_triage / triaged_count).total_seconds() / ONE_DAY.total_seconds() if triaged_count != 0 else 30
expected_average_days_to_triage = (expected_total_time_to_triage / total_count).total_seconds() / ONE_DAY.total_seconds()
triaged_under_5_days_ratio = triaged_under_5_days_count / total_count