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: use general term items instead of issues #35

Merged
merged 1 commit into from
Jun 29, 2023
Merged
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,9 @@ jobs:
| Average time to first response | 0:50:44.666667 |
| Average time to close | 6 days, 7:08:52 |
| Average time to answer | 1 day |
| Number of issues that remain open | 2 |
| Number of issues closed | 1 |
| Total number of issues created | 3 |
| Number of items that remain open | 2 |
| Number of items closed | 1 |
| Total number of items created | 3 |

| Title | URL | Time to first response | Time to close | Time to answer |
| --- | --- | ---: | ---: | ---: |
Expand Down
8 changes: 4 additions & 4 deletions markdown_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def write_to_markdown(
average_time_to_answer (datetime.timedelta): The average time to answer the discussions.
file (file object, optional): The file object to write to. If not provided,
a file named "issue_metrics.md" will be created.
num_issues_opened (int): The number of issues that remain opened.
num_issues_opened (int): The Number of items that remain opened.
num_issues_closed (int): The number of issues that were closed.

Returns:
Expand All @@ -67,10 +67,10 @@ def write_to_markdown(
)
file.write(f"| Average time to close | {average_time_to_close} |\n")
file.write(f"| Average time to answer | {average_time_to_answer} |\n")
file.write(f"| Number of issues that remain open | {num_issues_opened} |\n")
file.write(f"| Number of issues closed | {num_issues_closed} |\n")
file.write(f"| Number of items that remain open | {num_issues_opened} |\n")
file.write(f"| Number of items closed | {num_issues_closed} |\n")
file.write(
f"| Total number of issues created | {len(issues_with_metrics)} |\n\n"
f"| Total number of items created | {len(issues_with_metrics)} |\n\n"
)
file.write(
"| Title | URL | Time to first response | Time to close | Time to answer |\n"
Expand Down
6 changes: 3 additions & 3 deletions test_markdown_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ def test_write_to_markdown(self):
"| Average time to first response | 2 days, 0:00:00 |\n"
"| Average time to close | 3 days, 0:00:00 |\n"
"| Average time to answer | 4 days, 0:00:00 |\n"
"| Number of issues that remain open | 2 |\n"
"| Number of issues closed | 1 |\n"
"| Total number of issues created | 2 |\n\n"
"| Number of items that remain open | 2 |\n"
"| Number of items closed | 1 |\n"
"| Total number of items created | 2 |\n\n"
"| Title | URL | Time to first response | Time to close | Time to answer |\n"
"| --- | --- | ---: | ---: | ---: |\n"
"| Issue 1 | https://github.com/user/repo/issues/1 | 1 day, 0:00:00 | "
Expand Down