-
Notifications
You must be signed in to change notification settings - Fork 6.9k
[ci] claude in ci. #13297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ci] claude in ci. #13297
Changes from all commits
ab91de5
2f852b2
845196d
156b0b9
10a39a9
411235e
06d84c1
8267826
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # PR Review Rules | ||
|
|
||
| Review-specific rules for Claude. Focus on correctness — style is handled by ruff. | ||
|
|
||
| Before reviewing, read and apply the guidelines in: | ||
| - [AGENTS.md](AGENTS.md) — coding style, dependencies, copied code, model conventions | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we refactor model information into a
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah would be better but ok to do it in a seperate PR |
||
| - [skills/model-integration/SKILL.md](skills/model-integration/SKILL.md) — attention pattern, pipeline rules, implementation checklist, gotchas | ||
| - [skills/parity-testing/SKILL.md](skills/parity-testing/SKILL.md) — testing rules, comparison utilities | ||
| - [skills/parity-testing/pitfalls.md](skills/parity-testing/pitfalls.md) — known pitfalls (dtype mismatches, config assumptions, etc.) | ||
|
|
||
| ## Common mistakes (add new rules below this line) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| name: Claude PR Review | ||
|
|
||
| on: | ||
| issue_comment: | ||
| types: [created] | ||
|
sayakpaul marked this conversation as resolved.
|
||
| pull_request_review_comment: | ||
| types: [created] | ||
|
|
||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| issues: read | ||
|
|
||
| jobs: | ||
| claude-review: | ||
| if: | | ||
| ( | ||
| github.event_name == 'issue_comment' && | ||
| github.event.issue.pull_request && | ||
| github.event.issue.state == 'open' && | ||
| contains(github.event.comment.body, '@claude') && | ||
| (github.event.comment.author_association == 'MEMBER' || | ||
| github.event.comment.author_association == 'OWNER' || | ||
| github.event.comment.author_association == 'COLLABORATOR') | ||
| ) || ( | ||
| github.event_name == 'pull_request_review_comment' && | ||
| contains(github.event.comment.body, '@claude') && | ||
| (github.event.comment.author_association == 'MEMBER' || | ||
| github.event.comment.author_association == 'OWNER' || | ||
| github.event.comment.author_association == 'COLLABORATOR') | ||
| ) | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: anthropics/claude-code-action@v1 | ||
| with: | ||
| anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} | ||
| claude_args: | | ||
| --append-system-prompt "Review this PR against the rules in .ai/review-rules.md. Focus on correctness, not style (ruff handles style). Only review changes under src/diffusers/. Do NOT commit changes unless the comment explicitly asks you to using the phrase 'commit this'." | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are a lot of overlaps from https://github.com/huggingface/diffusers/blob/main/.ai/skills/model-integration/SKILL.md
I think maybe we have a separate subdoc for
models.mdthat contains the gotchas, common conventions, rules, structures etc and we can link it from everywhere: for now bothAGENTS.mdand the model-integration skillswhat do you think? cc @stevhliu here too
these contents that are already in
AGENTS.mddoes not need to be included here again, I think claude CI would have read the AGENTS.md. anyways no?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah i agree here, and i think it'd be cleaner and easier to maintain to provide a path to content that is already in
AGENTS.mdThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea!
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed in 156b0b9.