Skip to content

fix(api): dedupe supported webhook event types into one constant#384

Merged
duyet merged 1 commit into
mainfrom
fix/webhook-events-dedup
Jul 17, 2026
Merged

fix(api): dedupe supported webhook event types into one constant#384
duyet merged 1 commit into
mainfrom
fix/webhook-events-dedup

Conversation

@duyet

@duyet duyet commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Fixes #378

WEBHOOK_EVENT_TYPES (validation.ts) and WEBHOOK_EVENTS (webhook.ts) were two independent copies of the same list. Collapsed to one source of truth — webhook.ts now imports from validation.ts.

Test plan

  • bunx tsc --noEmit
  • bunx vitest run test/webhooks.test.ts test/webhook-retry.test.ts (40 passed)
  • bunx biome check

validation.ts and webhook.ts each declared their own copy of the
supported webhook event list; adding a new event to only one would
silently split validation from delivery. webhook.ts now imports
WEBHOOK_EVENT_TYPES from validation.ts instead of redeclaring it.

Fixes #378

Co-Authored-By: Duyet Le <me@duyet.net>
Co-Authored-By: duyetbot <bot@duyet.net>
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry @duyet, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@duyet, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 47 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 26bbf4e1-eb9f-4194-a478-32d34181574a

📥 Commits

Reviewing files that changed from the base of the PR and between bc0b32a and b1bd676.

📒 Files selected for processing (1)
  • packages/api/src/lib/webhook.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/webhook-events-dedup

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@duyet
duyet merged commit 7bb8640 into main Jul 17, 2026
6 checks passed
@duyet
duyet deleted the fix/webhook-events-dedup branch July 17, 2026 06:35
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.

[api] Supported webhook events constant is duplicated across validation.ts and webhook.ts

1 participant