Add Claude Code workflow for AI-assisted PR reviews #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Claude Code | ||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize, reopened] | ||
| issue_comment: | ||
| types: [created] | ||
| pull_request_review_comment: | ||
| types: [created] | ||
| jobs: | ||
| # Automatic PR review when a PR is opened or updated. | ||
| review: | ||
| if: github.event_name == 'pull_request' | ||
| uses: databricks-eng/eng-dev-ecosystem/.github/workflows/claude-code.yml@main | ||
|
Check failure on line 17 in .github/workflows/claude-code.yml
|
||
| with: | ||
| prompt: "Review this PR. Focus on correctness, error handling, and adherence to the project's Go conventions documented in CLAUDE.md. Post your review as a PR comment. If you have no issues to raise, post a short comment saying the PR looks good." | ||
| allowed_tools: | | ||
| Read | ||
| Glob | ||
| Grep | ||
| claude_args: "--max-turns 10" | ||
| # Interactive @claude mentions — Claude can make changes and push commits. | ||
| assist: | ||
| if: | | ||
| (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) || | ||
| (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) | ||
| uses: databricks-eng/eng-dev-ecosystem/.github/workflows/claude-code.yml@main | ||
| with: | ||
| allowed_tools: | | ||
| Bash(make lint) | ||
| Bash(make test) | ||
| Bash(make fmt) | ||
| Bash(go build ./...) | ||
| Read | ||
| Edit | ||
| Write | ||
| Glob | ||
| Grep | ||
| claude_args: "--max-turns 20" | ||