Skip to content

Commit 7224d8d

Browse files
committed
Use z.ai for claude code actions
1 parent c161de1 commit 7224d8d

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,15 @@ jobs:
2929
- name: Run Claude Code Review
3030
id: claude-review
3131
uses: anthropics/claude-code-action@v1
32+
env:
33+
ANTHROPIC_BASE_URL: https://api.z.ai/api/anthropic
3234
with:
33-
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
35+
claude_code_oauth_token: ${{ secrets.Z_ANTHROPIC_AUTH_TOKEN }}
3436
plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
3537
plugins: 'code-review@claude-code-plugins'
3638
prompt: '/code-review:code-review --comment'
37-
claude_args: '--allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr view:*),Bash(gh pr diff:*),Bash(gh pr checkout:*),Bash(git log:*),Bash(bun run test:*),Bash(bun run lint:*),Bash(bun run build:*),Bash(bun test:*),Bash(npx tsc:*),Bash(bun run tsc:*),Bash(gh pr checks:*),Bash(npx biome check:*),Bash(git fetch:*),Bash(gh issue list:*),Bash(gh issue view:*)"'
39+
track_progress: true
40+
claude_args: '--allowedTools "Read,Write,Edit,Bash(git:*),mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr view:*),Bash(gh pr diff:*),Bash(gh pr checkout:*),Bash(git log:*),Bash(bun run test:*),Bash(bun run lint:*),Bash(bun run build:*),Bash(bun test:*),Bash(npx tsc:*),Bash(bun run tsc:*),Bash(gh pr checks:*),Bash(npx biome check:*),Bash(git fetch:*),Bash(gh issue list:*),Bash(gh issue view:*)"'
3841
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
3942
# or https://code.claude.com/docs/en/cli-reference for available options
4043

.github/workflows/claude.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
permissions:
2525
contents: read
2626
pull-requests: read
27-
issues: read
27+
issues: write
2828
id-token: write
2929
actions: read # Required for Claude to read CI results on PRs
3030
steps:
@@ -36,18 +36,20 @@ jobs:
3636
- name: Run Claude Code
3737
id: claude
3838
uses: anthropics/claude-code-action@v1
39+
env:
40+
ANTHROPIC_BASE_URL: https://api.z.ai/api/anthropic
3941
with:
40-
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
42+
claude_code_oauth_token: ${{ secrets.Z_ANTHROPIC_AUTH_TOKEN }}
4143

4244
# This is an optional setting that allows Claude to read CI results on PRs
4345
additional_permissions: |
4446
actions: read
45-
47+
track_progress: true
4648
# Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
4749
# prompt: 'Update the pull request description to include a summary of changes.'
4850

4951
# Optional: Add claude_args to customize behavior and configuration
5052
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
5153
# or https://code.claude.com/docs/en/cli-reference for available options
52-
# claude_args: '--allowed-tools Bash(gh pr:*)'
54+
claude_args: '--allowedTools "Read,Write,Edit,Bash(git:*),mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr view:*),Bash(gh pr diff:*),Bash(gh pr checkout:*),Bash(git log:*),Bash(bun run test:*),Bash(bun run lint:*),Bash(bun run build:*),Bash(bun test:*),Bash(npx tsc:*),Bash(bun run tsc:*),Bash(gh pr checks:*),Bash(npx biome check:*),Bash(git fetch:*),Bash(gh issue list:*),Bash(gh issue view:*)"'
5355

0 commit comments

Comments
 (0)