feat: Add webhook notifications for scan completion (Slack, Discord, …#393
feat: Add webhook notifications for scan completion (Slack, Discord, …#393Somil450 wants to merge 5 commits into
Conversation
utksh1
left a comment
There was a problem hiding this comment.
Thanks for the feature work here. I’m not merging this version yet.\n\nRequested changes:\n- Remove the unrelated generated file from this PR. A 3000+ line repository dump should not be bundled into a webhook feature change.\n- Fix the failing CI jobs: and .\n- Keep focused. Right now it shows broad churn for a small schema addition, which makes review harder and increases regression risk.\n- Add the webhook tests in the project’s normal backend test location/pattern and make sure they cover payload formatting plus failure/retry handling.\n\nThe feature itself is useful, but the patch needs to be tighter and pass CI before it can be approved.
|
Hi @utksh1, thanks for the review! I've removed the extraneous issues.json file, cleaned up the formatting in routes.py and models.py to keep the diff strictly focused on the webhook feature, and properly integrated the test cases into testing/backend/unit/test_webhooks.py with full coverage for payload formatting and retry handling. The CI checks should be passing now! |
utksh1
left a comment
There was a problem hiding this comment.
Re-reviewed latest state. This branch is now conflicting and still has too much unrelated surface for a webhook notification feature, including requirements/model/settings/plugin metadata churn. Please rebase, keep the diff focused on server-side webhook configuration/delivery, and add backend tests for payload formatting, delivery failure, and retry/error handling.
Description
Resolves #375
This PR introduces automated webhook notifications (Slack, Discord, and Custom JSON endpoints) that trigger upon scan completion, removing the need for users to manually monitor the dashboard for long-running tasks.
Changes Included
/api/v1/settings/webhooksendpoints to persist webhook configurations securely in the SQLitesettingstable (making them available for backgroundexecutortasks).notifications.pyto construct payloads for Discord and Slack, leveraginghttpxand an exponential backoff retry mechanism for reliability.notify_scan_completioninexecutor.pyto fire asynchronously at the end of every task execution.httpx>=0.28.1torequirements.txtfor asynchronous webhook requests.Verification