mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-07 14:20:37 +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_security_review=true
|
||||||
require_ticket_analysis_review=true
|
require_ticket_analysis_review=true
|
||||||
# general options
|
# 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
|
persistent_comment=true
|
||||||
extra_instructions = ""
|
extra_instructions = ""
|
||||||
num_max_findings = 3
|
num_max_findings = 3
|
||||||
|
@ -160,14 +160,17 @@ class PRReviewer:
|
|||||||
|
|
||||||
if get_settings().config.publish_output:
|
if get_settings().config.publish_output:
|
||||||
# publish the review
|
# publish the review
|
||||||
if get_settings().pr_reviewer.persistent_comment and not self.incremental.is_incremental:
|
if get_settings().pr_reviewer.persistent_comment:
|
||||||
final_update_message = get_settings().pr_reviewer.final_update_message
|
if self.incremental.is_incremental:
|
||||||
self.git_provider.publish_persistent_comment(pr_review,
|
final_update_message = get_settings().pr_reviewer.final_update_message
|
||||||
initial_header=f"{PRReviewHeader.REGULAR.value} 🔍",
|
self.git_provider.publish_persistent_comment(pr_review,
|
||||||
update_header=True,
|
initial_header=f"{PRReviewHeader.REGULAR.value} 🔍",
|
||||||
final_update_message=final_update_message, )
|
update_header=True,
|
||||||
else:
|
final_update_message=final_update_message, )
|
||||||
self.git_provider.publish_comment(pr_review)
|
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()
|
self.git_provider.remove_initial_comment()
|
||||||
else:
|
else:
|
||||||
|
Reference in New Issue
Block a user