Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: time to first response being none caused sort failure #15

Merged
merged 1 commit into from
Jun 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion issue_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,9 @@ def write_to_markdown(
file.write("no issues found for the given search criteria\n\n")
else:
# Sort the issues by time to first response
issues_with_metrics.sort(key=lambda x: x.time_to_first_response)
issues_with_metrics.sort(
key=lambda x: x.time_to_first_response or timedelta.max
)
with file or open("issue_metrics.md", "w", encoding="utf-8") as file:
file.write("# Issue Metrics\n\n")
file.write("| Metric | Value |\n")
Expand Down