Skip to content

Add Claude Code GitHub Workflow#650

Open
rosinghal wants to merge 3 commits intomainfrom
add-claude-github-actions-1774255309215
Open

Add Claude Code GitHub Workflow#650
rosinghal wants to merge 3 commits intomainfrom
add-claude-github-actions-1774255309215

Conversation

@rosinghal
Copy link
Copy Markdown
Member

@rosinghal rosinghal commented Mar 23, 2026

🤖 Installing Claude Code GitHub App

This PR adds a GitHub Actions workflow that enables Claude Code integration in our repository.

What is Claude Code?

Claude Code is an AI coding agent that can help with:

  • Bug fixes and improvements
  • Documentation updates
  • Implementing new features
  • Code reviews and suggestions
  • Writing tests
  • And more!

How it works

Once this PR is merged, we'll be able to interact with Claude by mentioning @claude in a pull request or issue comment.
Once the workflow is triggered, Claude will analyze the comment and surrounding context, and execute on the request in a GitHub action.

Important Notes

  • This workflow won't take effect until this PR is merged
  • @claude mentions won't work until after the merge is complete
  • The workflow runs automatically whenever Claude is mentioned in PR or issue comments
  • Claude gets access to the entire PR or issue context including files, diffs, and previous comments

Security

  • Our Anthropic API key is securely stored as a GitHub Actions secret
  • Only users with write access to the repository can trigger the workflow
  • All Claude runs are stored in the GitHub Actions run history
  • Claude's default tools are limited to reading/writing files and interacting with our repo by creating comments, branches, and commits.
  • We can add more allowed tools by adding them to the workflow file like:
allowed_tools: Bash(npm install),Bash(npm run build),Bash(npm run lint),Bash(npm run test)

There's more information in the Claude Code action repo.

After merging this PR, let's try mentioning @claude in a comment on any PR to get started!

Summary by CodeRabbit

  • Chores
    • Added automated AI-powered code review workflows to run on pull request events for continuous review.
    • Enabled on-demand AI review via triggerable comments/mentions and expanded permission support for retrieving CI results.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 23, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a27449af-b29c-4c03-b884-65d0ebbe64f9

📥 Commits

Reviewing files that changed from the base of the PR and between 58836d4 and 23d768a.

📒 Files selected for processing (2)
  • .github/workflows/claude-code-review.yml
  • .github/workflows/claude.yml
✅ Files skipped from review due to trivial changes (1)
  • .github/workflows/claude-code-review.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/claude.yml

📝 Walkthrough

Walkthrough

Two new GitHub Actions workflows were added: claude-code-review.yml triggers automated code reviews on pull request lifecycle events; claude.yml enables interactive Claude responses when comments, review comments, issues, or PR reviews contain @claude triggers.

Changes

Cohort / File(s) Summary
Claude code-review workflow
.github/workflows/claude-code-review.yml
New workflow triggered on PR events (opened, synchronize, ready_for_review, reopened). Runs anthropics/claude-code-action@v1 for a "code-review" using secrets.CLAUDE_CODE_OAUTH_TOKEN; checks out repo with actions/checkout@v4. Permissions: read for contents, pull-requests, issues; id-token: write.
Claude interactive workflow
.github/workflows/claude.yml
New workflow triggered on comment/review/issue/PR-review events; runs only when content includes @claude. Checks out repo, calls anthropics/claude-code-action@v1 with CLAUDE_CODE_OAUTH_TOKEN. Permissions include repo read, id-token: write, and actions: read via additional_permissions.

Sequence Diagram(s)

sequenceDiagram
  participant GitHub as GitHub (Events)
  participant Runner as Actions Runner
  participant Checkout as actions/checkout@v4
  participant Claude as Claude Code Action
  GitHub->>Runner: trigger workflow (PR/comment/issue)
  Runner->>Checkout: checkout repo (fetch-depth: 1)
  Runner->>Claude: invoke anthropics/claude-code-action@v1\n(pass CLAUDE_CODE_OAUTH_TOKEN, prompt)
  Claude->>Runner: review/response output
  Runner->>GitHub: post review or comment
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • enginnk
  • Akhill2020

Poem

🐇 I hopped through YAML, a bounce and a twitch,
Claude now reads PRs while I nibble a stitch.
Comments with @claude wake a clever reply,
I thump in delight as approvals drift by. ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Add Claude Code GitHub Workflow' directly and clearly describes the main change: adding GitHub Actions workflows to integrate Claude Code, which matches the actual changeset of two new workflow files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-claude-github-actions-1774255309215

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@rosinghal rosinghal requested a review from enginnk March 23, 2026 08:45
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (5)
.github/workflows/claude-code-review.yml (3)

