ci(workflows): 更新Claude工作流配置

添加track_progress选项以跟踪代码审查进度
补充环境信息变量和注释说明
This commit is contained in:
icarus 2025-09-06 01:54:10 +08:00
parent 9003d35c5e
commit 29f6a1dc8b
2 changed files with 9 additions and 0 deletions

View File

@ -37,6 +37,8 @@ jobs:
uses: anthropics/claude-code-action@v1 uses: anthropics/claude-code-action@v1
with: with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
# https://github.com/anthropics/claude-code-action/blob/main/docs/solutions.md
track_progress: true
prompt: | prompt: |
Please review this pull request and provide feedback on: Please review this pull request and provide feedback on:
- Code quality and best practices - Code quality and best practices
@ -45,10 +47,16 @@ jobs:
- Security concerns - Security concerns
- Test coverage - Test coverage
Environment:
- Repo: ${{ github.event.repository }}
- PR number: ${{ github.event.pull_request.number }}
Use the repository's CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback. Use the repository's CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback.
Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR. Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR.
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
# or https://docs.anthropic.com/en/docs/claude-code/sdk#command-line for available options # or https://docs.anthropic.com/en/docs/claude-code/sdk#command-line for available options
# May allow inline comment mcp here?
claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"' claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"'

View File

@ -35,6 +35,7 @@ jobs:
issues: read issues: read
id-token: write id-token: write
actions: read # Required for Claude to read CI results on PRs actions: read # Required for Claude to read CI results on PRs
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4