Skip to content

ci: add Claude Code automated PR review workflow - #1344

Merged
giswqs merged 1 commit into
masterfrom
chore/claude-code-review-workflow
Jul 18, 2026
Merged

giswqs merged 1 commit into
masterfrom
chore/claude-code-review-workflow

Conversation

@giswqs

@giswqs giswqs commented Jul 18, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Adds a GitHub Actions workflow that runs an automated Claude code review on pull requests, posting inline comments and a summary comment.
  • PRs from known contributors (owner/member/collaborator/contributor) are reviewed automatically; first-time contributor PRs require a maintainer to opt in by commenting /claude-review, preventing token-budget abuse from throwaway accounts.
  • Uses pull_request_target with a read-only checkout (persist-credentials: false, no dependency install, no code execution) and a restricted tool allowlist so untrusted fork code is never run with elevated credentials.

Test plan

  • Workflow YAML passes check yaml pre-commit hook (verified locally)
  • Open a test PR from a known contributor account and confirm the review runs automatically
  • Comment /claude-review as a maintainer on a first-time contributor PR and confirm the review triggers
  • Confirm a non-maintainer /claude-review comment does not trigger a run

Summary by CodeRabbit

  • New Features
    • Added an automated code review workflow for pull requests.
    • Reviews can be triggered automatically for eligible contributions or manually with the /claude-review command.
    • Provides inline feedback and a summary comment on the pull request.
    • Includes safeguards to limit review access and prevent unrelated review runs from interfering with one another.

Adds a GitHub Actions workflow that runs an automated Claude code review
on pull requests. Known contributors are reviewed automatically, while
first-time contributor PRs require a maintainer to opt in by commenting
/claude-review, preventing token-budget abuse from throwaway accounts.
Copilot AI review requested due to automatic review settings July 18, 2026 15:43

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@mergify

mergify Bot commented Jul 18, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@coderabbitai

coderabbitai Bot commented Jul 18, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: e6a90b02-a0d6-4398-af95-d796f8b5e378

📥 Commits

Reviewing files that changed from the base of the PR and between 4785fc0 and 5f53b11.

📒 Files selected for processing (1)
  • .github/workflows/claude-code-review.yml

📝 Walkthrough

Walkthrough

Adds a GitHub Actions workflow that runs Claude reviews for eligible pull request events or authorized /claude-review comments, checks out the PR head, and publishes structured inline and summary review comments.

Changes

Claude Code Review Automation

Layer / File(s) Summary
Review triggers and authorization
.github/workflows/claude-code-review.yml
Adds pull request and comment triggers, concurrency cancellation, eligibility gates, and minimal workflow permissions.
Pull request context and checkout
.github/workflows/claude-code-review.yml
Resolves the target PR and head SHA for each trigger type, then performs a credential-free shallow checkout.
Claude review execution and prompt
.github/workflows/claude-code-review.yml
Configures Claude and GitHub authentication, tool restrictions, review formatting requirements, and security guardrails.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: copilot

Poem

A rabbit reviews beneath moonlight bright,
Claude hops in with comments just right.
Inline carrots, summaries neat,
Guardrails keep the workflow sweet.
“/claude-review!” we thump our feet.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/claude-code-review-workflow

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.

@giswqs
giswqs merged commit 7542826 into master Jul 18, 2026
17 of 19 checks passed
@giswqs
giswqs deleted the chore/claude-code-review-workflow branch July 18, 2026 15:44
@github-actions

Copy link
Copy Markdown

@github-actions
github-actions Bot temporarily deployed to pull request July 18, 2026 15:46 Inactive

This branch was previously deployed

1 inactive deployment
pull request — 5f53b119 Deployed Jul 18, 2026 by github-actions[bot]
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