feat: Add Claude AI code review GitHub Actions workflow for automated PR reviews #79
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements an automated code review system using Claude AI (Anthropic) integrated into our GitHub Actions CI/CD pipeline.
Motivation
Manual code reviews can be time-consuming and may miss common issues. This automated review system provides immediate feedback on:
The AI-powered reviews complement human reviews by catching issues early and providing consistent feedback across all pull requests.
Changes
New Files
.github/workflows/claude-code.yml- GitHub Actions workflow configurationscripts/claude-review.js- Core review logic using Anthropic Claude APIscripts/format-claude-output.js- Utility for formatting review outputModified Files
package.json- Added@actions/coreand@actions/githubdependenciesImplementation Details
The workflow:
mainbranchclaude-sonnet-4-20250514) for analysisThe review includes severity levels (🔴 Critical, 🟡 Warning, 🟢 Info) for easy prioritization.
Configuration Required
Before merging, ensure the following secret is configured in the repository:
ANTHROPIC_API_KEY- API key for Claude AI serviceTesting
The workflow has been configured with
continue-on-error: trueto prevent blocking the CI pipeline if the review service is unavailable.Benefits
Future Enhancements
Potential improvements for follow-up PRs: