Skip to content

Commit

Permalink
refactor: update terminology for issue review recommendations in util…
Browse files Browse the repository at this point in the history
…s.py
  • Loading branch information
mrT23 committed Sep 30, 2024
1 parent f800d2d commit b1fe37a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions pr_agent/algo/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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": "✨",
Expand Down Expand Up @@ -201,9 +201,9 @@ def convert_to_markdown_v2(output_data: dict,
if gfm_supported:
markdown_text += f"<tr><td>"
# markdown_text += f"{emoji}&nbsp;<strong>{key_nice}</strong><br><br>\n\n"
markdown_text += f"{emoji}&nbsp;<strong>Recommended issues to focus on</strong><br><br>\n\n"
markdown_text += f"{emoji}&nbsp;<strong>Recommended review focus areas</strong><br><br>\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):
Expand All @@ -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"</td></tr>\n"
else:
Expand Down
2 changes: 1 addition & 1 deletion pr_agent/settings/pr_reviewer_prompts.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit b1fe37a

Please sign in to comment.