Skip to content

Commit f12e66b

Browse files
Add Claude Code workflow for AI-assisted PR reviews
Add a workflow that calls the reusable Claude Code workflow in eng-dev-ecosystem. Provides two modes: - Automatic PR review on open/sync (read-only) - Interactive @claude mentions for code changes Co-authored-by: Isaac
1 parent 3f3cc2b commit f12e66b

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

.github/workflows/claude-code.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Claude Code
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
issue_comment:
8+
types: [created]
9+
10+
pull_request_review_comment:
11+
types: [created]
12+
13+
jobs:
14+
# Automatic PR review when a PR is opened or updated.
15+
review:
16+
if: github.event_name == 'pull_request'
17+
uses: databricks-eng/eng-dev-ecosystem/.github/workflows/claude-code.yml@main
18+
secrets:
19+
DATABRICKS_SP_CLIENT_ID: ${{ secrets.DATABRICKS_SP_CLIENT_ID }}
20+
DATABRICKS_SP_CLIENT_SECRET: ${{ secrets.DATABRICKS_SP_CLIENT_SECRET }}
21+
with:
22+
prompt: "Review this PR. Focus on correctness, error handling, and adherence to the project's Go conventions documented in CLAUDE.md."
23+
allowed_tools: "Read,Glob,Grep"
24+
max_turns: "5"
25+
26+
# Interactive @claude mentions — Claude can make changes and push commits.
27+
assist:
28+
if: |
29+
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
30+
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude'))
31+
uses: databricks-eng/eng-dev-ecosystem/.github/workflows/claude-code.yml@main
32+
secrets:
33+
DATABRICKS_SP_CLIENT_ID: ${{ secrets.DATABRICKS_SP_CLIENT_ID }}
34+
DATABRICKS_SP_CLIENT_SECRET: ${{ secrets.DATABRICKS_SP_CLIENT_SECRET }}
35+
with:
36+
allowed_tools: |
37+
Bash(make lint)
38+
Bash(make test)
39+
Bash(make fmt)
40+
Bash(go build ./...)
41+
Read
42+
Edit
43+
Write
44+
Glob
45+
Grep
46+
max_turns: "10"

0 commit comments

Comments
 (0)