-
Notifications
You must be signed in to change notification settings - Fork 3k
Add claude GitHub actions 1769016624918 #1922
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@claude does this look good |
| @@ -0,0 +1,43 @@ | |||
| name: Claude Code Review | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Post the source of this file in the header, please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
| # Optional: Only run on specific file changes | ||
| # paths: | ||
| # - "src/**/*.ts" | ||
| # - "src/**/*.tsx" | ||
| # - "src/**/*.js" | ||
| # - "src/**/*.jsx" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drop comments that came with the template, please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| - name: Run Claude Code | ||
| id: claude | ||
| uses: anthropics/claude-code-action@v1 | ||
| with: | ||
| anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} | ||
|
|
||
| # This is an optional setting that allows Claude to read CI results on PRs | ||
| additional_permissions: | | ||
| actions: read |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is Claude able to change branch here, tho?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No — actions: read has nothing to do with branches. It only enables reading CI/workflow results (run statuses, job details, logs). The additional_permissions input spins up a GitHub CI MCP server that gives Claude three read-only tools: get_ci_status, get_workflow_run_details, and download_job_log. Branch operations would require contents: write, which we don't grant.
Also addressed the other two comments (added source headers, removed template boilerplate).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
woops claude posted this without me seeing it
Motivation and Context
Adds GitHub Actions workflows to enable Claude Code integration on the repository.
Workflows
claude.yml— Interactive assistantTriggered by
@claudementions in issue comments, PR comments, and PR reviews. Uses the Claude Code GitHub App for authentication, which provides its own write-capable token. Commit signing is enabled via GitHub API (use_commit_signing: true). Also hasactions: readto let Claude read CI results.Usage on PRs (upstream branches):
@claude fix thisor@claude do Xon a PRUsage on issues:
@claude please fixon an issueclaude/prefixed branch, commits changes, and posts a link to create a PR (human-in-the-loop for PR creation)claude-code-review.yml— Automated code reviewRuns automatically on PR open/sync. Read-only permissions. Uses the code-review plugin.
Limitations
use_commit_signinguses the GitHub API for commits, so Claude cannot perform complex git operations (rebase, cherry-pick, conflict resolution). For full git CLI support, anssh_signing_keywould need to be configured instead.contributor:feature/branch). The GitHub App token is scoped to this repo only. On fork PRs, Claude would create a new branch on the upstream repo instead.Prerequisites
ANTHROPIC_API_KEYmust be configured as a repo secretTypes of changes
Checklist
AI Disclaimer