Skip to content

Add Claude Code GitHub Workflow#1654

Merged
qreeves merged 2 commits into
masterfrom
add-claude-github-actions-1754961001666
Aug 12, 2025
Merged

Add Claude Code GitHub Workflow#1654
qreeves merged 2 commits into
masterfrom
add-claude-github-actions-1754961001666

Conversation

@qreeves

@qreeves qreeves commented Aug 12, 2025

Copy link
Copy Markdown
Member

🤖 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 August 12, 2025 01:10
@qreeves qreeves requested a review from a team as a code owner August 12, 2025 01:10
@gemini-code-assist

Copy link
Copy Markdown

Note

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 GitHub Actions integration for Claude Code, an AI coding assistant that can be triggered through @claude mentions in pull requests and issues. The integration includes both interactive Claude responses and automated code reviews.

  • Adds workflow for @claude mention triggers in PR/issue comments
  • Includes automated code review workflow for all PRs
  • Configures secure authentication and appropriate repository permissions

Reviewed Changes

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

File Description
.github/workflows/claude.yml Main workflow for interactive Claude responses triggered by @claude mentions
.github/workflows/claude-code-review.yml Automated code review workflow that runs on all PR creation/updates

# model: "claude-opus-4-1-20250805"

# Direct prompt for automated review (no @claude mention needed)
direct_prompt: |

Copilot AI Aug 12, 2025

Copy link

Choose a reason for hiding this comment

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

Running automated code reviews on every PR synchronize event could be resource-intensive and costly. Consider adding conditions to limit when reviews run, such as only for external contributors or specific file paths, or use the commented-out filtering options.

Copilot uses AI. Check for mistakes.
pull-requests: read
issues: read
id-token: write
actions: read # Required for Claude to read CI results on PRs

Copilot AI Aug 12, 2025

Copy link

Choose a reason for hiding this comment

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

The 'actions: read' permission is duplicated - it's already listed on line 26 and again in the additional_permissions section on lines 40-41. Remove the duplication to avoid confusion.

Copilot uses AI. Check for mistakes.

on:
pull_request:
types: [opened, synchronize]

Copilot AI Aug 12, 2025

Copy link

Choose a reason for hiding this comment

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

The workflow lacks any access control - it will run for all PRs including those from external contributors. This could lead to unexpected API usage costs. Consider enabling the commented filtering by author association or specific users.

Copilot uses AI. Check for mistakes.
@qreeves qreeves merged commit 1bd3246 into master Aug 12, 2025
1 check failed
@qreeves qreeves deleted the add-claude-github-actions-1754961001666 branch August 12, 2025 01:13
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