Skip to content

Add Claude code review workflow#191

Merged
hnykda merged 1 commit intomainfrom
feat/claude-code-review
Feb 24, 2026
Merged

Add Claude code review workflow#191
hnykda merged 1 commit intomainfrom
feat/claude-code-review

Conversation

@RafaelPo
Copy link
Copy Markdown
Contributor

Summary

  • Adds .github/workflows/claude-code-review.yml to enable @claude mentions on PRs and issues
  • Uses anthropics/claude-code-action@v1 (official GitHub Action)
  • Triggers on issue comments, PR review comments, and PR reviews containing @claude

Setup required

  1. Install the Claude GitHub App on this repo
  2. Add ANTHROPIC_API_KEY as a repository secret (Settings → Secrets → Actions)

Test plan

  • Install Claude GitHub App on repo
  • Add ANTHROPIC_API_KEY secret
  • Merge this PR
  • Comment @claude code review on a PR to verify

🤖 Generated with Claude Code

@RafaelPo RafaelPo force-pushed the feat/claude-code-review branch from 5189681 to 791a25e Compare February 23, 2026 18:15
Comment on lines +34 to +38
- name: Checkout PR branch (for PR comments)
if: github.event_name == 'issue_comment' && github.event.issue.pull_request
run: gh pr checkout ${{ github.event.issue.number }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

This comment was marked as outdated.

Enables @claude mentions on PRs and issues to trigger Claude Code
reviews via anthropics/claude-code-action. Includes review prompt
with inline comment style, progress tracking, and allowed tools.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@RafaelPo RafaelPo force-pushed the feat/claude-code-review branch from 791a25e to 8fa4859 Compare February 23, 2026 18:20
- name: Run Claude Code
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: The workflow expects the CLAUDE_CODE_OAUTH_TOKEN secret, but the setup instructions incorrectly tell users to create ANTHROPIC_API_KEY, causing runtime authentication failure.
Severity: CRITICAL

Suggested Fix

To resolve this, either change the workflow to use anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} to align with the documentation, or update the PR description to instruct users to set up the CLAUDE_CODE_OAUTH_TOKEN secret instead.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: .github/workflows/claude-code-review.yml#L49

Potential issue: The setup instructions in the pull request description direct users to
create a repository secret named `ANTHROPIC_API_KEY`. However, the GitHub Actions
workflow code is configured to use a different secret, `CLAUDE_CODE_OAUTH_TOKEN`, for
authentication. When a user follows the provided setup instructions, the workflow will
fail at runtime because the `CLAUDE_CODE_OAUTH_TOKEN` secret will not exist, causing the
action to fail during its authentication step. This prevents the feature from
functioning as intended for anyone following the documentation.

@hnykda hnykda merged commit 5f9d5b8 into main Feb 24, 2026
6 checks passed
@hnykda hnykda deleted the feat/claude-code-review branch February 24, 2026 10:43
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