ci: scope auto-review to PR submission events (drop synchronize)#100
Merged
Conversation
The claude-code-review.yml workflow previously ran on every push to a PR branch (synchronize event), which burned Claude usage tokens on every iteration of a long-lived PR. Trim the trigger to submission-only events: opened — first PR submission ready_for_review — draft promoted to ready reopened — closed PR resubmitted One auto-review per submission; subsequent commits skip. Re-trigger manually by `@claude` mention (claude.yml) or by closing + reopening the PR. Updates REVIEW_GUIDELINES.md to document the new cadence.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
claude-code-review.ymlworkflow previously triggered onsynchronize— i.e., every push to a PR branch. On a long-lived PR with many iterative commits, that consumed Claude usage tokens far beyond what's useful (only the final state matters for a review). Trim the trigger to PR submission events only.What changed
.github/workflows/claude-code-review.yml— replacedtypes: [opened, synchronize, ready_for_review, reopened]withtypes: [opened, ready_for_review, reopened]. Added inline comments explaining the rationale and how to re-trigger manually..github/REVIEW_GUIDELINES.md— updated the workflow description to reflect the new cadence (auto-review fires on submission events only, not on every push).Behavior matrix
synchronize)@claudementionclaude.yml(unchanged)claude.yml(unchanged)Net: one auto-review per submission. Re-trigger by
@claudemention or close+reopen.Test plan
python3 -c "import yaml; yaml.safe_load(open('.github/workflows/claude-code-review.yml'))"parses clean['opened', 'ready_for_review', 'reopened']—synchronizeabsent@claude reviewmention still triggers viaclaude.yml