diff --git a/pr_agent/algo/utils.py b/pr_agent/algo/utils.py
index 08401514..9e12d8a1 100644
--- a/pr_agent/algo/utils.py
+++ b/pr_agent/algo/utils.py
@@ -120,6 +120,9 @@ def convert_to_markdown_v2(output_data: dict,
if not output_data or not output_data.get('review', {}):
return ""
+ if get_settings().get("pr_reviewer.enable_intro_text", False):
+ markdown_text += f"Here are some key observations to aid the review process:\n\n"
+
if gfm_supported:
markdown_text += "
\n"
diff --git a/pr_agent/settings/configuration.toml b/pr_agent/settings/configuration.toml
index 761d6cd5..961fbeb1 100644
--- a/pr_agent/settings/configuration.toml
+++ b/pr_agent/settings/configuration.toml
@@ -69,6 +69,7 @@ enable_review_labels_effort=true
require_all_thresholds_for_incremental_review=false
minimal_commits_for_incremental_review=0
minimal_minutes_for_incremental_review=0
+enable_intro_text=true
enable_help_text=false # Determines whether to include help text in the PR review. Enabled by default.
# auto approval
enable_auto_approval=false
diff --git a/tests/unittest/test_convert_to_markdown.py b/tests/unittest/test_convert_to_markdown.py
index 5d914203..2eebfdef 100644
--- a/tests/unittest/test_convert_to_markdown.py
+++ b/tests/unittest/test_convert_to_markdown.py
@@ -53,7 +53,7 @@ class TestConvertToMarkdown:
'relevant_line': '[return ""](https://github.com/Codium-ai/pr-agent-pro/pull/102/files#diff-52d45f12b836f77ed1aef86e972e65404634ea4e2a6083fb71a9b0f9bb9e062fR199)'}]}
- expected_output = f'{PRReviewHeader.REGULAR.value} 🔍\n\n\n⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪ |
\n🧪 No relevant tests |
\n⚡ Possible issues: No\n |
\n🔒 No security concerns identified |
\n
\n\n\n Code feedback:
\n\n
relevant file | pr_agent/git_providers/git_provider.py\n |
suggestion | \n\n\n\nConsider raising an exception or logging a warning when \'pr_url\' attribute is not found. This can help in debugging issues related to the absence of \'pr_url\' in instances where it\'s expected. [important]\n\n\n |
relevant line | return "" |
\n\n '
+ expected_output = f'{PRReviewHeader.REGULAR.value} 🔍\n\nHere are some key observations to aid the review process:\n\n\n⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪ |
\n🧪 No relevant tests |
\n⚡ Possible issues: No\n |
\n🔒 No security concerns identified |
\n
\n\n\n Code feedback:
\n\n
relevant file | pr_agent/git_providers/git_provider.py\n |
suggestion | \n\n\n\nConsider raising an exception or logging a warning when \'pr_url\' attribute is not found. This can help in debugging issues related to the absence of \'pr_url\' in instances where it\'s expected. [important]\n\n\n |
relevant line | return "" |
\n\n '
assert convert_to_markdown_v2(input_data).strip() == expected_output.strip()