fix(web): apply all event types when updating a webhook - #9620
fix(web): apply all event types when updating a webhook#9620Khizarshah01 wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe webhook update handler now accepts an event type. It enables all supported events for ChangesWebhook event handling
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This localized fix makes the webhook update form apply the selected event mode correctly; no actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Pull request overview
Fixes webhook editing so that selecting “Send me everything” (All events) correctly updates the webhook’s event flags on the backend, matching the behavior already used during webhook creation.
Changes:
- Update
handleUpdateWebhookto acceptwebhookEventTypefromWebhookFormsubmission. - Build the update payload so that selecting
"all"forces all per-event flags totrue; otherwise, use the individual checkbox values (defaulting undefined tofalse).
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Description
When editing an existing webhook in Settings, selecting the "Send me everything" (All events) radio button and saving the form did not actually update the backend. Instead, it ignored the radio button selection and sent the previous individual boolean values from the checkboxes.
This happened because
handleUpdateWebhookinside page.tsx did not accept thewebhookEventTypeparameter that theWebhookFormcomponent was passing to it on submit.This PR fixes the issue by updating
handleUpdateWebhookto match the exact logic already used during Webhook creation: it now correctly acceptswebhookEventTypeand overrides the payload to set all individual event flags to true when "Send me everything" is selected.Type of Change
Screenshots and Media (if applicable)
Before
Screen.Recording.2026-08-15.at.12.35.33.PM.mov
After
Screen.Recording.2026-08-15.at.12.38.13.PM.mov
Test Scenarios
References
Summary by CodeRabbit