From 8f9f09ecbf9af13ebfbdcb7e3a5e54c978105b0c Mon Sep 17 00:00:00 2001 From: Zohar Meir <33152084+zmeir@users.noreply.github.com> Date: Sun, 8 Oct 2023 16:19:11 +0300 Subject: [PATCH] Fixed help message for bot user This changes the help message to display properly when running a custom deployment of the PR-Agent app (i.e. not via GitHub Actions, and with the setting `github_app.override_deployment_type=false`) --- pr_agent/tools/pr_reviewer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pr_agent/tools/pr_reviewer.py b/pr_agent/tools/pr_reviewer.py index b96d5379..919e1800 100644 --- a/pr_agent/tools/pr_reviewer.py +++ b/pr_agent/tools/pr_reviewer.py @@ -241,7 +241,8 @@ class PRReviewer: # Add help text if not in CLI mode if not get_settings().get("CONFIG.CLI_MODE", False): markdown_text += "\n### How to use\n" - if user and '[bot]' not in user: + 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) else: markdown_text += actions_help_text