-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Webhook #591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Webhook #591
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Caution Review failedThe pull request is closed. WalkthroughThis pull request introduces webhook functionality into the system. A new Changes
Sequence Diagram(s)sequenceDiagram
participant C as Client
participant WC as WebhookController
participant WS as WebhooksService
participant WR as WebhooksRepository
participant DB as Database
C->>WC: POST /webhooks (payload)
WC->>WS: createAWebhook(org, body)
WS->>WR: createWebhook(org, body)
WR->>DB: Upsert webhook record
DB-->>WR: Confirmation
WR-->>WS: Return created webhook
WS-->>WC: Return success response
WC-->>C: HTTP 200 OK
sequenceDiagram
participant P as PostsController
participant WS as WebhooksService
participant BQ as BullMqClient
participant WH as ExternalWebhook
P->>WS: webhooks(data: {org, since})
WS->>BQ: Schedule digest/webhook job
loop For each webhook
WS->>WH: POST notification with filtered posts
WH-->>WS: Acknowledgement (or error logged)
end
Possibly related PRs
Poem
Tip 🌐 Web search-backed reviews and chat
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (21)
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
| @@ -0,0 +1,245 @@ | |||
| import React, { FC, Fragment, useCallback, useMemo, useState } from 'react'; | |||
Check warning
Code scanning / ESLint
Disallow unused variables Warning
|
|
||
| const list = useCallback(async () => { | ||
| return (await fetch('/webhooks')).json(); | ||
| }, []); |
Check warning
Code scanning / ESLint
verifies the list of dependencies for Hooks like useEffect and similar Warning
| children: <AddOrEditWebhook data={data} reload={mutate} />, | ||
| }); | ||
| }, | ||
| [] |
Check warning
Code scanning / ESLint
verifies the list of dependencies for Hooks like useEffect and similar Warning
| toaster.show('Webhook deleted successfully', 'success'); | ||
| } | ||
| }, | ||
| [] |
Check warning
Code scanning / ESLint
verifies the list of dependencies for Hooks like useEffect and similar Warning
|
|
||
| const integration = useCallback(async () => { | ||
| return (await fetch('/integrations/list')).json(); | ||
| }, []); |
Check warning
Code scanning / ESLint
verifies the list of dependencies for Hooks like useEffect and similar Warning
| const findValue = options.find( | ||
| (option) => option.value === e.target.value | ||
| )!; |
Check warning
Code scanning / ESLint
Disallow non-null assertions using the `!` postfix operator Warning
| form.setValue('integrations', []); | ||
| } | ||
| }, | ||
| [] |
Check warning
Code scanning / ESLint
verifies the list of dependencies for Hooks like useEffect and similar Warning
| modal.closeAll(); | ||
| reload(); | ||
| }, | ||
| [data, integrations] |
Check warning
Code scanning / ESLint
verifies the list of dependencies for Hooks like useEffect and similar Warning
|
Really nice work! |
Webhook feature
Summary by CodeRabbit
New Features
Enhancements