-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code review #12
Code review #12
Conversation
@@ -0,0 +1,26 @@ | |||
name: Code Reviewer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
O nome do fluxo de trabalho não está claro. Deve ser mais descritivo.
@@ -0,0 +1,26 @@ | |||
name: Code Reviewer | |||
run-name: Action started by ${{ github.actor }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
O nome do trabalho em execução não está claro. Deve ser mais descritivo.
name: Code Reviewer | ||
run-name: Action started by ${{ github.actor }} | ||
|
||
on: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
O evento 'pull_request' não está configurado corretamente. Verifique a sintaxe.
- opened | ||
- synchronize | ||
|
||
permissions: write-all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As permissões 'write-all' são muito amplas. Considere restringir as permissões necessárias.
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Code Review the pull request |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
O nome da etapa não está claro. Deve ser mais descritivo.
description: "The text to be used to append to the default prompt." | ||
required: false | ||
|
||
runs: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adicione um comentário explicando o propósito desta propriedade.
required: false | ||
|
||
runs: | ||
using: "node16" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adicione um comentário explicando o propósito desta propriedade.
@@ -29,6 +29,18 @@ class SimpleChatGptService { | |||
throw error; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remova a linha vazia desnecessária.
@@ -29,6 +29,18 @@ class SimpleChatGptService { | |||
throw error; | |||
} | |||
} | |||
|
|||
// chatCompletionParams: ChatCompletionParams |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adicione um comentário explicando o propósito deste método.
console.error('[SimpleChatGptService]', error); | ||
throw error; | ||
} | ||
} | ||
} | ||
|
||
module.exports = SimpleChatGptService; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adicione uma nova linha ao final do arquivo.
|
||
- name: Code Review the pull request | ||
uses: ./code-review | ||
with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adicionar um espaço em branco após a vírgula.
max_tokens: 900 | ||
exclude: "**/*.json, **/*.md, **/*.g.dart" | ||
append_prompt: | | ||
- Give a minimum of 0 suggestions and a maximum of 5 suggestions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remover o espaço em branco antes do sinal de adição.
exclude: "**/*.json, **/*.md, **/*.g.dart" | ||
append_prompt: | | ||
- Give a minimum of 0 suggestions and a maximum of 5 suggestions. | ||
- Translate the comment in all "reviewComment" properties to portuguese (pt-br). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adicionar uma nova linha no final do arquivo.
const logger = new Logger(true, core); | ||
const GITHUB_TOKEN = core.getInput("token"); | ||
const OPENAI_API_KEY = core.getInput("openai_key"); | ||
const OPENAI_API_MODEL = core.getInput("openai_key_model"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verifique se a variável 'maxTokens' está sendo utilizada corretamente.
const overridePrompt = core.getInput("override_prompt"); | ||
const appendPrompt = core.getInput("append_prompt"); | ||
const maxTokens = core.getInput("max_tokens"); | ||
const excludePatterns = core |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verifique se a variável 'excludePatterns' está sendo utilizada corretamente.
|
||
async function getAIResponse(messages) { | ||
|
||
logger.log(`Max tokens: ${maxTokens}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adicione um espaço antes do parêntese de abertura.
|
||
try { | ||
const chatCompletionParams = new ChatCompletionParams({ | ||
messages: messages, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remova o espaço antes do sinal de igual.
messages: messages, | ||
model: OPENAI_API_MODEL, | ||
temperature: 0, | ||
max_tokens: parseInt(maxTokens), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adicione um espaço antes do sinal de igual.
description: "OpenAI API model." | ||
required: false | ||
default: "gpt-3.5-turbo" | ||
max_tokens: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A propriedade 'max_tokens' não está indentada corretamente. Deve estar alinhada com as outras propriedades.
default: "gpt-3.5-turbo" | ||
max_tokens: | ||
description: "OpenAI API max tokens." | ||
default: "900" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A propriedade 'default' não está indentada corretamente. Deve estar alinhada com as outras propriedades.
28f6c09
to
f7e89f5
Compare
|
||
- name: Code Review the pull request | ||
uses: ./code-review | ||
with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adicionar um espaço em branco antes do sinal de igual.
max_tokens: 900 | ||
exclude: "**/*.json, **/*.md, **/*.g.dart" | ||
append_prompt: | | ||
- Give a minimum of 0 suggestions and a maximum of 5 suggestions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remover o espaço em branco antes do sinal de adição.
exclude: "**/*.json, **/*.md, **/*.g.dart" | ||
append_prompt: | | ||
- Give a minimum of 0 suggestions and a maximum of 5 suggestions. | ||
- Translate the comment in all "reviewComment" properties to portuguese (pt-br). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adicionar uma nova linha no final do arquivo.
exclude: "**/*.json, **/*.md, **/*.g.dart" | ||
append_prompt: | | ||
- Give a minimum of 0 suggestions and a maximum of 5 suggestions. | ||
- Translate the comment in all "reviewComment" properties to portuguese (pt-br). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remover a linha vazia no final do arquivo.
token: ${{ secrets.GITHUB_TOKEN }} | ||
openai_key: ${{ secrets.OPENAI_KEY }} | ||
max_tokens: 900 | ||
exclude: "**/*.json, **/*.md, **/*.g.dart" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adicionar um espaço em branco antes do sinal de adição.
|
||
async function getAIResponse(messages) { | ||
|
||
logger.log(`Max tokens: ${maxTokens}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adicione um espaço antes do parêntese de abertura.
|
||
try { | ||
const chatCompletionParams = new ChatCompletionParams({ | ||
messages: messages, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remova o espaço antes do sinal de igual.
messages: messages, | ||
model: OPENAI_API_MODEL, | ||
temperature: 0, | ||
max_tokens: parseInt(maxTokens), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adicione um espaço antes do sinal de igual.
description: "OpenAI API model." | ||
required: false | ||
default: "gpt-3.5-turbo" | ||
max_tokens: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A propriedade 'max_tokens' não está indentada corretamente. Deve estar alinhada com as outras propriedades.
default: "gpt-3.5-turbo" | ||
max_tokens: | ||
description: "OpenAI API max tokens." | ||
default: "900" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A propriedade 'default' não está indentada corretamente. Deve estar alinhada com as outras propriedades.
No description provided.