Skip to content
This repository was archived by the owner on Jul 15, 2026. It is now read-only.

Add Claude Code GitHub Workflow - #8

Merged
donny-son merged 2 commits into
mainfrom
add-claude-github-actions-1772177039276
Feb 27, 2026
Merged

Add Claude Code GitHub Workflow#8
donny-son merged 2 commits into
mainfrom
add-claude-github-actions-1772177039276

Conversation

@donny-son

Copy link
Copy Markdown
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!

@donny-son donny-son left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

👀 Code Review - Claude Code Integration

Clean and well-structured setup for Claude Code GitHub Actions.

What's Good

  • Security-conscious permissions: Read-only defaults with id-token: write for OIDC auth
  • Two complementary workflows:
    • claude.yml for @claude mentions (interactive)
    • claude-code-review.yml for auto-review on PRs
  • Sensible triggers: Code review runs on relevant PR events; mention-based workflow has proper contains() checks

Suggestions (optional)

  1. Code Review Workflow Permissions: Currently has read-only pull-requests: read. Add pull-requests: write if you want Claude to post review comments directly.

  2. Allowed Tools: Consider adding project-specific tools:

    allowed_tools: Bash(npm install),Bash(npm run build),Bash(npm run lint)
  3. Concurrency: Prevent duplicate runs:

    concurrency:
      group: claude-${{ github.event.pull_request.number || github.event.issue.number }}
      cancel-in-progress: true

Looks good! 🚀

@donny-son donny-son left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Joan's Quick Review 🥟

Solid Claude Code integration! The setup follows best practices.

Already noted by Donny (great self-review 👍):

  • pull-requests: write needed for auto-commenting
  • concurrency to prevent duplicate runs

One additional note:

  • Consider adding contents: write if Claude should be able to push commits (e.g., auto-fix suggestions)

Clean PR, ready to merge once permissions are adjusted! ✨

@donny-son donny-son left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Code Review: Claude Code GitHub Workflow 🤖

Great addition! This sets up Claude Code integration properly. A few observations:

✅ What looks good

  • Security: OAuth token stored as secret, not hardcoded
  • Permissions: Minimal necessary permissions requested
  • Workflow triggers: Good coverage of issue/PR events
  • Documentation: PR description is excellent

💡 Suggestions for future consideration

1. claude-code-review.yml

  • permissions only has read for pull-requests — the code-review plugin might need write to post inline comments. If reviews don't post, try:
    pull-requests: write
  • fetch-depth: 1 is fine for most cases, but deeper context might help Claude understand history if needed

2. claude.yml

  • The if condition is solid but a bit verbose. Consider extracting common logic or using a reusable workflow later if you add more triggers.
  • For more control, you might want to add allowed_tools restriction as mentioned in the PR description

3. General

  • Consider adding a timeout-minutes to prevent runaway jobs
  • A CLAUDE.md file in the repo root would give Claude project-specific context

Bottom line

Clean implementation, well-documented. Ship it! 🚀

@donny-son
donny-son merged commit 34743ed into main Feb 27, 2026
5 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant