Skip to content

Update Claude code review workflow to v7 - #1350

Merged
giswqs merged 1 commit into
masterfrom
claude
Aug 2, 2026
Merged

Update Claude code review workflow to v7#1350
giswqs merged 1 commit into
masterfrom
claude

Conversation

@giswqs

@giswqs giswqs commented Aug 2, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Improvements
    • Enhanced automated pull request reviews with more consistent, context-aware feedback.
    • Improved handling of large changesets by safely limiting oversized review content.
    • Added protections to prevent automated review loops and restrict review actions to read-only operations.
    • Review summaries are now posted more reliably as pull request comments.
    • Strengthened protection for sensitive information processed during automated reviews.

Copilot AI review requested due to automatic review settings August 2, 2026 00:37
@coderabbitai

coderabbitai Bot commented Aug 2, 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: 06e2f068-2f63-4da5-9859-a2af80a1bb56

📥 Commits

Reviewing files that changed from the base of the PR and between 7542826 and 9edfc40.

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

📝 Walkthrough

Walkthrough

The Claude review workflow now stages pull request context, restricts review tools, pins its action version, prevents bot-triggered reviews, limits oversized inputs and outputs, and posts Claude’s validated final message as a pull request comment.

Changes

Claude review workflow

Layer / File(s) Summary
Workflow triggers and execution controls
.github/workflows/claude-code-review.yml
The workflow excludes bot-triggered reviews, updates checkout to actions/checkout@v7, pins the Claude Code Action, and documents the execution model.
Staged context and restricted review prompt
.github/workflows/claude-code-review.yml
The workflow stages metadata, changed files, and a truncated diff. Claude reads the staged context and repository files without Bash or network access.
Validated summary publication
.github/workflows/claude-code-review.yml
The workflow extracts Claude’s final result, skips invalid output, truncates comments above 65,000 bytes, and posts the summary through gh pr comment.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

Suggested reviewers: copilot

Poem

A rabbit checks the staged diff,
With tools kept quiet, paws kept swift.
Claude writes one final review,
The workflow posts it fresh and true.
Bot loops stop at the gate.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude

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.

@mergify

mergify Bot commented Aug 2, 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

@giswqs
giswqs merged commit 4576ccf into master Aug 2, 2026
20 of 21 checks passed
@giswqs
giswqs deleted the claude branch August 2, 2026 00:37

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.

🟡 Not ready to approve

The new “Post review summary” step can incorrectly skip posting valid short summaries due to a brittle length-based guard.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Pull request overview

This PR updates the repository’s Claude-based automated code review workflow to align with claude-code-action v7-era behavior by removing reliance on authenticated gh subprocesses and instead staging PR context on disk, pinning the action by SHA, and publishing the final review summary from the action’s execution log.

Changes:

  • Adds explicit documentation and workflow structure to ensure no GitHub token is available to Claude subprocesses, and stages PR diff/metadata to pr-context/ for Read/Grep/Glob.
  • Updates the checkout action version and pins anthropics/claude-code-action to a specific commit SHA; removes Bash/gh tools from --allowedTools.
  • Adds a workflow step to post the final summary by extracting it from execution_file via jq.
File summaries
File Description
.github/workflows/claude-code-review.yml Reworks the Claude review workflow to stage PR context locally, pin the action SHA, remove gh Bash tools, and post the final summary from execution_file.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

Comment on lines +269 to +277
# A run that errored, hit a permission wall, or produced only
# boilerplate should stay silent rather than post an empty comment.
if [ "$(wc -c < "$summary_file")" -lt 40 ]; then
echo "::warning::Claude produced no usable review summary; skipping the comment"
echo "--- begin captured summary ---"
cat "$summary_file"
echo "--- end captured summary ---"
exit 0
fi
@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown

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