Skip to content

ci: stop re-running Claude review on same-commit PR events#77

Merged
emmax86 merged 1 commit into
mainfrom
ci/skip-redundant-review-runs
Jun 16, 2026
Merged

ci: stop re-running Claude review on same-commit PR events#77
emmax86 merged 1 commit into
mainfrom
ci/skip-redundant-review-runs

Conversation

@emmax86

@emmax86 emmax86 commented Jun 16, 2026

Copy link
Copy Markdown
Owner

What

Narrow the Claude Code Review workflow's pull_request trigger from
[opened, synchronize, ready_for_review, reopened] to [opened, synchronize].

Why

ready_for_review (draft → ready) and reopened both 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.

opened and synchronize are the only events that correspond to a new or changed commit, so they're sufficient. Behavior preserved:

  • Drafts are still reviewed — on open and on every push.
  • Switching a PR back to draft was already a no-op (converted_to_draft was 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

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>
@emmax86 emmax86 merged commit 9ea63a3 into main Jun 16, 2026
3 of 4 checks passed
@emmax86 emmax86 deleted the ci/skip-redundant-review-runs branch June 16, 2026 05:05

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant