forked from Ikalus1988/MisakaNet
-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (31 loc) 路 1.08 KB
/
Copy pathpr-agent-review.yml
File metadata and controls
34 lines (31 loc) 路 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: PR-Agent Code Review
on:
pull_request:
types: [opened, synchronize, reopened]
issue_comment:
types: [created]
permissions:
contents: read
pull-requests: write
issues: write
jobs:
pr-agent:
if: |
(github.event_name == 'pull_request' &&
!github.event.pull_request.draft &&
!contains(github.event.pull_request.labels.*.name, 'docs-only') &&
!startsWith(github.event.pull_request.title, 'chore(main): release')) ||
(github.event_name == 'issue_comment' &&
(contains(github.event.comment.body, '/review') ||
contains(github.event.comment.body, '/describe') ||
contains(github.event.comment.body, '/improve') ||
contains(github.event.comment.body, '/ask')))
runs-on: ubuntu-latest
steps:
- name: PR-Agent Review
uses: Codium-ai/pr-agent@v0.43.0 # upgrade to fix AttributeError bug
env:
OPENAI_KEY: ${{ secrets.OPENAI_KEY }}
OPENAI_API_BASE: "https://api.minimax.chat/v1"
OPENAI_MODEL: "openai/minimax-M3"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}