feat(review): add configurable review trigger modes (ownPrsOnly, externalPrs, onReviewRequested)#491
Conversation
Merge dev to main
Merge dev to main
…rnalPrs, onReviewRequested)
|
🔍 Reviewing PR... |
nhopeatall
left a comment
There was a problem hiding this comment.
Summary
Clean, well-designed implementation. The new reviewTrigger config object with three independent modes is a good replacement for the flat boolean toggles — it's more expressive and the legacy fallback in resolveReviewTriggerConfig() ensures backward compatibility.
All 83 tests pass. Code is correct, the resolveReviewTriggerConfig resolution logic is sound, and the trigger handlers properly use the new config. CI passes.
One minor note (not blocking): The ReviewTriggerConfigSchema JSDoc for externalPrs says "Trigger review for PRs authored by anyone (not just the implementer)" which reads as if it includes the implementer, but the actual code (!isImplementerPR) correctly excludes implementer PRs when only externalPrs is enabled. The dashboard description is clearer. Consider rewording the schema JSDoc to "Trigger review for PRs authored by external contributors (anyone other than the implementer)" for consistency with the code behavior.
Summary
This PR implements configurable review trigger modes for the CASCADE review agent, replacing the previous flat boolean toggles with a structured
reviewTriggerconfig object.reviewTriggerconfig with three independent modes:ownPrsOnly,externalPrs,onReviewRequestedresolveReviewTriggerConfig().onReviewRequestedwith full legacy fallbackresolveReviewTriggerConfig()maps legacy booleans to the new structure — existing projects are unaffectedtrigger-agent-mapping.tswith three nestedreviewTrigger.*toggles replacing flat onescascade projects review-trigger-set <id> --own-prs-only --external-prs --on-review-requestedCard: https://trello.com/c/oihsM1um/77-we-should-make-our-review-agent-have-configurable-toggles-for-triggering-a-only-on-own-created-by-implementer-token-prs-b-trigge
Test plan
resolveReviewTriggerConfig()— defaults, legacy fallback, new config precedenceCheckSuiteSuccessTrigger— all mode/author combinations (ownPrsOnly, externalPrs, both, none)ReviewRequestedTrigger— new config style, precedence over legacy, legacy still workingreview-trigger-setto update modesexternalPrs: true, open external PR, verify review triggers on CI pass🤖 Generated with Claude Code