31-32: Shallow checkout may limit code review context.

For comprehensive code reviews, Claude may benefit from access to more git history to understand code evolution, identify patterns, and provide better context-aware suggestions. Consider increasing fetch-depth or removing the limit if the repository size allows.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/claude-code-review.yml around lines 31 - 32, The workflow
currently sets a shallow git checkout with the fetch-depth key; update the
actions/checkout step to fetch full history (set fetch-depth: 0) or remove the
fetch-depth line entirely so the runner gets full repository history, enabling
better context-aware reviews and history inspection by tools like Claude.

3-12: Consider enabling path filters to optimize workflow runs.

The workflow currently triggers on all pull request changes regardless of file type. For repositories with frequent non-code changes (documentation, configuration, assets), consider uncommenting and customizing the path filters to limit reviews to relevant code files. This reduces unnecessary API usage and improves workflow efficiency.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/claude-code-review.yml around lines 3 - 12, The workflow
triggers on all PRs; add path filters under the existing pull_request block by
uncommenting and customizing the paths array (the pull_request -> paths entry)
to include only relevant code patterns (e.g., "src/**/*.ts", "src/**/*.tsx",
"src/**/*.js", "src/**/*.jsx") so workflow runs are limited to code changes;
retain the existing types array (opened, synchronize, ready_for_review,
reopened) and ensure the paths are added as a sibling to types under the
pull_request key to optimize CI usage.

4-5: Consider resource implications of automatic reviews on all PR updates.

This workflow runs automatically on every PR synchronization (new commits), which could generate significant API usage and costs for active repositories. Consider:

  1. Adding a label-based trigger (e.g., only review PRs with a specific label)
  2. Limiting to specific PR authors or conditions (examples are commented on lines 15-19)
  3. Coordinating with claude.yml to avoid redundant reviews when users explicitly request @claude reviews
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/claude-code-review.yml around lines 4 - 5, The workflow
currently triggers on pull_request types: [opened, synchronize,
ready_for_review, reopened], which causes automatic reviews on every commit;
change the trigger to be label-driven or conditional: remove or restrict the
synchronize type and add either a label-based gate (require a label like
"claude-review" on the PR) or an explicit condition using
github.event.pull_request.labels (e.g., only run when that label exists) and/or
restrict by PR author or other metadata, and also add a guard that checks
claude.yml or an explicit mention (e.g., presence of "@claude") to avoid
redundant runs when users request reviews manually; update the trigger block
(pull_request/types) and add an if: conditional at the job level to implement
this behavior.
.github/workflows/claude.yml (2)

40-41: Remove redundant additional_permissions configuration.

The actions: read permission is already granted at the job level (line 26). This additional_permissions block appears redundant. If the intent is to demonstrate the feature, consider adding a comment explaining why it's duplicated; otherwise, remove it for clarity.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/claude.yml around lines 40 - 41, The
additional_permissions block duplicates the job-level permission and should be
removed for clarity: delete the `additional_permissions: |` block that contains
`actions: read` (or alternatively replace it with a clarifying comment if the
duplication is intentional). Locate the `additional_permissions` entry in the
workflow file (the block containing `actions: read`) and either remove that
block entirely or add an explicit comment above it explaining why it
intentionally duplicates the job-level permission.

31-31: Consider implications of shallow checkout.

The workflow uses fetch-depth: 1, which performs a shallow clone. While this improves performance, it limits Claude's access to the full git history. Depending on the tasks Claude performs, deeper history might be needed for context (e.g., understanding code evolution, blame analysis).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/claude.yml at line 31, The CI uses a shallow checkout via
the checkout action's fetch-depth: 1 which prevents access to full git history
and can break tasks needing history/blame; update the workflow to use a full
fetch by setting fetch-depth: 0 (or remove the fetch-depth key) for the checkout
step, or make it conditional/configurable so steps that require full history can
opt in; look for the checkout action entry and the literal "fetch-depth: 1" to
change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/claude-code-review.yml:
- Around line 22-26: The workflow's permissions block is missing the actions:
read permission needed for CI result access; update the permissions map (the
permissions: block containing contents, pull-requests, issues, id-token) to
include actions: read alongside the existing keys so the workflow can read PR CI
results.
- Around line 22-26: Update the GitHub Actions permissions block to grant write
access for pull request operations by changing the "pull-requests" entry from
"read" to "write" (i.e., replace pull-requests: read with pull-requests: write)
so the action can post review comments and annotations; ensure the permissions
block still includes contents: read, issues: read, and id-token: write.
- Line 41: Update the workflow prompt string to use the correct code-review
command `/code-review` with the `--comment` flag instead of the invalid
`/code-review:code-review`; locate the prompt key in the workflow (the line
currently containing prompt: '/code-review:code-review ${{ github.repository
}}/pull/${{ github.event.pull_request.number }}') and replace it with a proper
form such as `'/code-review --comment ${{ github.repository }}/pull/${{
github.event.pull_request.number }}'` or the simplified `'/code-review
--comment'` so the action invokes the code-review plugin correctly.

