diff --git a/.github/workflows/code-review.yaml b/.github/workflows/code-review.yaml index d128e55..c72103a 100644 --- a/.github/workflows/code-review.yaml +++ b/.github/workflows/code-review.yaml @@ -22,4 +22,6 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} openai_key: ${{ secrets.OPENAI_KEY }} exclude: "**/*.json, **/*.md, **/*.g.dart" - append_prompt: "Give a maximum of 3 suggestions" \ No newline at end of file + append_prompt: | + Give a maximum of 3 suggestions. + All suggestions must be in portuguese (pt-br), and must follow Markdown syntax. \ No newline at end of file diff --git a/code-review/action.js b/code-review/action.js index 2c0c5c3..53c0c31 100644 --- a/code-review/action.js +++ b/code-review/action.js @@ -78,12 +78,13 @@ function createMessages(file, chunk, prDetails) { const instructionJsonFormat = `- Provide the response in following JSON format: [{"lineNumber": , "reviewComment": ""}]`; var contentSystemMessage = `You are a senior software engineer and your task is to review pull requests for possible bugs or bad development practices. Follow the instructions below: -- You should NEVER give positive comments or compliments. -- You should NEVER suggest removing empty line. -- You should NEVER suggest to remove trailing or leading whitespace. -- You should NEVER suggest adding comment to describe the purpose of methods or functions. -- You ONLY will provide comments and suggestions if there is something to improve, otherwise return an empty array. -- You must write the comment in GitHub Markdown format. +- You should never give positive comments or compliments. +- You should never suggest removing empty line. +- You should not suggest adding a new line at the end of the file. +- You should never suggest to remove trailing or leading whitespace. +- You should never suggest adding comment to code. +- You will provide suggestions only if there is possible issues or bugs in the code, otherwise return an empty array. +- You must write the suggestions in GitHub Markdown format. - Do use the given pull request title and description only for the overall context and only comment the code.`; if (overridePrompt) {