Add Claude Code workflow for AI-assisted PR reviews #9
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: | | ||
| Bash(pr-diff) | ||
| Bash(pr-view) | ||
| Bash(pr-comment) | ||
| Bash(git log) | ||
| Bash(git diff) | ||
| Bash(git show) | ||
| Bash(grep) | ||
| Read | ||
| Glob | ||
| Grep | ||
| claude_args: "--max-turns 100" | ||
| # 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(make schema) | ||
| Bash(go build ./...) | ||
| Bash(go test) | ||
| Bash(go vet) | ||
| Bash(git add) | ||
| Bash(git commit) | ||
| Bash(git diff) | ||
| Bash(git log) | ||
| Bash(git status) | ||
| Bash(git show) | ||
| Bash(pr-comment) | ||
| Bash(pr-push) | ||
| Bash(pr-view) | ||
| Bash(grep) | ||
| Read | ||
| Edit | ||
| Write | ||
| Glob | ||
| Grep | ||
| claude_args: "--max-turns 100" | ||