mirror of
https://github.com/freeedcom/ai-codereviewer.git
synced 2025-04-19 17:16:48 +00:00
Merge 94678dafe1
into a9a064dfa1
This commit is contained in:
commit
452f47bee3
4 changed files with 12 additions and 25 deletions
4
.github/workflows/code_review.yml
vendored
4
.github/workflows/code_review.yml
vendored
|
@ -12,9 +12,9 @@ jobs:
|
|||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Code Review
|
||||
uses: freeedcom/ai-codereviewer@main
|
||||
uses: freeedcom/ai-codereviewer@maino1
|
||||
with:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||
OPENAI_API_MODEL: "gpt-4-1106-preview"
|
||||
OPENAI_API_MODEL: "gpt-4o-mini"
|
||||
exclude: "yarn.lock,dist/**"
|
||||
|
|
23
action.yml
23
action.yml
|
@ -1,23 +0,0 @@
|
|||
name: "AI Code Review Action"
|
||||
description: "Perform code reviews and comment on diffs using OpenAI API."
|
||||
inputs:
|
||||
GITHUB_TOKEN:
|
||||
description: "GitHub token to interact with the repository."
|
||||
required: true
|
||||
OPENAI_API_KEY:
|
||||
description: "OpenAI API key for GPT."
|
||||
required: true
|
||||
OPENAI_API_MODEL:
|
||||
description: "OpenAI API model."
|
||||
required: false
|
||||
default: "gpt-4"
|
||||
exclude:
|
||||
description: "Glob patterns to exclude files from the diff analysis"
|
||||
required: false
|
||||
default: ""
|
||||
runs:
|
||||
using: "node16"
|
||||
main: "dist/index.js"
|
||||
branding:
|
||||
icon: "aperture"
|
||||
color: "green"
|
1
info.txt
Normal file
1
info.txt
Normal file
|
@ -0,0 +1 @@
|
|||
123
|
9
test.py
Normal file
9
test.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
# 讀取文件
|
||||
with open('input.txt', 'r') as file:
|
||||
content = file.read()
|
||||
print("文件內容:", content)
|
||||
|
||||
# 寫入文件
|
||||
with open('output.txt', 'w') as file:
|
||||
file.write("這是寫入的新內容。")
|
||||
print("內容已寫入output.txt")s
|
Loading…
Add table
Add a link
Reference in a new issue