Conversation
Gate the ai-review jobs on `draft == false` so Kimi/Codex/Claude only run once a PR is actually open for review. PRs opened directly as non-draft still fire the `opened` event; draft → ready transitions fire `ready_for_review`. Issue-comment triggers (`/kimi`, `/codex`, `/claude`) are unaffected.
🤖 Kimi Code ReviewThis change correctly prevents AI review jobs from running on draft pull requests while preserving the ability to trigger reviews via issue comments. The short-circuit evaluation in the condition ( Verdict: LGTM. The logic is sound and the implementation follows GitHub Actions best practices. Automated review by Kimi (Moonshot AI) · kimi-k2.5 · custom prompt |
🤖 Codex Code ReviewNo findings. The change in ai-review.yml and the equivalent guards at ai-review.yml and ai-review.yml looks correct: automatic review jobs are skipped for draft PRs on Residual risk is minimal and operational rather than code-level: this relies on the reusable review workflows continuing to handle Automated review by OpenAI Codex · gpt-5.4 · custom prompt |
Greptile SummaryAdds Confidence Score: 5/5Safe to merge — the condition logic is correct and handles all documented trigger scenarios. Single-file CI change with no P0/P1 findings. The No files require special attention.
|
| Filename | Overview |
|---|---|
| .github/workflows/ai-review.yml | Adds if guards to all three AI review jobs to skip execution on draft PRs, while preserving issue_comment triggers and ready_for_review behavior. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Workflow triggered] --> B{Event type?}
B -->|issue_comment| C[Run AI review jobs]
B -->|pull_request| D{PR is draft?}
D -->|Yes - opened as draft| E[Skip all AI review jobs]
D -->|No - opened as non-draft| C
B -->|pull_request - ready_for_review| F["draft == false at event time"]
F --> C
C --> G[kimi-review]
C --> H[codex-review]
C --> I[claude-review]
Reviews (1): Last reviewed commit: "ci: skip AI review on draft PRs" | Re-trigger Greptile
Summary
ai-review.ymljobs ongithub.event.pull_request.draft == falseso Kimi/Codex/Claude reviews only run once a PR is actually up for review.types: [opened, ready_for_review]so PRs opened directly as non-draft still trigger (onlyopenedfires in that case;ready_for_reviewfires on draft → ready)./kimi,/codex,/claude) are preserved viagithub.event_name == 'issue_comment'in the gate.Test plan
ready_for_reviewevent./claude(or/kimi,/codex) on any PR — the corresponding job still runs.