mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-04 04:40:38 +08:00
s
This commit is contained in:
@ -58,7 +58,8 @@ def convert_to_markdown(output_data: dict, gfm_supported: bool=True) -> str:
|
||||
emoji = emojis.get(key, "")
|
||||
if key.lower() == 'code feedback':
|
||||
if gfm_supported:
|
||||
markdown_text += f"\n\n- **<details><summary> { emoji } Code feedback:**</summary>\n\n"
|
||||
markdown_text += f"\n\n- "
|
||||
markdown_text += f"<details><summary> { emoji } Code feedback:</summary>\n\n"
|
||||
else:
|
||||
markdown_text += f"\n\n- **{emoji} Code feedback:**\n\n"
|
||||
else:
|
||||
@ -99,9 +100,9 @@ def parse_code_suggestion(code_suggestions: dict, gfm_supported: bool=True) -> s
|
||||
markdown_text += f" - **{code_key}:**\n{code_str_indented}\n"
|
||||
else:
|
||||
if "relevant file" in sub_key.lower():
|
||||
markdown_text += f"\n - **{sub_key}:** {sub_value}\n"
|
||||
markdown_text += f"\n - **{sub_key}:** {sub_value} \n"
|
||||
else:
|
||||
markdown_text += f" **{sub_key}:** {sub_value}\n"
|
||||
markdown_text += f" **{sub_key}:** {sub_value} \n"
|
||||
if not gfm_supported:
|
||||
if "relevant line" not in sub_key.lower(): # nicer presentation
|
||||
# markdown_text = markdown_text.rstrip('\n') + "\\\n" # works for gitlab
|
||||
|
@ -260,7 +260,8 @@ class PRCodeSuggestions:
|
||||
data_markdown += f"📌 File:\n\n{s['relevant file']} ({s['relevant lines start']}-{s['relevant lines end']})\n"
|
||||
data_markdown += f"\nSuggestion:\n\n**{s['suggestion content']}**\n\n"
|
||||
if self.git_provider.is_supported("gfm_markdown"):
|
||||
data_markdown += "<details> <summary> Example code:</summary>\n\n___\n\n"
|
||||
data_markdown += "<details> <summary> Example code:</summary>\n\n"
|
||||
data_markdown += f"___\n\n"
|
||||
data_markdown += f"Existing code:\n```{self.main_language}\n{s['existing code']}\n```\n"
|
||||
data_markdown += f"Improved code:\n```{self.main_language}\n{s['improved code']}\n```\n"
|
||||
if self.git_provider.is_supported("gfm_markdown"):
|
||||
|
@ -250,7 +250,7 @@ class PRReviewer:
|
||||
if not get_settings().get("CONFIG.CLI_MODE", False):
|
||||
markdown_text += "\n### How to use\n"
|
||||
if self.git_provider.is_supported("gfm_markdown"):
|
||||
markdown_text += "\n**<details><summary> Instructions**</summary>\n"
|
||||
markdown_text += "\n <details> <summary> Instructions</summary>\n\n"
|
||||
bot_user = "[bot]" if get_settings().github_app.override_deployment_type else get_settings().github_app.bot_user
|
||||
if user and bot_user not in user:
|
||||
markdown_text += bot_help_text(user)
|
||||
|
Reference in New Issue
Block a user