In @.github/workflows/claude.yml:
- Around line 21-26: The workflow's permissions block currently sets contents,
pull-requests, and issues to read which prevents the Claude action from
responding to `@claude` mentions; update the permissions map in the permissions
section by changing contents, pull-requests, and issues from read to write (keep
id-token: write and actions: read) so the action can create/update comments and
files — i.e., modify the permissions entries named contents, pull-requests, and
issues accordingly.

---

Nitpick comments:
In @.github/workflows/claude-code-review.yml:
- Around line 31-32: The workflow currently sets a shallow git checkout with the
fetch-depth key; update the actions/checkout step to fetch full history (set
fetch-depth: 0) or remove the fetch-depth line entirely so the runner gets full
repository history, enabling better context-aware reviews and history inspection
by tools like Claude.
- Around line 3-12: The workflow triggers on all PRs; add path filters under the
existing pull_request block by uncommenting and customizing the paths array (the
pull_request -> paths entry) to include only relevant code patterns (e.g.,
"src/**/*.ts", "src/**/*.tsx", "src/**/*.js", "src/**/*.jsx") so workflow runs
are limited to code changes; retain the existing types array (opened,
synchronize, ready_for_review, reopened) and ensure the paths are added as a
sibling to types under the pull_request key to optimize CI usage.
- Around line 4-5: The workflow currently triggers on pull_request types:
[opened, synchronize, ready_for_review, reopened], which causes automatic
reviews on every commit; change the trigger to be label-driven or conditional:
remove or restrict the synchronize type and add either a label-based gate
(require a label like "claude-review" on the PR) or an explicit condition using
github.event.pull_request.labels (e.g., only run when that label exists) and/or
restrict by PR author or other metadata, and also add a guard that checks
claude.yml or an explicit mention (e.g., presence of "@claude") to avoid
redundant runs when users request reviews manually; update the trigger block
(pull_request/types) and add an if: conditional at the job level to implement
this behavior.

In @.github/workflows/claude.yml:
- Around line 40-41: The additional_permissions block duplicates the job-level
permission and should be removed for clarity: delete the
`additional_permissions: |` block that contains `actions: read` (or
alternatively replace it with a clarifying comment if the duplication is
intentional). Locate the `additional_permissions` entry in the workflow file
(the block containing `actions: read`) and either remove that block entirely or
add an explicit comment above it explaining why it intentionally duplicates the
job-level permission.
- Line 31: The CI uses a shallow checkout via the checkout action's fetch-depth:
1 which prevents access to full git history and can break tasks needing
history/blame; update the workflow to use a full fetch by setting fetch-depth: 0
(or remove the fetch-depth key) for the checkout step, or make it
conditional/configurable so steps that require full history can opt in; look for
the checkout action entry and the literal "fetch-depth: 1" to change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c69fc66a-cc9c-493b-89d5-0f5232d867a6

📥 Commits

Reviewing files that changed from the base of the PR and between ff7a05b and 58836d4.

📒 Files selected for processing (2)
  • .github/workflows/claude-code-review.yml
  • .github/workflows/claude.yml

Comment on lines +22 to +26
permissions:
contents: read
pull-requests: read
issues: read
id-token: write
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Add missing actions: read permission for CI result access.

The claude.yml workflow grants actions: read permission to allow Claude to access CI results on PRs (line 26 in that file). This workflow should include the same permission since it also performs PR analysis and would benefit from CI context.

📝 Proposed fix
     permissions:
       contents: read
       pull-requests: read
       issues: read
       id-token: write
+      actions: read
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
permissions:
contents: read
pull-requests: read
issues: read
id-token: write
permissions:
contents: read
pull-requests: read
issues: read
id-token: write
actions: read
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/claude-code-review.yml around lines 22 - 26, The
workflow's permissions block is missing the actions: read permission needed for
CI result access; update the permissions map (the permissions: block containing
contents, pull-requests, issues, id-token) to include actions: read alongside
the existing keys so the workflow can read PR CI results.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check if the claude-code-action code-review plugin requires write permissions

