Skip to content

Commit

Permalink
Merge pull request #1191 from AHancher2022/bugfix/fix-output-publishi…
Browse files Browse the repository at this point in the history
…ng-when-set-to-false

Fixing code suggestions being published when publish ouput is false
  • Loading branch information
mrT23 authored Aug 31, 2024
2 parents 9df554e + 1c51b5b commit 5ac41dd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pr_agent/tools/pr_code_suggestions.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ async def run(self):
if not data:
data = {"code_suggestions": []}

if data is None or 'code_suggestions' not in data or not data['code_suggestions']:
if (data is None or 'code_suggestions' not in data or not data['code_suggestions']
and get_settings().config.publish_output):
get_logger().warning('No code suggestions found for the PR.')
pr_body = "## PR Code Suggestions ✨\n\nNo code suggestions found for the PR."
get_logger().debug(f"PR output", artifact=pr_body)
Expand Down

0 comments on commit 5ac41dd

Please sign in to comment.