Skip to content

Commit

Permalink
Merge pull request #15 from github/ttfr-is-none
Browse files Browse the repository at this point in the history
fix: time to first response being none caused sort failure
  • Loading branch information
zkoppert authored Jun 9, 2023
2 parents ff1064d + e3c04d1 commit 4354219
Showing 1 changed file with 3 additions and 1 deletion.
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

0 comments on commit 4354219

Please sign in to comment.