# Check the action's documentation for permission requirements
gh api repos/anthropics/claude-code-action/readme --jq '.content' | base64 -d | rg -i -C5 'code-review.*permission'

# Also check the plugin repository for permission requirements
gh api repos/anthropics/claude-code/readme --jq '.content' | base64 -d | rg -i -C5 'permission'

Repository: Xtendify/Simple-Calendar

Length of output: 173


🏁 Script executed:

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

Repository: Xtendify/Simple-Calendar

Length of output: 1800


🌐 Web query:

anthropics claude-code-action permissions requirements pull-requests write

💡 Result:

Anthropic's claude-code-action is a GitHub Action that integrates Claude Code into GitHub workflows for PRs and issues, enabling code analysis, changes, and PR creation via @claude mentions or prompts. Permissions requirements: - GitHub App (official Claude app at https://github.com/apps/claude): Requests read & write access to Contents (modify files), Issues (respond), Pull Requests (create/update PRs). [3,6,11,12,15,16] - Workflow YAML permissions: Minimum contents: read/write (for read-only reviews, contents: read and pull-requests: write suffice), pull-requests: write, issues: write. Explicitly set to prevent privilege escalation. [6,8,9,12] - Secrets: ANTHROPIC_API_KEY (or CLAUDE_CODE_OAUTH_TOKEN) stored in repo secrets. Never hardcode. [2,3,6] - Claude Code tool permissions: Configurable via claude_args like --allowedTools for Read/Edit/Bash in headless mode; uses bypassPermissions or similar for automation. Review outputs for security. [1,2,4,55,56] For write operations like creating PRs/commits: Requires contents: write in workflow and GitHub App. Use branch protection requiring human approval. allowed_non_write_users is risky for non-write users. [2,12,56] Security: Workflow permissions lock GITHUB_TOKEN scope; fork PRs get read-only/no secrets. Prompt injection risks from untrusted comments sanitized but review raw input. [12,56]

Citations:


Change pull-requests permission from read to write.

The code review action requires write permissions to post review comments and annotations on pull requests. The current pull-requests: read permission is insufficient; it must be changed to pull-requests: write.

Corrected permissions block
    permissions:
      contents: read
      pull-requests: write
      issues: read
      id-token: write
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/claude-code-review.yml around lines 22 - 26, Update the
GitHub Actions permissions block to grant write access for pull request
operations by changing the "pull-requests" entry from "read" to "write" (i.e.,
replace pull-requests: read with pull-requests: write) so the action can post
review comments and annotations; ensure the permissions block still includes
contents: read, issues: read, and id-token: write.

claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
plugins: 'code-review@claude-code-plugins'
prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}'
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

What is the correct prompt syntax for the code-review plugin in anthropics/claude-code-action?

💡 Result:

The code-review plugin for anthropics/claude-code-action is a Claude Code slash command plugin that provides automated PR code review using multiple specialized agents. To use it in claude-code-action GitHub workflows, specify the plugin via the plugins input or invoke it directly in the prompt: - uses: anthropics/claude-code-action@v1 with: plugins: "code-review@claude-code-plugins" prompt: "/code-review --comment" Alternatively, use a custom prompt that calls the command: prompt: | REPO: ${{ github.repository }} PR NUMBER: ${{ github.event.pull_request.number }} /code-review --comment The core prompt syntax is defined in the plugin's command file at https://github.com/anthropics/claude-code/blob/main/plugins/code-review/commands/code-review.md. It starts with a YAML frontmatter block: --- allowed-tools: Bash(gh pr view:), Bash(gh pr diff:), mcpgithub_inline_commentcreate_inline_comment description: Code review a pull request --- Followed by detailed Markdown instructions for multi-agent review workflow (check PR status, gather CLAUDE.md files, summarize changes, parallel audits for compliance/bugs/history, confidence scoring >=80, output summary or post comments with precise GitHub links using full SHA). For GitHub Actions integration, the PR #14130 updates this prompt specifically for better performance in claude-code-action (reduced agents, inline comments via MCP, duplicate prevention). Installation in Claude Code: npx claude-plugins install @anthropics/claude-code-plugins/code-review or claude plugins add code-review@claude-plugins-official. Usage: /code-review [--comment] on a PR branch.

Citations:


