diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f0382f7887..68f99f98c12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-l - Core - Fix failure of AzureCommentReporter when there is no pull request found in ENV vars + - Fix HTML comment appearing in Azure Pull Request mail notifications - Documentation diff --git a/megalinter/reporters/AzureCommentReporter.py b/megalinter/reporters/AzureCommentReporter.py index 6076935d4bf..029e08d1b65 100644 --- a/megalinter/reporters/AzureCommentReporter.py +++ b/megalinter/reporters/AzureCommentReporter.py @@ -89,7 +89,9 @@ def produce_report(self): existing_thread_comment_id = None for existing_thread in existing_threads: for comment in existing_thread.comments or []: - if "" in (comment.content or ""): + if "MegaLinter is graciously provided by" in ( + comment.content or "" + ): existing_thread_comment = existing_thread existing_thread_comment_id = existing_thread.comments[0].id existing_thread_id = existing_thread.id diff --git a/megalinter/reporters/GitlabCommentReporter.py b/megalinter/reporters/GitlabCommentReporter.py index 529a3cb0679..f9bafa3fbe8 100644 --- a/megalinter/reporters/GitlabCommentReporter.py +++ b/megalinter/reporters/GitlabCommentReporter.py @@ -130,7 +130,7 @@ def produce_report(self): # Check if there is already a MegaLinter comment for comment in existing_comments: - if "" in comment.body: + if "MegaLinter is graciously provided by" in comment.body: existing_comment = comment # Process comment diff --git a/megalinter/utils_reporter.py b/megalinter/utils_reporter.py index 517ddf55d0e..3249969a320 100644 --- a/megalinter/utils_reporter.py +++ b/megalinter/utils_reporter.py @@ -149,7 +149,6 @@ def build_markdown_summary(reporter_self, action_run_url): + "(https://www.ox.security/wp-content/uploads/2022/06/" + "logo.svg?ref=megalinter_comment)](https://www.ox.security/?ref=megalinter)_" ) - p_r_msg += os.linesep + "" logging.debug("\n" + p_r_msg) return p_r_msg