From b1fe37abff4db376376983d94cece727383cc3fe Mon Sep 17 00:00:00 2001 From: mrT23 Date: Mon, 30 Sep 2024 08:47:50 +0300 Subject: [PATCH] refactor: update terminology for issue review recommendations in utils.py --- pr_agent/algo/utils.py | 8 ++++---- pr_agent/settings/pr_reviewer_prompts.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pr_agent/algo/utils.py b/pr_agent/algo/utils.py index 155a245b9..f8eca4959 100644 --- a/pr_agent/algo/utils.py +++ b/pr_agent/algo/utils.py @@ -101,7 +101,7 @@ def convert_to_markdown_v2(output_data: dict, emojis = { "Can be split": "๐Ÿ”€", "Key issues to review": "โšก", - "Recommended issues to focus on": "โšก", + "Recommended review focus areas": "โšก", "Score": "๐Ÿ…", "Relevant tests": "๐Ÿงช", "Focused PR": "โœจ", @@ -201,9 +201,9 @@ def convert_to_markdown_v2(output_data: dict, if gfm_supported: markdown_text += f"" # markdown_text += f"{emoji} {key_nice}

\n\n" - markdown_text += f"{emoji} Recommended issues to focus on

\n\n" + markdown_text += f"{emoji} Recommended review focus areas

\n\n" else: - markdown_text += f"### {emoji} Recommended issues to focus on\n\n#### \n" + markdown_text += f"### {emoji} Recommended review focus areas\n\n#### \n" for i, issue in enumerate(issues): try: if not issue or not isinstance(issue, dict): @@ -221,7 +221,7 @@ def convert_to_markdown_v2(output_data: dict, issue_str = f"[**{issue_header}**]({reference_link})\n\n{issue_content}\n\n" markdown_text += f"{issue_str}\n\n" except Exception as e: - get_logger().exception(f"Failed to process 'Recommended issues to focus on': {e}") + get_logger().exception(f"Failed to process 'Recommended review focus areas': {e}") if gfm_supported: markdown_text += f"\n" else: diff --git a/pr_agent/settings/pr_reviewer_prompts.toml b/pr_agent/settings/pr_reviewer_prompts.toml index a3a0fbb2b..a7cff9138 100644 --- a/pr_agent/settings/pr_reviewer_prompts.toml +++ b/pr_agent/settings/pr_reviewer_prompts.toml @@ -82,7 +82,7 @@ class SubPR(BaseModel): class KeyIssuesComponentLink(BaseModel): relevant_file: str = Field(description="The full file path of the relevant file") issue_header: str = Field(description="One or two word title for the the issue. For example: 'Possible Bug', 'Performance Issue', 'Code Smell', etc.") - issue_content: str = Field(description="A short and concise summary of the issue for review. Don't state line numbers here") + issue_content: str = Field(description="A short and concise summary of the issue recommended for focus in the review process. Don't state line numbers here") start_line: int = Field(description="The start line that corresponds to this issue in the relevant file") end_line: int = Field(description="The end line that corresponds to this issue in the relevant file")