Update prompt syntax to use the correct code-review command format.

The prompt uses /code-review:code-review syntax, which is incorrect. According to the official code-review plugin documentation, the correct syntax is /code-review with an optional --comment flag. Update to:

prompt: '/code-review --comment ${{ github.repository }}/pull/${{ github.event.pull_request.number }}'

or simplify to:

prompt: '/code-review --comment'
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/claude-code-review.yml at line 41, Update the workflow
prompt string to use the correct code-review command `/code-review` with the
`--comment` flag instead of the invalid `/code-review:code-review`; locate the
prompt key in the workflow (the line currently containing prompt:
'/code-review:code-review ${{ github.repository }}/pull/${{
github.event.pull_request.number }}') and replace it with a proper form such as
`'/code-review --comment ${{ github.repository }}/pull/${{
github.event.pull_request.number }}'` or the simplified `'/code-review
--comment'` so the action invokes the code-review plugin correctly.

Comment on lines +21 to +26
permissions:
contents: read
pull-requests: read
issues: read
id-token: write
actions: read # Required for Claude to read CI results on PRs
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check the claude-code-action documentation for required permissions

# Search for permission requirements in the action's README
gh api repos/anthropics/claude-code-action/readme --jq '.content' | base64 -d | rg -i -C5 'permission'

Repository: Xtendify/Simple-Calendar

Length of output: 120


🏁 Script executed:

cat -n .github/workflows/claude.yml

Repository: Xtendify/Simple-Calendar

Length of output: 2295


🏁 Script executed:

# Search for any local documentation about claude permissions
fd -type f -name "*.md" | xargs rg -i "claude.*permission|permission.*claude" -B2 -A2

# Also check for any comments or documentation about the action
rg "claude-code-action" --type md

Repository: Xtendify/Simple-Calendar

Length of output: 238


🏁 Script executed:

# Search for any local documentation about claude permissions
fd . -type f -name "*.md" | xargs rg -i "claude.*permission|permission.*claude" -B2 -A2

# Also search for any README or docs mentioning claude-code-action
rg "claude-code-action" -t md

Repository: Xtendify/Simple-Calendar

Length of output: 238


🏁 Script executed:

# Search for README or docs files that mention claude
find . -name "*.md" -type f | head -20

# Search for claude in documentation
rg "claude" --glob="*.md" -B2 -A2

Repository: Xtendify/Simple-Calendar

Length of output: 109


🏁 Script executed:

cat -n ./CLAUDE.md

Repository: Xtendify/Simple-Calendar

Length of output: 2875


🌐 Web query:

anthropics claude-code-action permissions required github actions

💡 Result:

The Anthropic Claude Code Action (anthropics/claude-code-action) requires specific permissions in GitHub workflows and optionally a GitHub App installation to enable Claude to interact with repositories (e.g., reading/writing files, issues, PRs). Workflow Permissions (in .github/workflows YAML): - contents: write (to read/modify repository files) - pull-requests: write (to create/update PRs) - issues: write (to respond to issues) - Optionally: id-token: write (for OIDC with cloud providers like Bedrock/Vertex), actions: read (for viewing workflow results) Example from official docs: permissions: contents: write pull-requests: write issues: write id-token: write GitHub App Permissions (https://github.com/apps/claude): - Contents: Read & write - Issues: Read & write - Pull requests: Read & write Additional action inputs: - additional_permissions: e.g., "actions: read" - allowed_bots: restrict bot triggers (default: none) - allowed_non_write_users: risky, allows non-write users (use cautiously) Security best practices: - Use least-privilege permissions in workflows. - Store ANTHROPIC_API_KEY as repo secret. - Review Claude's changes before merging. - For public repos, restrict to trusted triggers. These enable Claude to respond to @claude mentions, implement fixes, create PRs, etc.

Citations:


Missing write permissions — Claude cannot respond to @claude mentions.

The action requires write permissions to respond to comments and create/update files. Update to:

    permissions:
      contents: write
      pull-requests: write
      issues: write
      id-token: write
      actions: read

Per official Anthropic documentation, contents: write, pull-requests: write, and issues: write are mandatory for the action to function.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/claude.yml around lines 21 - 26, The workflow's
permissions block currently sets contents, pull-requests, and issues to read
which prevents the Claude action from responding to `@claude` mentions; update the
permissions map in the permissions section by changing contents, pull-requests,
and issues from read to write (keep id-token: write and actions: read) so the
action can create/update comments and files — i.e., modify the permissions
entries named contents, pull-requests, and issues accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant