Skip to content

Fix Claude Code Review workflow comment tooling#113

Merged
justin808 merged 1 commit intomainfrom
codex/fix-claude-code-review-tools-20260219
Feb 19, 2026
Merged

Fix Claude Code Review workflow comment tooling#113
justin808 merged 1 commit intomainfrom
codex/fix-claude-code-review-tools-20260219

Conversation

@justin808
Copy link
Member

This ports the Claude Code review workflow fix from shakacode/hichee-data#367:

  • update prompt instructions so Claude posts feedback via GitHub comments
  • allow required tools via claude_args --allowedTools
  • remove sticky-comment mode

This makes Claude review output appear as top-level and inline PR comments.

Copilot AI review requested due to automatic review settings February 19, 2026 00:32
@coderabbitai
Copy link

coderabbitai bot commented Feb 19, 2026

Warning

Rate limit exceeded

@justin808 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 27 minutes and 34 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/fix-claude-code-review-tools-20260219

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link

greptile-apps bot commented Feb 19, 2026

Greptile Summary

This PR migrates the Claude Code review workflow from a centralized reusable workflow to an inline definition with explicit tool permissions. The changes enable Claude to post feedback directly as GitHub PR comments instead of using sticky-comment mode.

Key changes:

  • Expanded PR trigger types to include ready_for_review and reopened
  • Replaced uses: shakacode/.github/.github/workflows/claude-code-review.yml@main with inline job definition
  • Added explicit prompt instructions directing Claude to use gh pr comment and inline comment tools
  • Configured --allowedTools to grant specific permissions: mcp__github_inline_comment__create_inline_comment, Bash(gh pr comment:*), Bash(gh pr diff:*), Bash(gh pr view:*)
  • Updated actions/checkout from v4 to v6

The workflow correctly maintains all necessary permissions (contents: read, pull-requests: write, issues: write, id-token: write) and follows the pattern from the referenced PR in hichee-data.

Confidence Score: 5/5

  • This PR is safe to merge with no risks - it's a straightforward workflow configuration update
  • The changes are well-tested (ported from another repository), properly maintain all required permissions, use correct tool naming syntax, and improve functionality by enabling direct GitHub comment posting
  • No files require special attention

Important Files Changed

Filename Overview
.github/workflows/claude-code-review.yml Replaces centralized reusable workflow with inline definition, adds explicit tool permissions for GitHub comment posting

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[PR Event Triggered] --> B{Event Type?}
    B -->|opened| C[Start Claude Review Job]
    B -->|synchronize| C
    B -->|ready_for_review| C
    B -->|reopened| C
    
    C --> D[Checkout Repository]
    D --> E[Run Claude Code Action]
    
    E --> F{Review Analysis}
    F --> G[gh pr comment]
    F --> H[mcp__github_inline_comment__create_inline_comment]
    
    G --> I[Top-level PR Comments]
    H --> J[Inline Code Comments]
    
    I --> K[Review Posted to GitHub]
    J --> K
Loading

Last reviewed commit: d433353

Copy link

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 updates the Claude Code Review workflow to enable Claude to post feedback directly as GitHub PR comments instead of using a sticky comment mode. The change migrates from using a reusable workflow to a self-contained workflow with explicit steps and tool configurations.

Changes:

  • Replaces reusable workflow reference with inline job definition
  • Adds explicit prompt instructions for Claude to use GitHub commenting tools
  • Configures allowed tools via claude_args parameter
  • Extends PR trigger types to include ready_for_review and reopened

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

uses: shakacode/.github/.github/workflows/claude-code-review.yml@main
runs-on: ubuntu-latest
permissions:
contents: read
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

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

The workflow is missing the 'actions: read' permission that is present in the claude.yml workflow. According to the comment in claude.yml (line 26), this permission is "Required for Claude to read CI results on PRs". Consider adding this permission if Claude should be able to read CI results during code review, which would be valuable for providing more comprehensive feedback.

Suggested change
contents: read
contents: read
actions: read

Copilot uses AI. Check for mistakes.
Only post GitHub comments - don't submit review text as messages.

claude_args: |
--allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*)"
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

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

The argument uses '--allowedTools' (camelCase) but the example in claude.yml (line 49) shows '--allowed-tools' (with hyphen). Verify which format is correct for the Claude Code Action. If the correct format is '--allowed-tools', this should be updated to match the documented format.

Suggested change
--allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*)"
--allowed-tools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*)"

Copilot uses AI. Check for mistakes.
id: claude-review
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

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

If the 'actions: read' permission is added to the permissions block (as suggested in another comment), you should also add the 'additional_permissions' configuration to the action inputs, similar to lines 40-41 in claude.yml. This ensures Claude can properly utilize the actions permission.

Copilot uses AI. Check for mistakes.
@justin808 justin808 merged commit cda856c into main Feb 19, 2026
8 of 9 checks passed
@justin808 justin808 deleted the codex/fix-claude-code-review-tools-20260219 branch February 19, 2026 00:48
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