ci: stop re-running Claude review on same-commit PR events#77
Conversation
Drop ready_for_review and reopened from the Claude Code Review workflow triggers. Both fire on the same HEAD SHA as the prior run, so they re-reviewed an identical diff — a full review pass spent on no new code. Drafts are still reviewed, on open and on each push, via opened/synchronize. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0271b69e6b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # reopen transitions fire on the same HEAD SHA as the prior run, so | ||
| # reviewing them again just re-reviews an identical diff. Drafts are | ||
| # still reviewed (on open and on each push). | ||
| types: [opened, synchronize] |
There was a problem hiding this comment.
Keep reopened reviews for changed closed PRs
When a PR is closed, collaborators can still push new commits to its head branch and then reopen it; that reopen emits a pull_request reopened activity rather than an opened event, and there may have been no synchronize run while the PR was closed. With the workflow now limited to opened and synchronize, that reopened PR can either merge with no Claude review for the new HEAD or remain blocked by a missing required check, so reopened still needs to be included or handled with a same-SHA guard.
Useful? React with 👍 / 👎.
What
Narrow the
Claude Code Reviewworkflow'spull_requesttrigger from[opened, synchronize, ready_for_review, reopened]to[opened, synchronize].Why
ready_for_review(draft → ready) andreopenedboth fire on the same HEAD SHA as the prior run, so they triggered a full Claude review of an identical diff — spending a complete review pass (and its cost) on no new code.openedandsynchronizeare the only events that correspond to a new or changed commit, so they're sufficient. Behavior preserved:converted_to_draftwas never a trigger).Net effect: a review runs once per commit, never re-running on draft↔ready or reopen transitions that don't change the code.
🤖 Generated with Claude Code