feat: Add the result type returned by a value feedback's callback to the value feedback's schema - #258
feat: Add the result type returned by a value feedback's callback to the value feedback's schema#258jswalden wants to merge 1 commit into
Conversation
|
Warning Review limit reached
Next review available in: 31 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe feedback API now uses discriminated schema interfaces. Value feedback definitions accept a generic JSON-compatible result type. ChangesFeedback typing
Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Are you sure? This callback works correctly for me with this schema. This is with me running And if I change the callback to return
That said, in further testing (further down in that demonstration, even) I've noticed one semi-debatable "lapse" here: if you want to implement a value feedback to delegate to a variable: // Delegate to the MSB/LSB-specified level variable.
return `$(${instance.label}:level_${MSB}.${LSB})`then of course TypeScript will only understand this as your feedback returning a string, even if the variable you're delegating to will not be a string. (In this case it's |
c4c98a8 to
d2645b5
Compare
…the value feedback's schema.
d2645b5 to
b9c1685
Compare


Anyone defining a value feedback schema is going to be compelled by this change to add some appropriate
result: Tto all their value feedback schemas, when they upgrade from~2.1.0to~2.2.0. Seems like this should be equally as fine as the change in 2.1.0 to requireoptionsToMonitorForSubscribeon actions, right?I didn't actually attempt to test this, only relied on my intrinsic TypeScript/etc. understandings.
Summary by CodeRabbit