Skip to content

Commit 8603e97

Browse files
committed
✨ feat(ci): 添加 ai 代码审查
1 parent b255b50 commit 8603e97

2 files changed

Lines changed: 31 additions & 25 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: AI Code Review
2+
3+
on:
4+
pull_request_target:
5+
types: [ opened, synchronize ]
6+
permissions:
7+
contents: read
8+
pull-requests: write
9+
jobs:
10+
review:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: AI Code Review
16+
uses: ok-oldking/ai-codereviewer@main
17+
with:
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
20+
# Choose your AI provider and key
21+
AI_PROVIDER: "google" # or "anthropic" or "google"
22+
AI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
23+
AI_MODEL: "gemini-2.5-flash"
24+
AI_TEMPERATURE: 0 # 0 to 1 - higher values = more creativity and variance
25+
26+
# Optional configurations
27+
APPROVE_REVIEWS: false
28+
MAX_COMMENTS: 10 # 0 to disable
29+
PROJECT_CONTEXT: "This is a windows python game automation project, for the game Wuthering Waves, it automates game task and combat etc."
30+
CONTEXT_FILES: "README.md"
31+
EXCLUDE_PATTERNS: "**/*.lock,**/*.json,**/*.md,**/*.ico,**/*.png"

.github/workflows/test-permission.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)