Merge pull request #965 from Codium-ai/tr/reviewer

Tr/reviewer
This commit is contained in:
Tal
2024-06-13 09:34:28 +03:00
committed by GitHub
2 changed files with 37 additions and 33 deletions

View File

@ -163,6 +163,7 @@ def convert_to_markdown(output_data: dict, gfm_supported: bool = True, increment
def process_can_be_split(emoji, value):
try:
# key_nice = "Can this PR be split?"
key_nice = "Multiple PR themes"
markdown_text = ""
@ -176,7 +177,7 @@ def process_can_be_split(emoji, value):
title = split.get('title', '')
relevant_files = split.get('relevant_files', [])
if i == 0:
markdown_text += f"<td><details><summary>\nSub-PR theme: <strong>{title}</strong></summary>\n\n"
markdown_text += f"<td><details><summary>\nSub-PR theme:<br><strong>{title}</strong></summary>\n\n"
markdown_text += f"<hr>\n"
markdown_text += f"Relevant files:\n"
markdown_text += f"<ul>\n"
@ -184,13 +185,16 @@ def process_can_be_split(emoji, value):
markdown_text += f"<li>{file}</li>\n"
markdown_text += f"</ul>\n\n</details></td></tr>\n"
else:
markdown_text += f"<tr>\n<td><details><summary>\nSub-PR theme: <strong>{title}</strong></summary>\n\n"
markdown_text += f"<tr>\n<td><details><summary>\nSub-PR theme:<br><strong>{title}</strong></summary>\n\n"
markdown_text += f"<hr>\n"
markdown_text += f"Relevant files:\n"
markdown_text += f"<ul>\n"
for file in relevant_files:
markdown_text += f"<li>{file}</li>\n"
markdown_text += f"</ul>\n\n</details></td></tr>\n"
except Exception as e:
get_logger().exception(f"Failed to process can be split: {e}")
return ""
return markdown_text

View File

@ -113,7 +113,7 @@ review:
security_concerns: |
No
{%- if require_can_be_split_review %}
can_be_split: |
can_be_split:
- relevant_files:
- ...
- ...