Skip to content

Conversation

@AnnatarHe
Copy link
Contributor

🤖 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!

@gemini-code-assist
Copy link

Note

Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.

@AnnatarHe AnnatarHe merged commit 98220e4 into main Jan 6, 2026
5 of 7 checks passed
@AnnatarHe AnnatarHe deleted the add-claude-github-actions-1767705501050 branch January 6, 2026 13:18
@claude
Copy link

claude bot commented Jan 6, 2026

Code Review: Claude Code GitHub Workflow Integration

Thank you for adding Claude Code integration! Here is my detailed review:

Strengths

  • Well-structured workflows following GitHub Actions best practices
  • Security-conscious with minimal permissions and secret management
  • Good documentation in PR description
  • Flexible configuration with helpful commented examples

Critical Issues

1. Permission Mismatch (Both Workflows)

Both workflows will fail because they lack write permissions to post comments:

  • claude-code-review.yml line 24 - Needs pull-requests: write
  • claude.yml lines 22-24 - Needs contents: write, pull-requests: write, issues: write

Currently set to read but Claude needs write to execute gh pr comment and make changes.

2. Inconsistent Tool Patterns

claude.yml line 49 shows example gh pr:* but claude-code-review.yml line 56 uses specific patterns. This inconsistency could confuse users.

Performance Concerns

Cost Management: claude-code-review.yml will run on EVERY PR update. Consider:

  • Enabling the commented author/path filters
  • Adding label-based triggers
  • Adding concurrency control to prevent duplicate reviews

Security

Good security posture overall:

  • Using OAuth token as secret
  • Limited tool access with wildcards
  • Minimal base permissions

Ensure CLAUDE_CODE_OAUTH_TOKEN secret is configured before merging.

Commit Convention

Commit messages could follow CLAUDE.md conventions more closely with scopes like feat(ci): add Claude PR assistant workflow

Summary

Must fix before merge:

  1. Update permissions to write in both workflows
  2. Add concurrency control to prevent duplicate reviews
  3. Consider enabling cost control filters

Overall: Solid implementation that needs permission fixes to function correctly. With those changes this will be ready to merge!

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.

2 participants