Skip to content

Commit 2433d4b

Browse files
build: add codereview action.
1 parent c0dd4e8 commit 2433d4b

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/llm-code-review.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: LLM Code Review
2+
3+
permissions:
4+
contents: read
5+
pull-requests: write
6+
7+
on:
8+
pull_request:
9+
types: [opened, reopened, synchronize]
10+
11+
jobs:
12+
llm-code-review:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: fit2cloud/LLM-CodeReview-Action@main
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
OPENAI_API_KEY: ${{ secrets.ALIYUN_LLM_API_KEY }}
19+
LANGUAGE: Chinese
20+
OPENAI_API_ENDPOINT: https://dashscope.aliyuncs.com/compatible-mode/v1
21+
MODEL: qwen2-1.5b-instruct
22+
PROMPT: "请检查下面的代码差异是否有不规范、潜在的问题或者优化建议"
23+
top_p: 1
24+
temperature: 1
25+
# max_tokens: 10000
26+
MAX_PATCH_LENGTH: 10000
27+
IGNORE_PATTERNS: "/node_modules,*.md,/dist,/.github"
28+
FILE_PATTERNS: "*.java,*.go,*.py,*.vue,*.ts,*.js,*.css,*.scss,*.html"

0 commit comments

Comments
 (0)