diff --git a/pr_agent/settings/configuration.toml b/pr_agent/settings/configuration.toml index 5b1dee816..80e2ad840 100644 --- a/pr_agent/settings/configuration.toml +++ b/pr_agent/settings/configuration.toml @@ -7,6 +7,7 @@ fallback_models=["gpt-4o-2024-05-13"] git_provider="github" publish_output=true publish_output_progress=true +publish_output_no_suggestions=true verbosity_level=0 # 0,1,2 use_extra_bad_extensions=false # Configurations diff --git a/pr_agent/tools/pr_code_suggestions.py b/pr_agent/tools/pr_code_suggestions.py index 8ea02dc41..e510bcb0f 100644 --- a/pr_agent/tools/pr_code_suggestions.py +++ b/pr_agent/tools/pr_code_suggestions.py @@ -114,8 +114,8 @@ async def run(self): 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)