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 36f71e1 commit 5dc3c99
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions pr_agent/algo/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def convert_to_markdown_v2(output_data: dict,

emojis = {
"Can be split": "🔀",
"Possible issues": "⚡",
"Key issues to review": "⚡",
"Recommended issues for further review": "⚡",
"Score": "🏅",
"Relevant tests": "🧪",
Expand Down Expand Up @@ -187,7 +187,7 @@ def convert_to_markdown_v2(output_data: dict,
markdown_text += f"<tr><td>"
markdown_text += process_can_be_split(emoji, value)
markdown_text += f"</td></tr>\n"
elif 'Recommended issues for further review' in key_nice.lower():
elif 'key issues to review' in key_nice.lower():
# value is a list of issues
if is_value_no(value):
if gfm_supported:
Expand All @@ -197,13 +197,11 @@ def convert_to_markdown_v2(output_data: dict,
else:
markdown_text += f"### {emoji} No major problems identified\n\n"
else:
# issues = value.split('\n- ')
issues =value
# for i, _ in enumerate(issues):
# issues[i] = issues[i].strip().strip('-').strip()
issues = value
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>{key_nice}</strong><br><br>\n\n"
markdown_text += f"{emoji}&nbsp;<strong>Recommended issues for further review</strong><br><br>\n\n"
else:
markdown_text += f"### {emoji} Recommended issues for further review\n\n#### \n"
for i, issue in enumerate(issues):
Expand Down

0 comments on commit 5dc3c99

Please sign in to comment.