diff --git a/markdown_writer.py b/markdown_writer.py index 1ae1714..ba49622 100644 --- a/markdown_writer.py +++ b/markdown_writer.py @@ -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: diff --git a/test_markdown_writer.py b/test_markdown_writer.py index 38d4025..6988b94 100644 --- a/test_markdown_writer.py +++ b/test_markdown_writer.py @@ -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" @@ -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" ) @@ -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" )