Skip to content

feat: [five-c] AboutCode app for alerts and notifications#551

Merged
tdruez merged 14 commits into
mainfrom
5c-notifications
Jul 6, 2026
Merged

feat: [five-c] AboutCode app for alerts and notifications#551
tdruez merged 14 commits into
mainfrom
5c-notifications

Conversation

@tdruez

@tdruez tdruez commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Issues

Issue: #412

Changes

django-rest-hooks removal

  • Removed the django-rest-hooks dependency and all related configuration (HOOK_FINDER, HOOK_DELIVERER, HOOK_EVENTS, HOOK_ENV settings).
  • Removed the legacy Webhook model and replaced it with WebhookSubscription and WebhookDelivery.
  • Existing webhook records are migrated to the new model via a data migration.

aboutcode/notifications module

  • Added a new aboutcode/notifications module with AbstractWebhookSubscription, AbstractWebhookDelivery, and WebhookSubscriptionQuerySetMixin as reusable abstract bases.
  • The delivery logic now lives in the abstract, making it available to other projects (e.g. ScanCode.io) without duplication.

Webhook models

  • WebhookSubscription replaces the old Webhook model. The target field is renamed to target_url, and extra_payload/extra_headers are retained.
  • WebhookDelivery records each delivery attempt with the payload sent, HTTP status code, response text, and any errors.
  • Delivery is now fully async via RQ. Each fire_webhooks() call enqueues a deliver_webhook_task per matching subscription.
  • WEBHOOK_EVENTS is now defined in notification/models.py rather than settings.
  • The HOOK_ENV setting is renamed to DEJACODE_WEBHOOK_ENV, with backward compatibility for deployments still using the old name.

Admin

  • Added a read-only inline showing the 10 most recent deliveries when editing a subscription, with sent_date, response_status_code, and delivery_error.

Screens

Screenshot 2026-07-06 at 15 02 10

Signed-off-by: tdruez <tdruez@aboutcode.org>
@tdruez tdruez changed the title feat: add aboutcode app for notifications feat: [five-c] AboutCode app for alerts and notifications Jul 1, 2026
Signed-off-by: tdruez <tdruez@aboutcode.org>
Comment thread workflow/models.py Fixed
Comment thread workflow/models.py Fixed
tdruez added 12 commits July 3, 2026 17:51
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
@tdruez tdruez merged commit 0e6951a into main Jul 6, 2026
8 checks passed
@tdruez tdruez deleted the 5c-notifications branch July 6, 2026 12:24
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.

2 participants