From a2d1f6e3bd10ab1b64ab7c1c23a7c55703caee9f Mon Sep 17 00:00:00 2001 From: MregXN <46479059+MregXN@users.noreply.github.com> Date: Thu, 4 Jan 2024 01:21:58 +0800 Subject: [PATCH] fix zero division error (#429) Signed-off-by: MregXN <46479059+MregXN@users.noreply.github.com> --- .github/scripts/github_issues_metrics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/github_issues_metrics.py b/.github/scripts/github_issues_metrics.py index 9c64752..d11db53 100644 --- a/.github/scripts/github_issues_metrics.py +++ b/.github/scripts/github_issues_metrics.py @@ -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