@@ -298,10 +298,11 @@ def test_write_to_markdown_no_issues(self):
298298 "HIDE_TIME_TO_ANSWER" : "True" ,
299299 "HIDE_LABEL_METRICS" : "True" ,
300300 "NON_MENTIONING_LINKS" : "True" ,
301+ "GH_ENTERPRISE_URL" : "https://github.mycompany.com" ,
301302 },
302303)
303304class TestWriteToMarkdownWithEnv (unittest .TestCase ):
304- """Test the write_to_markdown function with the HIDE* and NON_MENTIONING_LINKS environment variables set."""
305+ """Test the write_to_markdown function with the HIDE*, NON_MENTIONING_LINKS and GH_ENTERPRISE_URL environment variables set."""
305306
306307 def test_writes_markdown_file_with_non_hidden_columns_only (self ):
307308 """
@@ -313,7 +314,7 @@ def test_writes_markdown_file_with_non_hidden_columns_only(self):
313314 issues_with_metrics = [
314315 IssueWithMetrics (
315316 title = "Issue 1" ,
316- html_url = "https://github.com/user/repo/issues/1" ,
317+ html_url = "https://github.mycompany. com/user/repo/issues/1" ,
317318 author = "alice" ,
318319 created_at = timedelta (days = - 5 ),
319320 time_to_first_response = timedelta (minutes = 10 ),
@@ -326,7 +327,7 @@ def test_writes_markdown_file_with_non_hidden_columns_only(self):
326327 ),
327328 IssueWithMetrics (
328329 title = "Issue 2" ,
329- html_url = "https://github.com/user/repo/issues/2" ,
330+ html_url = "https://github.mycompany. com/user/repo/issues/2" ,
330331 author = "bob" ,
331332 created_at = timedelta (days = - 5 ),
332333 time_to_first_response = timedelta (minutes = 20 ),
@@ -347,6 +348,7 @@ def test_writes_markdown_file_with_non_hidden_columns_only(self):
347348 num_issues_opened = 2
348349 num_issues_closed = 2
349350 num_mentor_count = 5
351+ ghe = "https://github.mycompany.com"
350352
351353 # Call the function
352354 write_to_markdown (
@@ -366,6 +368,7 @@ def test_writes_markdown_file_with_non_hidden_columns_only(self):
366368 non_mentioning_links = True ,
367369 report_title = "Issue Metrics" ,
368370 output_file = "issue_metrics.md" ,
371+ ghe = ghe ,
369372 )
370373
371374 # Check that the function writes the correct markdown file
@@ -381,8 +384,8 @@ def test_writes_markdown_file_with_non_hidden_columns_only(self):
381384 "| Total number of items created | 2 |\n \n "
382385 "| Title | URL | Author | Created At |\n "
383386 "| --- | --- | --- | --- |\n "
384- "| Issue 1 | https://www.github.com/user/repo/issues/1 | [alice](https://github.com/alice) | -5 days, 0:00:00 |\n "
385- "| Issue 2 | https://www.github.com/user/repo/issues/2 | [bob](https://github.com/bob) | -5 days, 0:00:00 |\n \n "
387+ "| Issue 1 | https://www.github.mycompany. com/user/repo/issues/1 | [alice](https://github.mycompany .com/alice) | -5 days, 0:00:00 |\n "
388+ "| Issue 2 | https://www.github.mycompany. com/user/repo/issues/2 | [bob](https://github.mycompany .com/bob) | -5 days, 0:00:00 |\n \n "
386389 "_This report was generated with the [Issue Metrics Action](https://github.com/github/issue-metrics)_\n "
387390 "Search query used to find these items: `repo:user/repo is:issue`\n "
388391 )
0 commit comments