Skip to content

Commit 6c119f8

Browse files
authored
Merge pull request #203 from chrheg/feat-link-to-github-profile
linking author to profile
2 parents c6f67c6 + 5a2ee9c commit 6c119f8

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

markdown_writer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def write_to_markdown(
155155

156156
file.write(f"| " f"{issue.title} | " f"{issue.html_url} |")
157157
if "Author" in columns:
158-
file.write(f" {issue.author} |")
158+
file.write(f" [{issue.author}](https://github.com/{issue.author}) |")
159159
if "Time to first response" in columns:
160160
file.write(f" {issue.time_to_first_response} |")
161161
if "Time to close" in columns:

test_markdown_writer.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ def test_write_to_markdown(self):
114114
"| Title | URL | Author | Time to first response | Time to close |"
115115
" Time to answer | Time spent in bug |\n"
116116
"| --- | --- | --- | --- | --- | --- | --- |\n"
117-
"| Issue 1 | https://github.com/user/repo/issues/1 | alice | 1 day, 0:00:00 | "
117+
"| Issue 1 | https://github.com/user/repo/issues/1 | [alice](https://github.com/alice) | 1 day, 0:00:00 | "
118118
"2 days, 0:00:00 | 3 days, 0:00:00 | 1 day, 0:00:00 |\n"
119-
"| Issue 2 | https://github.com/user/repo/issues/2 | bob | 3 days, 0:00:00 | "
119+
"| Issue 2 | https://github.com/user/repo/issues/2 | [bob](https://github.com/bob) | 3 days, 0:00:00 | "
120120
"4 days, 0:00:00 | 5 days, 0:00:00 | 2 days, 0:00:00 |\n\n"
121121
"_This report was generated with the [Issue Metrics Action](https://github.com/github/issue-metrics)_\n"
122122
"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):
210210
"| Title | URL | Author | Time to first response | Time to close |"
211211
" Time to answer | Time spent in bug |\n"
212212
"| --- | --- | --- | --- | --- | --- | --- |\n"
213-
"| Issue 1 | https://github.com/user/repo/issues/1 | alice | 1 day, 0:00:00 | "
213+
"| Issue 1 | https://github.com/user/repo/issues/1 | [alice](https://github.com/alice) | 1 day, 0:00:00 | "
214214
"2 days, 0:00:00 | 3 days, 0:00:00 | 1 day, 0:00:00 |\n"
215-
"| feat| Issue 2 | https://github.com/user/repo/issues/2 | bob | 3 days, 0:00:00 | "
215+
"| feat| Issue 2 | https://github.com/user/repo/issues/2 | [bob](https://github.com/bob) | 3 days, 0:00:00 | "
216216
"4 days, 0:00:00 | 5 days, 0:00:00 | 2 days, 0:00:00 |\n\n"
217217
"_This report was generated with the [Issue Metrics Action](https://github.com/github/issue-metrics)_\n"
218218
)
@@ -321,8 +321,8 @@ def test_writes_markdown_file_with_non_hidden_columns_only(self):
321321
"| Total number of items created | 2 |\n\n"
322322
"| Title | URL | Author |\n"
323323
"| --- | --- | --- |\n"
324-
"| Issue 1 | https://github.com/user/repo/issues/1 | alice |\n"
325-
"| Issue 2 | https://github.com/user/repo/issues/2 | bob |\n\n"
324+
"| Issue 1 | https://github.com/user/repo/issues/1 | [alice](https://github.com/alice) |\n"
325+
"| Issue 2 | https://github.com/user/repo/issues/2 | [bob](https://github.com/bob) |\n\n"
326326
"_This report was generated with the [Issue Metrics Action](https://github.com/github/issue-metrics)_\n"
327327
"Search query used to find these items: `repo:user/repo is:issue`\n"
328328
)

0 commit comments

Comments
 (0)