From c9e55be275b2f08cc05adf0ffcc1044b3a1db4e9 Mon Sep 17 00:00:00 2001 From: mrT23 Date: Mon, 8 Jan 2024 10:30:47 +0200 Subject: [PATCH 1/2] s --- pr_agent/git_providers/git_provider.py | 6 +++--- pr_agent/tools/pr_description.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pr_agent/git_providers/git_provider.py b/pr_agent/git_providers/git_provider.py index 2b5e4e71..78ff7a5c 100644 --- a/pr_agent/git_providers/git_provider.py +++ b/pr_agent/git_providers/git_provider.py @@ -82,7 +82,7 @@ class GitProvider(ABC): # if the existing description was generated by the pr-agent, but it doesn't contain a user description, # return nothing (empty string) because it means there is no user description - user_description_header = "## user description" + user_description_header = "## **user description**" if user_description_header not in description_lowercase: return "" @@ -109,8 +109,8 @@ class GitProvider(ABC): return original_user_description def _possible_headers(self): - return ("## user description", "## pr type", "## pr description", "## pr labels", "## type", "## description", - "## labels", "### 🤖 generated by pr agent") + return ("## **user description**", "## **pr type**", "## **pr description**", "## **pr labels**", "## **type**", "## **description**", + "## **labels**", "### 🤖 generated by pr agent") def _is_generated_by_pr_agent(self, description_lowercase: str) -> bool: possible_headers = self._possible_headers() diff --git a/pr_agent/tools/pr_description.py b/pr_agent/tools/pr_description.py index 732cfae7..8477a444 100644 --- a/pr_agent/tools/pr_description.py +++ b/pr_agent/tools/pr_description.py @@ -279,7 +279,7 @@ class PRDescription: if not get_settings().pr_description.enable_pr_type: self.data.pop('type') for key, value in self.data.items(): - markdown_text += f"## {key}\n\n" + markdown_text += f"## **{key}**\n\n" markdown_text += f"{value}\n\n" # Remove the 'PR Title' key from the dictionary @@ -300,7 +300,7 @@ class PRDescription: key_publish = "Changes walkthrough" else: key_publish = key.rstrip(':').replace("_", " ").capitalize() - pr_body += f"## {key_publish}\n" + pr_body += f"## **{key_publish}**\n" if 'walkthrough' in key.lower(): if self.git_provider.is_supported("gfm_markdown"): pr_body += "
files:\n\n" From e9a2a0a96f2a395aeb4977ea433e0c46f2e9d7b8 Mon Sep 17 00:00:00 2001 From: mrT23 Date: Mon, 8 Jan 2024 10:37:51 +0200 Subject: [PATCH 2/2] s --- pr_agent/settings/configuration.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pr_agent/settings/configuration.toml b/pr_agent/settings/configuration.toml index bd37e624..89912e46 100644 --- a/pr_agent/settings/configuration.toml +++ b/pr_agent/settings/configuration.toml @@ -46,7 +46,7 @@ enable_help_text=true # Determines whether to include help text in the PR review [pr_description] # /describe # publish_labels=true publish_description_as_comment=false -add_original_user_description=false +add_original_user_description=true keep_original_user_title=false use_bullet_points=true extra_instructions = ""