Skip to content

Commit 79eeba9

Browse files
committed
ci: add MiniMax M2.5 automated PR code review workflow
Add claude-code-action workflow with MiniMax M2.5 as the review model via Anthropic API compatibility layer. Includes auto-review on PR creation/update and interactive @claude mentions in comments.
1 parent 44fd666 commit 79eeba9

2 files changed

Lines changed: 65 additions & 0 deletions

File tree

.github/pull_request_template.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ Closes #
1616
- [ ] `pnpm build` passes
1717
- [ ] Documentation updated (if applicable)
1818
- [ ] Self-reviewed the code changes
19+
- [ ] AI code review passed (auto-triggered on PR)
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Claude Code Review
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize]
6+
branches: [main]
7+
issue_comment:
8+
types: [created]
9+
pull_request_review_comment:
10+
types: [created]
11+
12+
permissions:
13+
contents: read
14+
pull-requests: write
15+
issues: write
16+
17+
jobs:
18+
auto-review:
19+
if: github.event_name == 'pull_request'
20+
runs-on: ubuntu-latest
21+
timeout-minutes: 10
22+
concurrency:
23+
group: claude-review-${{ github.event.pull_request.number }}
24+
cancel-in-progress: true
25+
steps:
26+
- uses: actions/checkout@v4
27+
with:
28+
fetch-depth: 0
29+
30+
- uses: anthropics/claude-code-action@v1
31+
env:
32+
ANTHROPIC_BASE_URL: https://api.minimax.io/anthropic
33+
with:
34+
anthropic_api_key: ${{ secrets.MINIMAX_API_KEY }}
35+
prompt: |
36+
Review this pull request. Focus on:
37+
1. Code correctness and potential bugs
38+
2. TypeScript type safety
39+
3. React best practices and performance
40+
4. Security concerns
41+
5. Code style consistency
42+
43+
Be concise and actionable. Only comment on meaningful issues, not style nitpicks already covered by linters.
44+
claude_args: "--model MiniMax-M2.5 --max-turns 3"
45+
46+
interactive:
47+
if: |
48+
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
49+
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude'))
50+
runs-on: ubuntu-latest
51+
timeout-minutes: 15
52+
concurrency:
53+
group: claude-interactive-${{ github.event.issue.number || github.event.pull_request.number }}-${{ github.event.comment.id }}
54+
steps:
55+
- uses: actions/checkout@v4
56+
with:
57+
fetch-depth: 0
58+
59+
- uses: anthropics/claude-code-action@v1
60+
env:
61+
ANTHROPIC_BASE_URL: https://api.minimax.io/anthropic
62+
with:
63+
anthropic_api_key: ${{ secrets.MINIMAX_API_KEY }}
64+
claude_args: "--model MiniMax-M2.5 --max-turns 10"

0 commit comments

Comments
 (0)