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

linking author to profile #203

Merged
merged 2 commits into from
Mar 18, 2024
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
2 changes: 1 addition & 1 deletion markdown_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def write_to_markdown(

file.write(f"| " f"{issue.title} | " f"{issue.html_url} |")
if "Author" in columns:
file.write(f" {issue.author} |")
file.write(f" [{issue.author}](https://github.com/{issue.author}) |")
if "Time to first response" in columns:
file.write(f" {issue.time_to_first_response} |")
if "Time to close" in columns:
Expand Down
12 changes: 6 additions & 6 deletions test_markdown_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ def test_write_to_markdown(self):
"| Title | URL | Author | Time to first response | Time to close |"
" Time to answer | Time spent in bug |\n"
"| --- | --- | --- | --- | --- | --- | --- |\n"
"| Issue 1 | https://github.com/user/repo/issues/1 | alice | 1 day, 0:00:00 | "
"| Issue 1 | https://github.com/user/repo/issues/1 | [alice](https://github.com/alice) | 1 day, 0:00:00 | "
"2 days, 0:00:00 | 3 days, 0:00:00 | 1 day, 0:00:00 |\n"
"| Issue 2 | https://github.com/user/repo/issues/2 | bob | 3 days, 0:00:00 | "
"| Issue 2 | https://github.com/user/repo/issues/2 | [bob](https://github.com/bob) | 3 days, 0:00:00 | "
"4 days, 0:00:00 | 5 days, 0:00:00 | 2 days, 0:00:00 |\n\n"
"_This report was generated with the [Issue Metrics Action](https://github.com/github/issue-metrics)_\n"
"Search query used to find these items: `is:issue is:open label:bug`\n"
Expand Down Expand Up @@ -210,9 +210,9 @@ def test_write_to_markdown_with_vertical_bar_in_title(self):
"| Title | URL | Author | Time to first response | Time to close |"
" Time to answer | Time spent in bug |\n"
"| --- | --- | --- | --- | --- | --- | --- |\n"
"| Issue 1 | https://github.com/user/repo/issues/1 | alice | 1 day, 0:00:00 | "
"| Issue 1 | https://github.com/user/repo/issues/1 | [alice](https://github.com/alice) | 1 day, 0:00:00 | "
"2 days, 0:00:00 | 3 days, 0:00:00 | 1 day, 0:00:00 |\n"
"| feat| Issue 2 | https://github.com/user/repo/issues/2 | bob | 3 days, 0:00:00 | "
"| feat| Issue 2 | https://github.com/user/repo/issues/2 | [bob](https://github.com/bob) | 3 days, 0:00:00 | "
"4 days, 0:00:00 | 5 days, 0:00:00 | 2 days, 0:00:00 |\n\n"
"_This report was generated with the [Issue Metrics Action](https://github.com/github/issue-metrics)_\n"
)
Expand Down Expand Up @@ -321,8 +321,8 @@ def test_writes_markdown_file_with_non_hidden_columns_only(self):
"| Total number of items created | 2 |\n\n"
"| Title | URL | Author |\n"
"| --- | --- | --- |\n"
"| Issue 1 | https://github.com/user/repo/issues/1 | alice |\n"
"| Issue 2 | https://github.com/user/repo/issues/2 | bob |\n\n"
"| Issue 1 | https://github.com/user/repo/issues/1 | [alice](https://github.com/alice) |\n"
"| Issue 2 | https://github.com/user/repo/issues/2 | [bob](https://github.com/bob) |\n\n"
"_This report was generated with the [Issue Metrics Action](https://github.com/github/issue-metrics)_\n"
"Search query used to find these items: `repo:user/repo is:issue`\n"
)
Expand Down