Skip to content

Commit

Permalink
chore: using portuguese to sugestions
Browse files Browse the repository at this point in the history
  • Loading branch information
emanuel-braz committed Nov 8, 2023
1 parent 078c2a3 commit d9fe56a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/code-review.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
append_prompt: |
Give a maximum of 3 suggestions.
All suggestions must be in portuguese (pt-br), and must follow Markdown syntax.
13 changes: 7 additions & 6 deletions code-review/action.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,13 @@ function createMessages(file, chunk, prDetails) {
const instructionJsonFormat = `- Provide the response in following JSON format: [{"lineNumber": <line_number>, "reviewComment": "<review comment>"}]`;

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) {
Expand Down

0 comments on commit d9fe56a

Please sign in to comment.