Skip to content

Add Claude Code GitHub Workflow - #1

Merged
stephen-masters merged 2 commits into
mainfrom
add-claude-github-actions-1784543243301
Jul 20, 2026
Merged

stephen-masters merged 2 commits into
mainfrom
add-claude-github-actions-1784543243301

Conversation

@stephen-masters

Copy link
Copy Markdown

🤖 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 July 20, 2026 10:27
@stephen-masters
stephen-masters merged commit 0b0937b into main Jul 20, 2026
2 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds GitHub Actions workflows to integrate the Claude Code GitHub App into this repository, enabling automated Claude-driven actions and an optional automated PR code review flow.

Changes:

  • Introduces a comment/review/issue-triggered workflow that runs Claude Code when “@claude” is mentioned.
  • Adds a pull-request-triggered workflow intended to run an automated Claude-powered code review on PR events.

Reviewed changes

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

File Description
.github/workflows/claude.yml New workflow to invoke Claude Code based on “@claude” mentions across several GitHub events.
.github/workflows/claude-code-review.yml New workflow to run a Claude Code Review plugin automatically on PR lifecycle events.

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

Comment on lines +15 to +19
if: |
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
Comment on lines +3 to +11
on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
issues:
types: [opened, assigned]
pull_request_review:
types: [submitted]
Comment on lines +21 to +26
permissions:
contents: read
pull-requests: read
issues: read
id-token: write
actions: read # Required for Claude to read CI results on PRs
Comment on lines +14 to +15
claude-review:
# Optional: Filter by PR author
Comment on lines +22 to +26
permissions:
contents: read
pull-requests: read
issues: read
id-token: write
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