-
Notifications
You must be signed in to change notification settings - Fork 0
chore: add AI code review workflow #4
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
Changes from all commits
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,24 @@ | ||
| name: AI Code Review | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize, reopened] | ||
|
|
||
| jobs: | ||
| review: | ||
| runs-on: ubuntu-latest | ||
|
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. If the external API hangs or is slow, this job will run until GitHub's default 6-hour timeout kills it. That's a lot of wasted Actions minutes. Add a reasonable timeout: timeout-minutes: 10 |
||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
| issues: write | ||
|
|
||
| steps: | ||
|
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. The workflow jumps straight to the AI Code Review action without checking out the repository first. Most code review actions need access to the actual source files to do their job. Add this before the review step: - name: Checkout
uses: actions/checkout@v4 |
||
| - name: Run AI Code Review | ||
| uses: Daltonganger/AI-Code-Review@v1.4.2 | ||
| with: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| AI_PROVIDER: 'codex' | ||
| CODEX_API_KEY: ${{ secrets.CODEX_API_KEY }} | ||
| CODEX_API_MODEL: 'gpt-5.4' | ||
| CODEX_API_BASE_URL: 'https://codex.2631.eu/v1' | ||
| REVIEW_LANGUAGE: 'en' | ||
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.
💡 No concurrency control
Unlike your CI workflow which has
concurrencyto cancel in-progress runs, this workflow will stack up review jobs if someone pushes multiple commits in quick succession.Consider adding: