Skip to content

Add Claude Code GitHub Workflow#792

Merged
cdalar merged 3 commits intomainfrom
add-claude-github-actions-1771698892410
Feb 21, 2026
Merged

Add Claude Code GitHub Workflow#792
cdalar merged 3 commits intomainfrom
add-claude-github-actions-1771698892410

Conversation

@cdalar
Copy link
Copy Markdown
Owner

@cdalar cdalar 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!

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 57f5e98534

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/claude.yml Outdated
Comment on lines +22 to +24
contents: read
pull-requests: read
issues: read
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Use write permissions for mention-driven Claude workflow

In .github/workflows/claude.yml, the job is explicitly triggered by @claude mentions but the token is restricted to contents/pull-requests/issues: read; that scope cannot create the reply comments (or any follow-up branch/commit actions), so runs can execute and then fail with permission errors when trying to publish results back to the PR/issue thread.

Useful? React with πŸ‘Β / πŸ‘Ž.

Comment on lines +23 to +25
contents: read
pull-requests: read
issues: read
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Allow PR write access for automated code review output

The review workflow invokes /code-review:code-review on every PR, but pull-requests (and issues) permissions are read-only, which prevents posting review comments/status back to the pull request; as a result Claude can analyze the diff but cannot deliver review feedback where contributors expect it.

Useful? React with πŸ‘Β / πŸ‘Ž.

Comment on lines +4 to +5
pull_request:
types: [opened, synchronize, ready_for_review, reopened]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Guard code-review job from fork PRs without secrets

This workflow runs on pull_request events while relying on ${{ secrets.ANTHROPIC_API_KEY }}; for fork-origin PRs, GitHub does not provide repository secrets to pull_request workflows, so the action receives no API key and the review job fails for external contributors unless you gate execution on secret presence or switch to a safe pull_request_target design.

Useful? React with πŸ‘Β / πŸ‘Ž.

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 21, 2026

Codecov Report

βœ… All modified and coverable lines are covered by tests.
βœ… Project coverage is 11.34%. Comparing base (1207524) to head (703af50).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #792      +/-   ##
==========================================
- Coverage   11.47%   11.34%   -0.13%     
==========================================
  Files          36       36              
  Lines        3093     3093              
==========================================
- Hits          355      351       -4     
- Misses       2694     2696       +2     
- Partials       44       46       +2     

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

πŸš€ New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

- Set pull-requests and issues to write in claude.yml so Claude can
  post reply comments back to PR/issue threads
- Set pull-requests and issues to write in claude-code-review.yml so
  review feedback can be posted to PRs
- Switch claude-code-review.yml trigger from pull_request to
  pull_request_target so secrets are available for fork PRs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@cdalar cdalar merged commit dac76dc into main Feb 21, 2026
12 checks passed
@cdalar cdalar deleted the add-claude-github-actions-1771698892410 branch February 21, 2026 18:47
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.

1 participant