diff --git a/pr_agent/servers/github_action_runner.py b/pr_agent/servers/github_action_runner.py index 417e8154..bdd4f5cf 100644 --- a/pr_agent/servers/github_action_runner.py +++ b/pr_agent/servers/github_action_runner.py @@ -54,6 +54,7 @@ async def run_action(): if OPENAI_KEY: get_settings().set("OPENAI.KEY", OPENAI_KEY) else: + # Might not be set if the user is using models not from OpenAI print("OPENAI_KEY not set") if OPENAI_ORG: get_settings().set("OPENAI.ORG", OPENAI_ORG) @@ -89,6 +90,7 @@ async def run_action(): if action in pr_actions: pr_url = event_payload.get("pull_request", {}).get("url") if pr_url: + # legacy - supporting both GITHUB_ACTION and GITHUB_ACTION_CONFIG auto_review = get_setting_or_env("GITHUB_ACTION.AUTO_REVIEW", None) if auto_review is None: auto_review = get_setting_or_env("GITHUB_ACTION_CONFIG.AUTO_REVIEW", None) @@ -99,6 +101,7 @@ async def run_action(): if auto_improve is None: auto_improve = get_setting_or_env("GITHUB_ACTION_CONFIG.AUTO_IMPROVE", None) + # invoke by default all three tools if auto_describe is None or is_true(auto_describe): get_settings().pr_description.final_update_message = False # No final update message when auto_describe is enabled await PRDescription(pr_url).run() @@ -128,7 +131,7 @@ async def run_action(): if event_payload.get("issue", {}).get("pull_request"): url = event_payload.get("issue", {}).get("pull_request", {}).get("url") is_pr = True - elif event_payload.get("comment", {}).get("pull_request_url"): + elif event_payload.get("comment", {}).get("pull_request_url"): # for 'pull_request_review_comment url = event_payload.get("comment", {}).get("pull_request_url") is_pr = True disable_eyes = True