Skip to content
Closed
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
24 changes: 24 additions & 0 deletions .github/workflows/ai-code-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: AI Code Review

on:
Copy link
Copy Markdown

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 concurrency to cancel in-progress runs, this workflow will stack up review jobs if someone pushes multiple commits in quick succession.

Consider adding:

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

pull_request:
types: [opened, synchronize, reopened]

jobs:
review:
runs-on: ubuntu-latest
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ No timeout-minutes

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:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Missing checkout step

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'
Loading