From ee4f5c765ad0d1658d313c75bfe23268764c9699 Mon Sep 17 00:00:00 2001 From: mrT23 Date: Mon, 4 Nov 2024 07:48:13 +0200 Subject: [PATCH] Add conditional logging for no code suggestions message based on new config option --- pr_agent/tools/pr_code_suggestions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pr_agent/tools/pr_code_suggestions.py b/pr_agent/tools/pr_code_suggestions.py index 8ea02dc4..e510bcb0 100644 --- a/pr_agent/tools/pr_code_suggestions.py +++ b/pr_agent/tools/pr_code_suggestions.py @@ -114,8 +114,8 @@ class PRCodeSuggestions: if (data is None or 'code_suggestions' not in data or not data['code_suggestions']): pr_body = "## PR Code Suggestions ✨\n\nNo code suggestions found for the PR." - if get_settings().config.publish_output: - get_logger().warning('No code suggestions found for the PR.') + get_logger().warning('No code suggestions found for the PR.') + if get_settings().config.publish_output and get_settings().config.publish_output_no_suggestions: get_logger().debug(f"PR output", artifact=pr_body) if self.progress_response: self.git_provider.edit_comment(self.progress_response, body=pr_body)