feat: filter webhooks per project, board, and account
Adds optional project, board, and acting-user scope to each webhook so events from a specific board or project can be routed to a single endpoint without an external automation tool in the middle (closes #1457). A webhook now fires for an event only when every set scope matches: empty scope still means "fire for everything", keeping existing webhooks working unchanged. Scope filtering is centralized in the sendWebhooks helper, which auto-derives projectId/boardId from the event payload, so existing call sites are untouched.
This commit is contained in:
@@ -15,6 +15,9 @@ import styles from './WebhooksPane.module.scss';
|
||||
|
||||
const WebhooksPane = React.memo(() => {
|
||||
const webhookIds = useSelector(selectors.selectWebhookIds);
|
||||
const projects = useSelector(selectors.selectProjects);
|
||||
const boards = useSelector(selectors.selectBoards);
|
||||
const users = useSelector(selectors.selectUsers);
|
||||
|
||||
const dispatch = useDispatch();
|
||||
|
||||
@@ -27,7 +30,13 @@ const WebhooksPane = React.memo(() => {
|
||||
|
||||
return (
|
||||
<Tab.Pane attached={false} className={styles.wrapper}>
|
||||
<Webhooks ids={webhookIds} onCreate={handleCreate} />
|
||||
<Webhooks
|
||||
ids={webhookIds}
|
||||
projects={projects}
|
||||
boards={boards}
|
||||
users={users}
|
||||
onCreate={handleCreate}
|
||||
/>
|
||||
</Tab.Pane>
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user