From 9c97193521376587f501b398c5bde7f297e153a7 Mon Sep 17 00:00:00 2001 From: Zack Koppert Date: Tue, 1 Aug 2023 09:33:53 -0700 Subject: [PATCH] fix: move action reference outside table Signed-off-by: Zack Koppert --- markdown_writer.py | 2 +- test_markdown_writer.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/markdown_writer.py b/markdown_writer.py index 63bad39..080b80a 100644 --- a/markdown_writer.py +++ b/markdown_writer.py @@ -150,7 +150,7 @@ def write_to_markdown( file.write(f" {issue.label_metrics[label]} |") file.write("\n") file.write( - "_This report was generated with the [Issue Metrics Action](https://github.com/github/issue-metrics)_\n" + "\n_This report was generated with the [Issue Metrics Action](https://github.com/github/issue-metrics)_\n" ) print("Wrote issue metrics to issue_metrics.md") diff --git a/test_markdown_writer.py b/test_markdown_writer.py index b0b60fe..0aa8a35 100644 --- a/test_markdown_writer.py +++ b/test_markdown_writer.py @@ -85,7 +85,7 @@ def test_write_to_markdown(self): "| Issue 1 | https://github.com/user/repo/issues/1 | 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 | 3 days, 0:00:00 | " - "4 days, 0:00:00 | 5 days, 0:00:00 | 2 days, 0:00:00 |\n" + "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" ) self.assertEqual(content, expected_content) @@ -158,7 +158,7 @@ def test_write_to_markdown_with_vertical_bar_in_title(self): "| Issue 1 | https://github.com/user/repo/issues/1 | 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 | 3 days, 0:00:00 | " - "4 days, 0:00:00 | 5 days, 0:00:00 | 2 days, 0:00:00 |\n" + "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" ) self.assertEqual(content, expected_content) @@ -258,7 +258,7 @@ def test_writes_markdown_file_with_non_hidden_columns_only(self): "| Title | URL |\n" "| --- | --- |\n" "| Issue 1 | https://github.com/user/repo/issues/1 |\n" - "| Issue 2 | https://github.com/user/repo/issues/2 |\n" + "| Issue 2 | https://github.com/user/repo/issues/2 |\n\n" "_This report was generated with the [Issue Metrics Action](https://github.com/github/issue-metrics)_\n" ) self.assertEqual(content, expected_content)