From 6ca7caff06290eeb5c5c0690004dab9bfcdc0333 Mon Sep 17 00:00:00 2001 From: Hiroshi Nishio Date: Mon, 19 Aug 2024 18:53:09 +0900 Subject: [PATCH] Add pr_body to base_args for simplicity --- services/gitauto_handler.py | 2 +- services/openai/agent.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/services/gitauto_handler.py b/services/gitauto_handler.py index f033dc9e..85a5d0d7 100644 --- a/services/gitauto_handler.py +++ b/services/gitauto_handler.py @@ -162,6 +162,7 @@ async def handle_gitauto(payload: GitHubLabeledPayload, trigger_type: str) -> No } ) ) + base_args["pr_body"] = pr_body # Create a remote branch comment_body = create_progress_bar(p=20, msg="Creating a remote branch...") @@ -179,7 +180,6 @@ async def handle_gitauto(payload: GitHubLabeledPayload, trigger_type: str) -> No issue_body=issue_body, reference_contents=reference_contents, issue_comments=issue_comments, - pr_body=pr_body, root_files_and_dirs=root_files_and_dirs, base_args=base_args, ) diff --git a/services/openai/agent.py b/services/openai/agent.py index 7c12abcd..575ed593 100644 --- a/services/openai/agent.py +++ b/services/openai/agent.py @@ -100,15 +100,15 @@ def run_assistant( issue_body: str, reference_contents: list[str], issue_comments: list[str], - pr_body: str, root_files_and_dirs: list[str], base_args: BaseArgs, ) -> tuple[int, int]: # Create a message in the thread - owner, repo, comment_url, token = ( + owner, repo, comment_url, pr_body, token = ( base_args["owner"], base_args["repo"], base_args["comment_url"], + base_args["pr_body"], base_args["token"], ) data: dict[str, str | list[str]] = {