-
Notifications
You must be signed in to change notification settings - Fork 8
ci: use lambdaclass/actions reusable workflows for AI review #69
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
Conversation
🤖 Kimi Code ReviewReview SummaryThis PR replaces individual AI review workflows with a unified approach using lambdaclass/actions reusable workflows. The changes are infrastructure-only and don't affect consensus-critical code. Issues Found1. Missing Secrets Validation (ai-review.yml:18-36)The workflow will fail silently if required secrets are missing. Add validation: - name: Validate secrets
run: |
if [ -z "${{ secrets.KIMI_API_KEY }}" ]; then
echo "::warning::KIMI_API_KEY not configured - Kimi reviews disabled"
fi
if [ -z "${{ secrets.OPENAI_API_KEY }}" ]; then
echo "::warning::OPENAI_API_KEY not configured - Codex reviews disabled"
fi
if [ -z "${{ secrets.ANTHROPIC_API_KEY }}" ]; then
echo "::warning::ANTHROPIC_API_KEY not configured - Claude reviews disabled"
fi2. Workflow Trigger Inconsistency (ai-review.yml:19-22)The new workflow triggers on
Fix: Add missing trigger types: types: [opened, synchronize, reopened, ready_for_review]3. Comment Trigger Support UnclearThe PR description mentions 4. Permission RegressionOld workflows had explicit
Verify these are set in the reusable workflows. Positive Changes✅ Cleaner maintenance - Single workflow file vs 3 separate ones RecommendationAddress the trigger inconsistency (#2) before merging - this is the only user-visible regression. Automated review by Kimi (Moonshot AI) · custom prompt |
🤖 Codex Code ReviewFindings
Consensus-layer review
If the reusable workflows already enforce trusted-commenter gating and set permissions internally, this looks fine. Automated review by OpenAI Codex · custom prompt |
Greptile OverviewGreptile SummaryThis PR consolidates three separate AI review workflows (ChatGPT, Claude, Kimi) into a single unified workflow that uses reusable workflows from Key changes:
Critical behavioral change:
Other considerations:
Confidence Score: 3/5
|
| Filename | Overview |
|---|---|
| .github/workflows/ai-review.yml | New unified workflow using reusable workflows, but missing key configurations like permissions, concurrency control, and synchronize trigger |
Sequence Diagram
sequenceDiagram
participant User
participant GitHub
participant AI Review Workflow
participant Kimi Reusable WF
participant Codex Reusable WF
participant Claude Reusable WF
participant Kimi API
participant OpenAI API
participant Anthropic API
alt PR opened or ready_for_review
User->>GitHub: Open/Ready PR
GitHub->>AI Review Workflow: Trigger workflow
else On-demand via comment
User->>GitHub: Comment /kimi, /codex, or /claude
GitHub->>AI Review Workflow: Trigger workflow
end
par Parallel Reviews
AI Review Workflow->>Kimi Reusable WF: Call reusable workflow
Kimi Reusable WF->>Kimi API: Request review
Kimi API-->>Kimi Reusable WF: Return review
Kimi Reusable WF->>GitHub: Post review comment
and
AI Review Workflow->>Codex Reusable WF: Call reusable workflow
Codex Reusable WF->>OpenAI API: Request review
OpenAI API-->>Codex Reusable WF: Return review
Codex Reusable WF->>GitHub: Post review comment
and
AI Review Workflow->>Claude Reusable WF: Call reusable workflow
Claude Reusable WF->>Anthropic API: Request review
Anthropic API-->>Claude Reusable WF: Return review
Claude Reusable WF->>GitHub: Post review comment
end
GitHub-->>User: Display review comments
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.
1 file reviewed, 3 comments
| pull_request: | ||
| types: [opened, ready_for_review] |
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.
Missing synchronize trigger - old workflows ran on PR updates (synchronize), this only runs on opened and ready_for_review
| 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.| name: AI Code Review | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, ready_for_review] | ||
| issue_comment: | ||
| types: [created] |
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.
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 }} |
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.
Consider adding concurrency control to cancel in-progress runs when new commits are pushed, preventing wasted API credits:
| 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.
Summary
/kimi,/codex,/claudecommandsChanges
.github/workflows/ai-review.yml- unified workflow using lambdaclass/actions@v1.github/prompts/pr_review.md→ai-review.mdpr_review_chatgpt.yaml,pr_review_claude.yaml,pr_review_kimi.yamlTest plan
/kimi,/codex,/claude)