nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: github/issue-metrics
Pull request #85 (2023-08-01 16:34:15)

fix: move action reference outside table


Patch:
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")


Test patch:
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 @@ class TestWriteToMarkdown(unittest.TestCase):
             "| 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 @@ class TestWriteToMarkdown(unittest.TestCase):
             "| 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&#124; 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 @@ class TestWriteToMarkdownWithEnv(unittest.TestCase):
             "| 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)