From 8ef4c37275de16be1f81b6e7841d744cc1748b79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Gr=C3=BCner?= <47506558+MegaRedHand@users.noreply.github.com> Date: Tue, 3 Nov 2026 11:16:20 -0300 Subject: [PATCH] ci: add DeepSeek, Gemini and Grok AI reviewers and bump lambdaclass/actions lambdaclass/actions v1 now ships DeepSeek, Gemini and Grok reviewers, a /review command that triggers every reviewer, and a Claude reviewer that is one Messages API call instead of an agent run. Pin all six to the commit v1 points at, as the rest of our actions are pinned. Each job now starts on a comment only when it begins with its own command or /review, so an ordinary PR comment no longer spawns one skipped run per reviewer. The token is narrowed to contents: read and pull-requests: write, which is all the called workflows use; the repo default grants write to everything. DeepSeek, Gemini and Grok need DEEPSEEK_API_KEY, GEMINI_API_KEY and XAI_API_KEY; until those secrets exist, each comments and fails its check. --- .github/workflows/ai-review.yml | 64 +++++++++++++++++++++++++++------ 1 file changed, 54 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ai-review.yml b/.github/workflows/ai-review.yml index f05531518..a9e7b1629 100644 --- a/.github/workflows/ai-review.yml +++ b/.github/workflows/ai-review.yml @@ -2,14 +2,18 @@ # # Triggers: # - Automatically on PR open/ready_for_review -# - On-demand via PR comments: /kimi, /codex, /claude (requires write access) +# - On-demand via PR comments (requires write access): +# /review for every reviewer below, or /kimi, /codex, /claude, /deepseek, /gemini, /grok for one # -# Custom prompt: .github/prompts/ai-review.md +# Custom prompt: .github/prompts/ai-review.md (read from the PR's base branch) # -# Required secrets: -# - KIMI_API_KEY: For Kimi reviews (https://platform.moonshot.ai/) +# Required secrets (a reviewer whose secret is missing comments and fails its check): +# - KIMI_API_KEY: For Kimi reviews (https://platform.kimi.ai/) # - OPENAI_API_KEY: For Codex reviews (https://platform.openai.com/) # - ANTHROPIC_API_KEY: For Claude reviews (https://console.anthropic.com/) +# - DEEPSEEK_API_KEY: For DeepSeek reviews (https://platform.deepseek.com/) +# - GEMINI_API_KEY: For Gemini reviews (https://aistudio.google.com/apikey) +# - XAI_API_KEY: For Grok reviews (https://console.x.ai/) name: AI Code Review @@ -19,21 +23,61 @@ on: issue_comment: types: [created] +permissions: + contents: read + pull-requests: write + jobs: kimi-review: - if: github.event_name == 'issue_comment' || github.event.pull_request.draft == false - uses: lambdaclass/actions/.github/workflows/ai-review-kimi.yml@212745563f1482299f563a3eb97909953df2a201 # v1 + if: > + (github.event_name == 'pull_request' && github.event.pull_request.draft == false) || + (github.event_name == 'issue_comment' && + (startsWith(github.event.comment.body, '/kimi') || startsWith(github.event.comment.body, '/review'))) + uses: lambdaclass/actions/.github/workflows/ai-review-kimi.yml@ad22254d36dc2038b846f82045d6b9d9fd7605aa # v1 secrets: KIMI_API_KEY: ${{ secrets.KIMI_API_KEY }} codex-review: - if: github.event_name == 'issue_comment' || github.event.pull_request.draft == false - uses: lambdaclass/actions/.github/workflows/ai-review-codex.yml@212745563f1482299f563a3eb97909953df2a201 # v1 + if: > + (github.event_name == 'pull_request' && github.event.pull_request.draft == false) || + (github.event_name == 'issue_comment' && + (startsWith(github.event.comment.body, '/codex') || startsWith(github.event.comment.body, '/review'))) + uses: lambdaclass/actions/.github/workflows/ai-review-codex.yml@ad22254d36dc2038b846f82045d6b9d9fd7605aa # v1 secrets: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} claude-review: - if: github.event_name == 'issue_comment' || github.event.pull_request.draft == false - uses: lambdaclass/actions/.github/workflows/ai-review-claude.yml@212745563f1482299f563a3eb97909953df2a201 # v1 + if: > + (github.event_name == 'pull_request' && github.event.pull_request.draft == false) || + (github.event_name == 'issue_comment' && + (startsWith(github.event.comment.body, '/claude') || startsWith(github.event.comment.body, '/review'))) + uses: lambdaclass/actions/.github/workflows/ai-review-claude.yml@ad22254d36dc2038b846f82045d6b9d9fd7605aa # v1 secrets: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} + + deepseek-review: + if: > + (github.event_name == 'pull_request' && github.event.pull_request.draft == false) || + (github.event_name == 'issue_comment' && + (startsWith(github.event.comment.body, '/deepseek') || startsWith(github.event.comment.body, '/review'))) + uses: lambdaclass/actions/.github/workflows/ai-review-deepseek.yml@ad22254d36dc2038b846f82045d6b9d9fd7605aa # v1 + secrets: + DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }} + + gemini-review: + if: > + (github.event_name == 'pull_request' && github.event.pull_request.draft == false) || + (github.event_name == 'issue_comment' && + (startsWith(github.event.comment.body, '/gemini') || startsWith(github.event.comment.body, '/review'))) + uses: lambdaclass/actions/.github/workflows/ai-review-gemini.yml@ad22254d36dc2038b846f82045d6b9d9fd7605aa # v1 + secrets: + GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} + + grok-review: + if: > + (github.event_name == 'pull_request' && github.event.pull_request.draft == false) || + (github.event_name == 'issue_comment' && + (startsWith(github.event.comment.body, '/grok') || startsWith(github.event.comment.body, '/review'))) + uses: lambdaclass/actions/.github/workflows/ai-review-grok.yml@ad22254d36dc2038b846f82045d6b9d9fd7605aa # v1 + secrets: + XAI_API_KEY: ${{ secrets.XAI_API_KEY }}