diff --git a/docs/docs/tools/review.md b/docs/docs/tools/review.md index fad93d95..a741cac9 100644 --- a/docs/docs/tools/review.md +++ b/docs/docs/tools/review.md @@ -98,6 +98,11 @@ extra_instructions = "..."
"
+ if is_value_no(value):
+ markdown_text += f"{emoji} No TODO sections"
+ else:
+ markdown_todo_items = format_todo_items(value)
+
+ markdown_text += f"{emoji} TODO sections\n \n" + markdown_text += f" {todo_summary}\n\n" + markdown_text += markdown_todo_items + markdown_text += "\n |
" diff --git a/pr_agent/settings/configuration.toml b/pr_agent/settings/configuration.toml index ea651731..f028c9f0 100644 --- a/pr_agent/settings/configuration.toml +++ b/pr_agent/settings/configuration.toml @@ -78,6 +78,7 @@ require_tests_review=true require_estimate_effort_to_review=true require_can_be_split_review=false require_security_review=true +require_todo_scan=false 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. diff --git a/pr_agent/settings/pr_reviewer_prompts.toml b/pr_agent/settings/pr_reviewer_prompts.toml index d4c0a523..6a55c978 100644 --- a/pr_agent/settings/pr_reviewer_prompts.toml +++ b/pr_agent/settings/pr_reviewer_prompts.toml @@ -72,6 +72,13 @@ class KeyIssuesComponentLink(BaseModel): start_line: int = Field(description="The start line that corresponds to this issue in the relevant file") end_line: int = Field(description="The end line that corresponds to this issue in the relevant file") +{%- if require_todo_scan %} +class TodoSection(BaseModel): + relevant_file: str = Field(description="The file containing the TODO comment") + line_range: Tuple[int, int] = Field(description="Start and end line numbers of the TODO comment (inclusive). Must be a tuple of two integers, e.g., (7, 7) for a single line or (7, 10) for a range. Do not use list format [7, 7].") + content: str = Field(description="The content of the TODO comment. Only include actual TODO comments within code comments (e.g., lines starting with '#', '//', '/*', ' |