Skip to content

Commit 631ac3c

Browse files
justin808claude
andauthored
Add checks/statuses read permissions to Claude workflow (#2487)
## Summary - Adds `checks: read` and `statuses: read` to both job-level permissions and `additional_permissions`, so Claude can fully read CI check results on PRs - Adds explicit `github_token` pass-through - Aligns with the default claude-code-action install (as seen in shakacode/backstopjs) - Removes unused boilerplate comments ## Test plan - [ ] Verify Claude can still respond to `@claude` mentions in issues/PRs - [ ] Verify Claude can read CI check status on PRs 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated CI/CD workflow configuration to enhance automation and access permissions for improved pipeline reliability. <!-- end of auto-generated comment: release notes by coderabbit.ai --> <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Workflow-only permission tweaks that add read access to checks/statuses and a token pass-through; no application code changes. > > **Overview** > Updates the `Claude Code` GitHub Actions workflow to grant additional read-only access to CI metadata by adding `checks: read` and `statuses: read` at both the job `permissions` level and in `additional_permissions` passed to `claude-code-action`. > > Also explicitly passes `github_token` into the action and removes unused commented boilerplate from the workflow configuration. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit d1e568c. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 434d168 commit 631ac3c

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

.github/workflows/claude.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ jobs:
2424
issues: read
2525
id-token: write
2626
actions: read # Required for Claude to read CI results on PRs
27+
checks: read
28+
statuses: read
2729
steps:
2830
- name: Checkout repository
2931
uses: actions/checkout@v4
@@ -34,17 +36,11 @@ jobs:
3436
id: claude
3537
uses: anthropics/claude-code-action@v1
3638
with:
39+
github_token: ${{ github.token }}
3740
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
3841

3942
# This is an optional setting that allows Claude to read CI results on PRs
4043
additional_permissions: |
4144
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-
45+
checks: read
46+
statuses: read

0 commit comments

Comments
 (0)