Skip to content

Commit

Permalink
fix: pass through report name, issue title, and search query when rep…
Browse files Browse the repository at this point in the history
…ort is empty

Signed-off-by: Zack Koppert <[email protected]>
  • Loading branch information
zkoppert committed Oct 16, 2024
1 parent 6593a96 commit f957a28
Showing 1 changed file with 34 additions and 2 deletions.
36 changes: 34 additions & 2 deletions issue_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,15 +368,47 @@ def main(): # pragma: no cover
issues = get_discussions(token, search_query)
if len(issues) <= 0:
print("No discussions found")
write_to_markdown(None, None, None, None, None, None, None, None)
write_to_markdown(
issues_with_metrics=None,
average_time_to_first_response=None,
average_time_to_close=None,
average_time_to_answer=None,
average_time_in_labels=None,
num_issues_opened=None,
num_issues_closed=None,
num_mentor_count=None,
labels=None,
search_query=search_query,
hide_label_metrics=False,
hide_items_closed_count=False,
non_mentioning_links=False,
report_title=report_title,
output_file=output_file,
)
return
else:
issues = search_issues(
search_query, github_connection, owners_and_repositories, rate_limit_bypass
)
if len(issues) <= 0:
print("No issues found")
write_to_markdown(None, None, None, None, None, None, None, None)
write_to_markdown(
issues_with_metrics=None,
average_time_to_first_response=None,
average_time_to_close=None,
average_time_to_answer=None,
average_time_in_labels=None,
num_issues_opened=None,
num_issues_closed=None,
num_mentor_count=None,
labels=None,
search_query=search_query,
hide_label_metrics=False,
hide_items_closed_count=False,
non_mentioning_links=False,
report_title=report_title,
output_file=output_file,
)
return

# Get all the metrics
Expand Down

0 comments on commit f957a28

Please sign in to comment.