From 0f92d65de27f17ae2a55f2c9a5fe396340a40a13 Mon Sep 17 00:00:00 2001 From: Hiroshi Nishio Date: Mon, 18 Nov 2024 12:09:18 +0900 Subject: [PATCH] Enable GitAuto to respond in a language users used --- services/openai/instructions/identify_cause.py | 4 +++- services/openai/instructions/update_comment.py | 2 +- services/openai/instructions/write_pr_body.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/services/openai/instructions/identify_cause.py b/services/openai/instructions/identify_cause.py index 367dc422..44c8f99b 100644 --- a/services/openai/instructions/identify_cause.py +++ b/services/openai/instructions/identify_cause.py @@ -1,6 +1,6 @@ IDENTIFY_CAUSE = """ You are a GitHub Actions, Workflow, and Check Run expert. -Given information such as a pull request title, body, changes, workflow file content, and check run error log, identify the cause of the Check Run failure and write a plan to fix the error. +Given information such as a pull request title, body, changes, workflow file content, and check run error log, identify the cause of the Check Run failure and write a plan to fix the error in a language that is used in the input (e.g. if the input is mainly in Japanese, the plan should be in Japanese). Make only the absolutely necessary changes to fix the error, minimizing code modifications. Unnecessary changes can confuse reviewers, and a skilled engineer avoids that. @@ -10,4 +10,6 @@ ## Where is the Error Located? ## How to Fix the Error? ## Why Fix it This Way? + +Always be clear, specific, concise, and direct in your responses. """ diff --git a/services/openai/instructions/update_comment.py b/services/openai/instructions/update_comment.py index 4e5ebc65..9d9f349e 100644 --- a/services/openai/instructions/update_comment.py +++ b/services/openai/instructions/update_comment.py @@ -1,5 +1,5 @@ SYSTEM_INSTRUCTION_TO_UPDATE_COMMENT = """ -You are assigned to a ticket and can update comments in GitHub issues or pull requests. Your role is to: +You are assigned to a ticket and can update comments in GitHub issues or pull requests in a language that is used in the input (e.g. if the input is mainly in Japanese, the comment should be in Japanese). Your role is to: 1. If the issue can be resolved by code changes, proceed without using any tools. diff --git a/services/openai/instructions/write_pr_body.py b/services/openai/instructions/write_pr_body.py index f9a1aa1b..002295d3 100644 --- a/services/openai/instructions/write_pr_body.py +++ b/services/openai/instructions/write_pr_body.py @@ -1,5 +1,5 @@ WRITE_PR_BODY = ''' -Act as an expert software developer. Write a pull request body. +Act as an expert software developer. Write a pull request body in a language that is used in the input (e.g. if the input is mainly in Japanese, the pull request body should be in Japanese). NEVER use triple backticks unless it's a code block. You will first receive the contents of the issue such as the title, body, and comments. This will be followed by the file paths of the repository which you will use to suggest changes in the pull request body. Based on the content of the issue, use different formats for bug fixes or feature requests: