Skip to content

feat: add AI code review workflows (ChatGPT, Claude, Kimi) #2

feat: add AI code review workflows (ChatGPT, Claude, Kimi)

feat: add AI code review workflows (ChatGPT, Claude, Kimi) #2

name: PR Review - ChatGPT
on:
pull_request:
types: [opened, synchronize, reopened]
pull_request_review_comment:
types: [created]
permissions:
contents: read
pull-requests: write
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
chatgpt-review:
name: ChatGPT Code Review
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: ChatGPT Code Review
uses: anc95/ChatGPT-CodeReview@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
with:
openai_engine: gpt-4o
language: en
review_comment_lgtm: false
max_tokens: 4096
prompt: |
You are a senior code reviewer for spawned, a Rust actor framework with support for both async (tokio) and thread-based backends.
Review this PR focusing on:
- Code correctness and potential bugs
- Concurrency issues (race conditions, deadlocks, data races)
- Performance implications
- Rust best practices and idiomatic patterns
- Memory safety and proper error handling
- Code readability and maintainability
Actor framework-specific considerations:
- Actor lifecycle management (init, shutdown, cancellation)
- Message passing correctness and ordering
- Proper use of CancellationToken and graceful shutdown
- Thread safety and synchronization primitives
- Timer and interval handling
Be concise and specific. Provide line references when suggesting changes.
If the code looks good, acknowledge it briefly.