Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/prompts/ai-review.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
1. **Security vulnerabilities** - Label by criticality (Critical/High/Medium/Low)
- Solidity: e.g. reentrancy, access control, integer issues, etc.
- Rust: e.g. unsafe blocks, error handling, panics, etc.
- Web/API: e.g. SQL injection, auth bypass, input validation, sensitive data exposure, CORS/CSRF, etc.

2. **Potential bugs** - Logic errors, edge cases, incorrect behavior, race conditions

3. **Performance issues** - Only significant: e.g. O(n²) on unbounded input, N+1 queries, unbounded memory growth

4. **Simplicity** - Prefer simple, readable code over clever abstractions

Guidelines:
- Do NOT suggest micro-optimizations or premature abstractions
- Always prefer simplicity over complexity when performance gains are marginal
- Focus on real issues, not hypothetical improvements
- Be concise and actionable
105 changes: 105 additions & 0 deletions .github/workflows/ai-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: AI Code Review

on:
pull_request:
types: [opened, reopened, ready_for_review]
issue_comment:
types: [created]

permissions: {}

jobs:
claude-review:
if: >
(github.event_name == 'pull_request' && github.event.pull_request.draft == false &&
github.event.pull_request.head.repo.full_name == github.repository) ||
(github.event_name == 'issue_comment' && github.event.issue.pull_request &&
contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association) &&
(startsWith(github.event.comment.body, '/claude') || github.event.comment.body == '/review' || startsWith(github.event.comment.body, '/review ') || startsWith(github.event.comment.body, fromJSON('"/review\n"')) || startsWith(github.event.comment.body, fromJSON('"/review\r"'))))
uses: yetanotherco/actions/.github/workflows/pr_review_claude.yml@4a4279fdc553ad030894c98698582baaeb40327a # v2.0.0
permissions:
contents: read
pull-requests: write
issues: read
secrets:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}

codex-review:
if: >
(github.event_name == 'pull_request' && github.event.pull_request.draft == false &&
github.event.pull_request.head.repo.full_name == github.repository) ||
(github.event_name == 'issue_comment' && github.event.issue.pull_request &&
contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association) &&
(startsWith(github.event.comment.body, '/codex') || github.event.comment.body == '/review' || startsWith(github.event.comment.body, '/review ') || startsWith(github.event.comment.body, fromJSON('"/review\n"')) || startsWith(github.event.comment.body, fromJSON('"/review\r"'))))
uses: yetanotherco/actions/.github/workflows/pr_review_codex.yml@4a4279fdc553ad030894c98698582baaeb40327a # v2.0.0
permissions:
contents: read
issues: write
pull-requests: write
secrets:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

kimi-review:
if: >
(github.event_name == 'pull_request' && github.event.pull_request.draft == false &&
github.event.pull_request.head.repo.full_name == github.repository) ||
(github.event_name == 'issue_comment' && github.event.issue.pull_request &&
contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association) &&
(startsWith(github.event.comment.body, '/kimi') || github.event.comment.body == '/review' || startsWith(github.event.comment.body, '/review ') || startsWith(github.event.comment.body, fromJSON('"/review\n"')) || startsWith(github.event.comment.body, fromJSON('"/review\r"'))))
uses: yetanotherco/actions/.github/workflows/pr_review_kimi.yml@4a4279fdc553ad030894c98698582baaeb40327a # v2.0.0
permissions:
contents: read
pull-requests: write
secrets:
KIMI_API_KEY: ${{ secrets.KIMI_API_KEY }}

deepseek-review:
if: >
(github.event_name == 'pull_request' && github.event.pull_request.draft == false &&
github.event.pull_request.head.repo.full_name == github.repository) ||
(github.event_name == 'issue_comment' && github.event.issue.pull_request &&
contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association) &&
(startsWith(github.event.comment.body, '/deepseek') || github.event.comment.body == '/review' || startsWith(github.event.comment.body, '/review ') || startsWith(github.event.comment.body, fromJSON('"/review\n"')) || startsWith(github.event.comment.body, fromJSON('"/review\r"'))))
uses: yetanotherco/actions/.github/workflows/pr_review_openrouter.yml@4a4279fdc553ad030894c98698582baaeb40327a # v2.0.0
permissions:
contents: read
pull-requests: write
with:
model: deepseek/deepseek-v4-pro-0813
reasoning_effort: high
max_bytes: 2400000
secrets:
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}

grok-review:
if: >
(github.event_name == 'pull_request' && github.event.pull_request.draft == false &&
github.event.pull_request.head.repo.full_name == github.repository) ||
(github.event_name == 'issue_comment' && github.event.issue.pull_request &&
contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association) &&
(startsWith(github.event.comment.body, '/grok') || github.event.comment.body == '/review' || startsWith(github.event.comment.body, '/review ') || startsWith(github.event.comment.body, fromJSON('"/review\n"')) || startsWith(github.event.comment.body, fromJSON('"/review\r"'))))
uses: yetanotherco/actions/.github/workflows/pr_review_openrouter.yml@4a4279fdc553ad030894c98698582baaeb40327a # v2.0.0
permissions:
contents: read
pull-requests: write
with:
model: x-ai/grok-4.7
secrets:
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}

gemini-review:
if: >
(github.event_name == 'pull_request' && github.event.pull_request.draft == false &&
github.event.pull_request.head.repo.full_name == github.repository) ||
(github.event_name == 'issue_comment' && github.event.issue.pull_request &&
contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association) &&
(startsWith(github.event.comment.body, '/gemini') || github.event.comment.body == '/review' || startsWith(github.event.comment.body, '/review ') || startsWith(github.event.comment.body, fromJSON('"/review\n"')) || startsWith(github.event.comment.body, fromJSON('"/review\r"'))))
uses: yetanotherco/actions/.github/workflows/pr_review_openrouter.yml@4a4279fdc553ad030894c98698582baaeb40327a # v2.0.0
permissions:
contents: read
pull-requests: write
with:
model: google/gemini-4-argon
max_bytes: 2400000
secrets:
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
39 changes: 0 additions & 39 deletions .github/workflows/pr_review_claude.yml

This file was deleted.

39 changes: 0 additions & 39 deletions .github/workflows/pr_review_codex.yml

This file was deleted.