mirror of
https://github.com/freeedcom/ai-codereviewer.git
synced 2024-11-23 12:39:02 +00:00
Merge pull request #1 from freeedcom/remove-open-ai-from-the-action-name
remove openai from the action name
This commit is contained in:
commit
036cdd7961
4
.github/workflows/code_review.yml
vendored
4
.github/workflows/code_review.yml
vendored
@ -12,8 +12,8 @@ jobs:
|
|||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Code Review
|
- name: Code Review
|
||||||
uses: freeedcom/open-ai-codereviewer@main
|
uses: freeedcom/ai-codereviewer@main
|
||||||
with:
|
with:
|
||||||
GITHUB_TOKEN: ${{ secrets.GH_KEY }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||||
exclude: "yarn.lock,dist/**"
|
exclude: "yarn.lock,dist/**"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
name: "OpenAI Code Review Action"
|
name: "AI Code Review Action"
|
||||||
description: "Perform code reviews and comment on diffs using OpenAI API."
|
description: "Perform code reviews and comment on diffs using OpenAI API."
|
||||||
inputs:
|
inputs:
|
||||||
GITHUB_TOKEN:
|
GITHUB_TOKEN:
|
||||||
|
2
dist/index.js
vendored
2
dist/index.js
vendored
@ -97,7 +97,7 @@ function analyzeCode(parsedDiff) {
|
|||||||
}
|
}
|
||||||
function createPrompt(file, chunk) {
|
function createPrompt(file, chunk) {
|
||||||
return `
|
return `
|
||||||
Review the following code changes in the file "${file.to}" and provide comments and suggestions ONLY if there is something to improve. If the code looks good, DO NOT return any text (leave the response completely empty)
|
Review the following code changes in the file "${file.to}" and provide comments and suggestions ONLY if there is something to improve, write the answer in Github markdown. If the code looks good, DO NOT return any text (leave the response completely empty)
|
||||||
|
|
||||||
${chunk.content}
|
${chunk.content}
|
||||||
${chunk.changes
|
${chunk.changes
|
||||||
|
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
@ -72,7 +72,7 @@ function createPrompt(file: File, chunk: Chunk): string {
|
|||||||
return `
|
return `
|
||||||
Review the following code changes in the file "${
|
Review the following code changes in the file "${
|
||||||
file.to
|
file.to
|
||||||
}" and provide comments and suggestions ONLY if there is something to improve. If the code looks good, DO NOT return any text (leave the response completely empty)
|
}" and provide comments and suggestions ONLY if there is something to improve, write the answer in Github markdown. If the code looks good, DO NOT return any text (leave the response completely empty)
|
||||||
|
|
||||||
${chunk.content}
|
${chunk.content}
|
||||||
${chunk.changes
|
${chunk.changes
|
||||||
|
Loading…
Reference in New Issue
Block a user