diff --git a/docs/docs/core-abilities/metadata.md b/docs/docs/core-abilities/metadata.md
index bcb91fae3..d36c93e44 100644
--- a/docs/docs/core-abilities/metadata.md
+++ b/docs/docs/core-abilities/metadata.md
@@ -8,7 +8,8 @@ PR-Agent initially retrieves for each PR the following data:
- PR diff patches, in [hunk diff](https://loicpefferkorn.net/2014/02/diff-files-what-are-hunks-and-how-to-extract-them/) format
- The entire content of the files that were modified in the PR
-In addition, PR-Agent can incorporate supplementary information provided by the user and more tailored to his specific preferences, like [`extra_instructions` and `organization best practices`](https://pr-agent-docs.codium.ai/tools/improve/#extra-instructions-and-best-practices) that can be used to enhance the PR analysis.
+!!! tip "Tip: Organization-level metadata"
+ In addition to the inputs above, PR-Agent can incorporate supplementary preferences provided by the user, like [`extra_instructions` and `organization best practices`](https://pr-agent-docs.codium.ai/tools/improve/#extra-instructions-and-best-practices). This information can be used to enhance the PR analysis.
(2)
By default, the first command that PR-Agent executes is [`describe`](https://pr-agent-docs.codium.ai/tools/describe/), which generates three types of outputs:
diff --git a/pr_agent/algo/utils.py b/pr_agent/algo/utils.py
index ba7d5a003..0e699ac13 100644
--- a/pr_agent/algo/utils.py
+++ b/pr_agent/algo/utils.py
@@ -967,9 +967,11 @@ def process_description(description_full: str):
try:
if isinstance(file_data, tuple):
file_data = file_data[0]
- # pattern = r'\s*(.*?)(.*?)
.*?
\s*
\s*(.*?)\s*((?:\*.*\s*)*) '
- pattern = r'\s*(.*?)(.*?)
.*?
\s*
\s*(.*?)\n\n\s*(.*?) '
+ pattern = r'\s*(.*?)\s*(.*?)
.*?
\s*
\s*(.*?)\s*(.*?) '
res = re.search(pattern, file_data, re.DOTALL)
+ if not res or res.lastindex != 4:
+ pattern_back = r'\s*(.*?)(.*?)
.*?
\s*
\s*(.*?)\n\n\s*(.*?) '
+ res = re.search(pattern_back, file_data, re.DOTALL)
if res and res.lastindex == 4:
short_filename = res.group(1).strip()
short_summary = res.group(2).strip()
diff --git a/pr_agent/tools/pr_code_suggestions.py b/pr_agent/tools/pr_code_suggestions.py
index 2e6eb8923..18791919e 100644
--- a/pr_agent/tools/pr_code_suggestions.py
+++ b/pr_agent/tools/pr_code_suggestions.py
@@ -517,8 +517,7 @@ def _get_is_extended(self, args: list[str]) -> bool:
async def _prepare_prediction_extended(self, model: str) -> dict:
self.patches_diff_list = get_pr_multi_diffs(self.git_provider, self.token_handler, model,
- max_calls=get_settings().pr_code_suggestions.max_number_of_calls,
- pr_description_files =self.pr_description_files)
+ max_calls=get_settings().pr_code_suggestions.max_number_of_calls)
if self.patches_diff_list:
get_logger().info(f"Number of PR chunk calls: {len(self.patches_diff_list)}")
get_logger().debug(f"PR diff:", artifact=self.patches_diff_list)