Skip to content

Commit

Permalink
Merge pull request #203 from chrheg/feat-link-to-github-profile
Browse files Browse the repository at this point in the history
linking author to profile
  • Loading branch information
zkoppert authored Mar 18, 2024
2 parents c6f67c6 + 5a2ee9c commit 6c119f8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
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

0 comments on commit 6c119f8

Please sign in to comment.