Repository navigation
Trigger automated CLI PR reviews - #4738
shreyas-goenka wants to merge 7 commits into
Conversation
|
Commit: 3cf6d9b
18 interesting tests: 7 SKIP, 6 RECOVERED, 5 flaky
Top 20 slowest tests (at least 2 minutes):
|
b418b20 to
0d2b698
Compare
0d2b698 to
6dbf8a3
Compare
6dbf8a3 to
275b67a
Compare
275b67a to
fc25d50
Compare
fc25d50 to
47a7034
Compare
2ade542 to
c46e877
Compare
Add a GitHub Actions workflow that provides AI-assisted PR reviews and interactive @claude mentions using Claude Code backed by Databricks Model Serving. The workflow dispatches to eng-dev-ecosystem's protected runners (whose IPs are allowlisted by the Databricks account IP ACL) via the DECO workflow trigger GitHub App. Two modes: - Review: automatic on PR open, posts a review comment - Assist: triggered by @claude mentions, can edit code and push Access is restricted to COLLABORATOR/MEMBER/OWNER via author_association allowlists. Co-authored-by: Isaac
c46e877 to
1713c27
Compare
eng-dev-ecosystem-bot
left a comment
There was a problem hiding this comment.
Workflow looks well-structured overall. Good security practices: fork PR checks, author_association allowlists, and using process.env to avoid script injection for comment_body. Two minor observations below.
| workflow_id: 'cli-claude-code.yml', | ||
| ref: 'main', | ||
| inputs: { | ||
| pull_request_number: '${{ steps.pr.outputs.number }}', |
There was a problem hiding this comment.
Nit: steps.pr.outputs.number is interpolated directly into the script block via ${{ }}. This is safe in practice (it's a GitHub-assigned integer), but it's inconsistent with line 131 where comment_body correctly uses process.env to avoid expression injection.
For defense-in-depth, consider passing this through an env var too:
env:
COMMENT_BODY: ${{ github.event.comment.body }}
PR_NUMBER: ${{ steps.pr.outputs.number }} pull_request_number: process.env.PR_NUMBER,| (github.event_name == 'issue_comment' && github.event.issue.pull_request && contains(github.event.comment.body, '@claude')) || | ||
| (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) | ||
| ) | ||
| runs-on: |
There was a problem hiding this comment.
Minor: The assist job has no concurrency group, unlike review (line 34-36). Multiple @claude mentions on the same PR could trigger parallel dispatches. If that's intentional, a brief comment would help; otherwise, consider adding:
concurrency:
group: claude-assist-${{ github.event.issue.number || github.event.pull_request.number }}
cancel-in-progress: true|
@claude reply to me in this PR with a comment saying hi |
|
@claude say hi |
✅ Integration test reportCommit: 13c418e
Top 3 slowest tests (at least 2 minutes):
|
eng-dev-ecosystem-bot
left a comment
There was a problem hiding this comment.
Clean, well-structured workflow. Good security practices: fork checks on both jobs, author association gating, and passing comment_body through process.env instead of ${{ }} interpolation to avoid script injection. One suggestion below.
| ( | ||
| (github.event_name == 'issue_comment' && github.event.issue.pull_request && contains(github.event.comment.body, '@claude')) || | ||
| (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) | ||
| ) |
There was a problem hiding this comment.
Nit: The review job has a concurrency group to cancel in-progress runs, but assist does not. If someone posts multiple @claude comments in quick succession, they could all trigger simultaneously. Consider adding:
concurrency:
group: claude-assist-${{ github.event.issue.number || github.event.pull_request.number }}
cancel-in-progress: true|
@claude is elon musk the founder of computing? |
After dispatching to eng-dev-ecosystem, the workflow now finds the remote run, posts a link in the step summary, and waits for it to complete. This keeps the check visible on the PR while Claude works. Co-authored-by: Isaac
- Pin actions to commit SHAs instead of mutable version tags - Add concurrency group to assist job to prevent parallel dispatches - Pass PR number through env var for defense-in-depth against injection Co-authored-by: Isaac
Reflects current implementation: composite action, standalone workflows, OIDC policies, SHA-pinned actions, concurrency groups, allowed tools, and comprehensive threat model. Co-authored-by: Isaac
Co-authored-by: Isaac
f2d638a to
b640037
Compare
|
This PR has not received an update in a while. If you want to keep this PR open, please leave a comment below or push a new commit and auto-close will be canceled. |
Drop the interactive @claude assist job and the issue_comment / pull_request_review_comment triggers; keep only the automatic review on PR open. Also stop passing event_type to cli-claude-code.yml, which is now review-only. Co-authored-by: Isaac
Changes
Trigger automated reviews when org members/owners open non-fork CLI PRs. Dispatch
cli-pr-review.ymlindatabricks-eng/eng-dev-ecosystem, link the backend run, and wait for its result.Why
The backend runs the CLI repository's PR review skill and posts comments through review-oss-bot. Protected runners provide access to Databricks model serving.
Depends on https://github.com/databricks-eng/eng-dev-ecosystem/pull/1312 and application of its renamed OIDC subject before this dispatcher is used.
Tests
Workflow YAML formatting, actionlint and Bash syntax checks pass locally. Both dispatch and run lookup reference
cli-pr-review.yml. End-to-end verification remains pending the backend merge and OIDC update.