Skip to content

Add Claude Code GitHub Workflow#103

Merged
ooloth merged 2 commits intomainfrom
add-claude-github-actions-1763605880185
Nov 20, 2025
Merged

Add Claude Code GitHub Workflow#103
ooloth merged 2 commits intomainfrom
add-claude-github-actions-1763605880185

Conversation

@ooloth
Copy link
Owner

@ooloth ooloth commented Nov 20, 2025

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

Copilot AI review requested due to automatic review settings November 20, 2025 02:31
Copy link
Contributor

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. The first workflow allows team members to invoke Claude by mentioning @claude in PR or issue comments, while the second provides automated code reviews on new or updated pull requests.

Key Changes:

  • Added .github/workflows/claude.yml for interactive @claude mentions in comments
  • Added .github/workflows/claude-code-review.yml for automatic PR code reviews

Reviewed Changes

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

File Description
.github/workflows/claude.yml Defines workflow triggers for @claude mentions and configures permissions for Claude to interact with the repository
.github/workflows/claude-code-review.yml Sets up automated code review workflow that runs on PR open/update events with specific review criteria

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

(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
runs-on: ubuntu-latest
permissions:
contents: read
Copy link

Copilot AI Nov 20, 2025

Choose a reason for hiding this comment

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

The contents: read permission may be insufficient if Claude needs to create branches or commits as mentioned in the PR description. Consider adding contents: write permission to enable Claude's full functionality for file operations.

Suggested change
contents: read
contents: write

Copilot uses AI. Check for mistakes.
Comment on lines +23 to +24
pull-requests: read
issues: read
Copy link

Copilot AI Nov 20, 2025

Choose a reason for hiding this comment

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

The pull-requests: read and issues: read permissions may be insufficient if Claude needs to create comments, branches, and commits as described in the PR description. Consider adding pull-requests: write and issues: write permissions.

Suggested change
pull-requests: read
issues: read
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 Nov 20, 2025

Choose a reason for hiding this comment

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

The permissions are set to read-only, but line 52 instructs Claude to use gh pr comment to leave review comments. This requires pull-requests: write permission to post comments on the PR.

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

Copilot uses AI. Check for mistakes.
@ooloth ooloth merged commit c45c9e0 into main Nov 20, 2025
1 check passed
@ooloth ooloth deleted the add-claude-github-actions-1763605880185 branch November 20, 2025 02:32
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