Skip to content

Commit ccae0cd

Browse files
committed
Create zai-code-bot.yml
1 parent b797332 commit ccae0cd

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

.github/workflows/zai-code-bot.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Z.ai Code Bot
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
- reopened
9+
- ready_for_review
10+
branches:
11+
- main
12+
- prod
13+
issue_comment:
14+
types:
15+
- created
16+
pull_request_review_comment:
17+
types:
18+
- created
19+
20+
permissions:
21+
contents: read
22+
pull-requests: write
23+
issues: write
24+
25+
concurrency:
26+
group: zai-bot-${{ github.event.pull_request.number }}
27+
cancel-in-progress: true
28+
29+
jobs:
30+
zai-bot:
31+
if: |
32+
(github.event_name == 'pull_request' && github.event.pull_request.draft == false) ||
33+
(github.event_name == 'issue_comment' && github.event.issue.pull_request) ||
34+
(github.event_name == 'pull_request_review_comment' && github.event.pull_request.draft == false)
35+
runs-on: ubuntu-latest
36+
steps:
37+
- name: Checkout repository
38+
uses: actions/checkout@v6
39+
40+
- name: Run Z.ai Bot
41+
uses: AndreiDrang/zai-code-bot@main
42+
with:
43+
ZAI_API_KEY: ${{ secrets.ZAI_API_KEY }}
44+
ZAI_MODEL: ${{ vars.ZAI_MODEL || 'glm-5' }}
45+
GITHUB_TOKEN: ${{ github.token }}

0 commit comments

Comments
 (0)