Skip to content

Commit 3d62252

Browse files
evansenterclaude
andauthored
ci: update Claude Code workflows to latest dotfiles version (#106)
- claude.yml: fix permissions (read→write) for PR/issue commenting - claude-code-review.yml: use gh api for proper APPROVE/REQUEST_CHANGES reviews, add Bash(gh pr review:*) to allowed tools Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 0730108 commit 3d62252

2 files changed

Lines changed: 5 additions & 16 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ jobs:
4747
REPO: ${{ github.repository }}
4848
PR_NUMBER: ${{ github.event.pull_request.number }}
4949
50-
${{ steps.prompt.outputs.use_file == 'true' && 'First, read the review instructions from /tmp/review-prompt.md using your Read tool. Then follow those instructions to review this PR.' || 'Review this PR for code quality, bugs, security issues, and adherence to project conventions (check CLAUDE.md). Check for previous "Feedback Addressed" comments to avoid re-raising resolved issues. Be strict: REQUEST_CHANGES for any issues found, only APPROVE if genuinely ready to merge. Post your review using gh pr comment. Start your comment with: > **Prompt:** Fallback (centralized prompt fetch failed)' }}
50+
${{ steps.prompt.outputs.use_file == 'true' && 'First, read the review instructions from /tmp/review-prompt.md using your Read tool. Then follow those instructions to review this PR.' || 'Review this PR for code quality, bugs, security issues, and adherence to project conventions (check CLAUDE.md). Check for previous "Feedback Addressed" comments to avoid re-raising resolved issues. Be strict: REQUEST_CHANGES for any issues found, only APPROVE if genuinely ready to merge. Submit your review using gh api repos/$REPO/pulls/$PR_NUMBER/reviews with inline comments on specific files/lines and event set to APPROVE or REQUEST_CHANGES. Start the review body with: > **Prompt:** Fallback (centralized prompt fetch failed)' }}
5151
5252
Use the REPO and PR_NUMBER variables provided above.
5353
# Tools required by the centralized prompt (see contrib/prompts/claude-review.md)
54-
claude_args: '--model opus --allowed-tools "Read,Bash(gh pr view:*),Bash(gh pr diff:*),Bash(gh pr comment:*),Bash(gh issue view:*),Bash(gh issue comment:*),Bash(gh api:*)"'
54+
claude_args: '--model opus --allowed-tools "Read,Bash(gh pr view:*),Bash(gh pr diff:*),Bash(gh pr comment:*),Bash(gh pr review:*),Bash(gh issue view:*),Bash(gh issue comment:*),Bash(gh api:*)"'

.github/workflows/claude.yml

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ jobs:
2020
runs-on: ubuntu-latest
2121
permissions:
2222
contents: read
23-
pull-requests: read
24-
issues: read
23+
pull-requests: write
24+
issues: write
2525
id-token: write
26-
actions: read # Required for Claude to read CI results on PRs
26+
actions: read
2727
steps:
2828
- name: Checkout repository
2929
uses: actions/checkout@v4
@@ -35,16 +35,5 @@ jobs:
3535
uses: anthropics/claude-code-action@v1
3636
with:
3737
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
38-
39-
# This is an optional setting that allows Claude to read CI results on PRs
4038
additional_permissions: |
4139
actions: read
42-
43-
# Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
44-
# prompt: 'Update the pull request description to include a summary of changes.'
45-
46-
# Optional: Add claude_args to customize behavior and configuration
47-
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
48-
# or https://code.claude.com/docs/en/cli-reference for available options
49-
# claude_args: '--allowed-tools Bash(gh pr:*)'
50-

0 commit comments

Comments
 (0)