Skip to content

Commit

Permalink
feat: enhance help message formatting and support for different git p…
Browse files Browse the repository at this point in the history
…roviders
  • Loading branch information
mrT23 committed Jan 23, 2025
1 parent eba116f commit e9c1c91
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/docs/installation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ There are several ways to use self-hosted PR-Agent:
## Qodo Merge 💎
Qodo Merge, an app hosted by QodoAI for GitHub\GitLab\BitBucket, is also available.
<br>
With Qodo Merge, installation is as simple as adding the Qodo Merge app to your relevant repo.
With Qodo Merge, installation is as simple as adding the Qodo Merge app to your relevant repositories.
See [here](https://qodo-merge-docs.qodo.ai/installation/qodo_merge/) for more details.
14 changes: 12 additions & 2 deletions pr_agent/tools/pr_description.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,18 @@ async def run(self):
pr_body += "<hr>\n\n<details> <summary><strong>✨ Describe tool usage guide:</strong></summary><hr> \n\n"
pr_body += HelpMessage.get_describe_usage_guide()
pr_body += "\n</details>\n"
elif get_settings().pr_description.enable_help_comment:
pr_body += '\n\n___\n\n> 💡 **PR-Agent usage**: Comment `/help "your question"` on any pull request to receive relevant information'
elif get_settings().pr_description.enable_help_comment and self.git_provider.is_supported("gfm_markdown"):
if isinstance(self.git_provider, GithubProvider):
pr_body += ('\n\n___\n\n> <details> <summary> Need help?</summary><li>Type <code>/help how to ...</code> '
'in the comments thread for any questions about PR-Agent usage.</li><li>Check out the '
'<a href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a> '
'for more information.</li></details>')
else: # gitlab
pr_body += ("> <details><summary>Need help?</summary>- Type <code>/help how to ...</code> in the comments "
"thread for any questions about PR-Agent usage.<br>- Check out the "
"<a href='https://qodo-merge-docs.qodo.ai/usage-guide/'>documentation</a> for more information.</details>")
# elif get_settings().pr_description.enable_help_comment:
# pr_body += '\n\n___\n\n> 💡 **PR-Agent usage**: Comment `/help "your question"` on any pull request to receive relevant information'

# Output the relevant configurations if enabled
if get_settings().get('config', {}).get('output_relevant_configurations', False):
Expand Down

0 comments on commit e9c1c91

Please sign in to comment.