mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-07 22:30:38 +08:00
feat: support 'publish_output_no_suggestions' by 'pr_reviewer'
The tool reuses the existing variable name. The change is non-breaking because by default it keeps the old behavior.
This commit is contained in:
@ -80,6 +80,7 @@ require_can_be_split_review=false
|
||||
require_security_review=true
|
||||
require_ticket_analysis_review=true
|
||||
# general options
|
||||
publish_output_no_suggestions=true # Set to "false" if you only need the reviewer's remarks (not labels, not "security audit", etc.) and want to avoid noisy "No major issues detected" comments.
|
||||
persistent_comment=true
|
||||
extra_instructions = ""
|
||||
num_max_findings = 3
|
||||
|
@ -160,14 +160,17 @@ class PRReviewer:
|
||||
|
||||
if get_settings().config.publish_output:
|
||||
# publish the review
|
||||
if get_settings().pr_reviewer.persistent_comment and not self.incremental.is_incremental:
|
||||
if get_settings().pr_reviewer.persistent_comment:
|
||||
if self.incremental.is_incremental:
|
||||
final_update_message = get_settings().pr_reviewer.final_update_message
|
||||
self.git_provider.publish_persistent_comment(pr_review,
|
||||
initial_header=f"{PRReviewHeader.REGULAR.value} 🔍",
|
||||
update_header=True,
|
||||
final_update_message=final_update_message, )
|
||||
else:
|
||||
elif get_settings().pr_reviewer.get('publish_output_no_suggestions', True) or "No major issues detected" not in pr_review:
|
||||
self.git_provider.publish_comment(pr_review)
|
||||
else:
|
||||
get_logger().info("Review output is not published: no major issues detected.")
|
||||
|
||||
self.git_provider.remove_initial_comment()
|
||||
else:
|
||||
|
Reference in New Issue
Block a user