Skip to content

feat(review): add configurable review trigger modes (ownPrsOnly, externalPrs, onReviewRequested)#491

Merged
zbigniewsobiecki merged 3 commits intodevfrom
feature/review-trigger-modes
Feb 22, 2026
Merged

feat(review): add configurable review trigger modes (ownPrsOnly, externalPrs, onReviewRequested)#491
zbigniewsobiecki merged 3 commits intodevfrom
feature/review-trigger-modes

Conversation

@aaight
Copy link
Copy Markdown
Collaborator

@aaight aaight commented Feb 22, 2026

Summary

This PR implements configurable review trigger modes for the CASCADE review agent, replacing the previous flat boolean toggles with a structured reviewTrigger config object.

  • New reviewTrigger config with three independent modes: ownPrsOnly, externalPrs, onReviewRequested
  • Mode-aware CheckSuiteSuccessTrigger: now supports triggering review for both implementer PRs and external contributor PRs
  • Updated ReviewRequestedTrigger: uses resolveReviewTriggerConfig().onReviewRequested with full legacy fallback
  • Full backward compatibility: resolveReviewTriggerConfig() maps legacy booleans to the new structure — existing projects are unaffected
  • Dashboard: updated trigger-agent-mapping.ts with three nested reviewTrigger.* toggles replacing flat ones
  • New CLI command: cascade projects review-trigger-set <id> --own-prs-only --external-prs --on-review-requested
  • Tests: 83 tests passing — added 24 new tests covering all modes, legacy fallback, and backward compat

Card: 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

  • Unit tests for resolveReviewTriggerConfig() — defaults, legacy fallback, new config precedence
  • Unit tests for CheckSuiteSuccessTrigger — all mode/author combinations (ownPrsOnly, externalPrs, both, none)
  • Unit tests for ReviewRequestedTrigger — new config style, precedence over legacy, legacy still working
  • TypeScript type check passes
  • Lint passes (no new errors)
  • Manual: Use dashboard to toggle review trigger modes
  • Manual: Use CLI review-trigger-set to update modes
  • Manual: Set externalPrs: true, open external PR, verify review triggers on CI pass

🤖 Generated with Claude Code

@nhopeatall
Copy link
Copy Markdown
Collaborator

🔍 Reviewing PR...

Copy link
Copy Markdown
Collaborator

@nhopeatall nhopeatall left a comment

Choose a reason for hiding this comment

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

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.

@zbigniewsobiecki zbigniewsobiecki merged commit c81ab70 into dev Feb 22, 2026
5 checks passed
@zbigniewsobiecki zbigniewsobiecki deleted the feature/review-trigger-modes branch March 16, 2026 16:43
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.

3 participants