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
File renamed without changes.
36 changes: 36 additions & 0 deletions .github/workflows/ai-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# AI Code Review using lambdaclass/actions reusable workflows
#
# Triggers:
# - Automatically on PR open/ready_for_review
# - On-demand via PR comments: /kimi, /codex, /claude (requires write access)
#
# Custom prompt: .github/prompts/ai-review.md
#
# Required secrets:
# - KIMI_API_KEY: For Kimi reviews (https://platform.moonshot.ai/)
# - OPENAI_API_KEY: For Codex reviews (https://platform.openai.com/)
# - ANTHROPIC_API_KEY: For Claude reviews (https://console.anthropic.com/)

name: AI Code Review

on:
pull_request:
types: [opened, ready_for_review]
Comment on lines +17 to +18
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing synchronize trigger - old workflows ran on PR updates (synchronize), this only runs on opened and ready_for_review

Suggested change
pull_request:
types: [opened, ready_for_review]
pull_request:
types: [opened, ready_for_review, synchronize]
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/ai-review.yml
Line: 17:18

Comment:
Missing `synchronize` trigger - old workflows ran on PR updates (`synchronize`), this only runs on `opened` and `ready_for_review`

```suggestion
  pull_request:
    types: [opened, ready_for_review, synchronize]
```

How can I resolve this? If you propose a fix, please make it concise.

issue_comment:
types: [created]
Comment on lines +14 to +20
Copy link
Contributor

Choose a reason for hiding this comment

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

Check that permissions are correctly inherited from the reusable workflows - old workflows explicitly set contents: read, pull-requests: write (Claude also had issues: write and id-token: write)

Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/ai-review.yml
Line: 14:20

Comment:
Check that permissions are correctly inherited from the reusable workflows - old workflows explicitly set `contents: read`, `pull-requests: write` (Claude also had `issues: write` and `id-token: write`)

How can I resolve this? If you propose a fix, please make it concise.


jobs:
kimi-review:
uses: lambdaclass/actions/.github/workflows/ai-review-kimi.yml@v1
secrets:
KIMI_API_KEY: ${{ secrets.KIMI_API_KEY }}

codex-review:
uses: lambdaclass/actions/.github/workflows/ai-review-codex.yml@v1
secrets:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

claude-review:
uses: lambdaclass/actions/.github/workflows/ai-review-claude.yml@v1
secrets:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
Comment on lines +22 to +36
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider adding concurrency control to cancel in-progress runs when new commits are pushed, preventing wasted API credits:

Suggested change
jobs:
kimi-review:
uses: lambdaclass/actions/.github/workflows/ai-review-kimi.yml@v1
secrets:
KIMI_API_KEY: ${{ secrets.KIMI_API_KEY }}
codex-review:
uses: lambdaclass/actions/.github/workflows/ai-review-codex.yml@v1
secrets:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
claude-review:
uses: lambdaclass/actions/.github/workflows/ai-review-claude.yml@v1
secrets:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
jobs:
kimi-review:
concurrency:
group: ${{ github.workflow }}-kimi-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
uses: lambdaclass/actions/.github/workflows/ai-review-kimi.yml@v1
secrets:
KIMI_API_KEY: ${{ secrets.KIMI_API_KEY }}
codex-review:
concurrency:
group: ${{ github.workflow }}-codex-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
uses: lambdaclass/actions/.github/workflows/ai-review-codex.yml@v1
secrets:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
claude-review:
concurrency:
group: ${{ github.workflow }}-claude-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
uses: lambdaclass/actions/.github/workflows/ai-review-claude.yml@v1
secrets:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/ai-review.yml
Line: 22:36

Comment:
Consider adding concurrency control to cancel in-progress runs when new commits are pushed, preventing wasted API credits:

```suggestion
jobs:
  kimi-review:
    concurrency:
      group: ${{ github.workflow }}-kimi-${{ github.head_ref || github.run_id }}
      cancel-in-progress: true
    uses: lambdaclass/actions/.github/workflows/ai-review-kimi.yml@v1
    secrets:
      KIMI_API_KEY: ${{ secrets.KIMI_API_KEY }}

  codex-review:
    concurrency:
      group: ${{ github.workflow }}-codex-${{ github.head_ref || github.run_id }}
      cancel-in-progress: true
    uses: lambdaclass/actions/.github/workflows/ai-review-codex.yml@v1
    secrets:
      OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

  claude-review:
    concurrency:
      group: ${{ github.workflow }}-claude-${{ github.head_ref || github.run_id }}
      cancel-in-progress: true
    uses: lambdaclass/actions/.github/workflows/ai-review-claude.yml@v1
    secrets:
      ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
```

<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>

How can I resolve this? If you propose a fix, please make it concise.

48 changes: 0 additions & 48 deletions .github/workflows/pr_review_chatgpt.yaml

This file was deleted.

49 changes: 0 additions & 49 deletions .github/workflows/pr_review_claude.yaml

This file was deleted.

113 changes: 0 additions & 113 deletions .github/workflows/pr_review_kimi.yaml

This file was deleted.

Loading