mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-12-13 03:15:17 +00:00
Merge pull request #573 from Codium-ai/tr/user_description
feat: Update adaptive collapsible file list logic in pr_description.py
This commit is contained in:
commit
19e38595f3
1 changed files with 7 additions and 1 deletions
|
|
@ -340,9 +340,15 @@ class PRDescription:
|
|||
pass
|
||||
|
||||
def process_pr_files_prediction(self, pr_body, value):
|
||||
# logic for using collapsible file list
|
||||
use_collapsible_file_list = get_settings().pr_description.collapsible_file_list
|
||||
num_files = 0
|
||||
if value:
|
||||
for semantic_label in value.keys():
|
||||
num_files += len(value[semantic_label])
|
||||
if use_collapsible_file_list == "adaptive":
|
||||
use_collapsible_file_list = len(value) > 8
|
||||
use_collapsible_file_list = num_files > 8
|
||||
|
||||
if not self.git_provider.is_supported("gfm_markdown"):
|
||||
get_logger().info(f"Disabling semantic files types for {self.pr_id} since gfm_markdown is not supported")
|
||||
return pr_body
|
||||
|
|
|
|||
Loading…
Reference in a new issue