Skip to content

Add Claude Code GitHub Workflow#2

Merged
9bow merged 2 commits intomainfrom
add-claude-github-actions-1771654003980
Feb 21, 2026
Merged

Add Claude Code GitHub Workflow#2
9bow merged 2 commits intomainfrom
add-claude-github-actions-1771654003980

Conversation

@9bow
Copy link
Owner

@9bow 9bow commented Feb 21, 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!

@9bow 9bow requested a review from Copilot February 21, 2026 06:07
@9bow 9bow merged commit 23c9474 into main Feb 21, 2026
3 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds two GitHub Actions workflows to enable Claude Code integration in the repository: an on-demand workflow triggered by @claude mentions and an automatic code review workflow that runs on all PRs.

Changes:

  • Adds .github/workflows/claude.yml for on-demand Claude interactions via @claude mentions in PR/issue comments
  • Adds .github/workflows/claude-code-review.yml for automatic code reviews on new and updated PRs
  • Both workflows use the Anthropic Claude Code action and require the CLAUDE_CODE_OAUTH_TOKEN secret

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/claude.yml Main Claude Code workflow that triggers on @claude mentions in issues, PRs, and comments to enable AI-assisted coding tasks
.github/workflows/claude-code-review.yml Automated code review workflow that runs Claude's code review plugin on all PR opens and updates

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +22 to +24
contents: read
pull-requests: read
issues: read
Copy link

Copilot AI Feb 21, 2026

Choose a reason for hiding this comment

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

The workflow grants read-only permissions (contents: read, pull-requests: read, issues: read), but the PR description states Claude will "create comments, branches, and commits". Verify whether the claude_code_oauth_token handles write operations independently, or if these permissions need to be elevated to write access (contents: write, pull-requests: write, issues: write) for Claude to function as described.

Suggested change
contents: read
pull-requests: read
issues: read
contents: write
pull-requests: write
issues: write

Copilot uses AI. Check for mistakes.
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
Copy link

Copilot AI Feb 21, 2026

Choose a reason for hiding this comment

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

The workflow grants read-only permissions (pull-requests: read), which may be insufficient for Claude Code Review to post review comments on pull requests. Verify whether the claude_code_oauth_token handles write operations independently, or if pull-requests: write permission needs to be added.

Suggested change
pull-requests: read
pull-requests: write

Copilot uses AI. Check for mistakes.
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