mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-04 04:40:38 +08:00
Enhance PR description handling and improve logging for invalid file extensions in Bitbucket provider
This commit is contained in:
@ -170,7 +170,7 @@ class BitbucketProvider(GitProvider):
|
|||||||
diff_files.append(file_patch_canonic_structure)
|
diff_files.append(file_patch_canonic_structure)
|
||||||
|
|
||||||
if invalid_files_names:
|
if invalid_files_names:
|
||||||
get_logger().info(f"Invalid file names: {invalid_files_names}")
|
get_logger().info(f"Disregarding files with invalid extensions:\n{invalid_files_names}")
|
||||||
|
|
||||||
|
|
||||||
self.diff_files = diff_files
|
self.diff_files = diff_files
|
||||||
|
@ -465,7 +465,7 @@ class PRDescription:
|
|||||||
pr_body += f'- `{filename}`: {description}\n'
|
pr_body += f'- `{filename}`: {description}\n'
|
||||||
if self.git_provider.is_supported("gfm_markdown"):
|
if self.git_provider.is_supported("gfm_markdown"):
|
||||||
pr_body += "</details>\n"
|
pr_body += "</details>\n"
|
||||||
elif 'pr_files' in key.lower():
|
elif 'pr_files' in key.lower() and get_settings().pr_description.enable_semantic_files_types:
|
||||||
changes_walkthrough, pr_file_changes = self.process_pr_files_prediction(changes_walkthrough, value)
|
changes_walkthrough, pr_file_changes = self.process_pr_files_prediction(changes_walkthrough, value)
|
||||||
changes_walkthrough = f"### **Changes walkthrough** 📝\n{changes_walkthrough}"
|
changes_walkthrough = f"### **Changes walkthrough** 📝\n{changes_walkthrough}"
|
||||||
else:
|
else:
|
||||||
@ -506,7 +506,7 @@ class PRDescription:
|
|||||||
use_collapsible_file_list = num_files > self.COLLAPSIBLE_FILE_LIST_THRESHOLD
|
use_collapsible_file_list = num_files > self.COLLAPSIBLE_FILE_LIST_THRESHOLD
|
||||||
|
|
||||||
if not self.git_provider.is_supported("gfm_markdown"):
|
if not self.git_provider.is_supported("gfm_markdown"):
|
||||||
return pr_body
|
return pr_body, pr_comments
|
||||||
try:
|
try:
|
||||||
pr_body += "<table>"
|
pr_body += "<table>"
|
||||||
header = f"Relevant files"
|
header = f"Relevant files"
|
||||||
|
Reference in New Issue
Block a user