Closes #20003: Introduce mechanism to register callbacks for webhook context (#20025)
Some checks are pending
CI / build (20.x, 3.10) (push) Waiting to run
CI / build (20.x, 3.11) (push) Waiting to run
CI / build (20.x, 3.12) (push) Waiting to run

* Closes #20003: Introduce mechanism to register callbacks for webhook context

* Swap ContentType with ObjectType

* Add plugin dev documentation for webhook callbacks

* Fix tests

* Add note about namespacing webhook data
This commit is contained in:
Jeremy Stretch
2025-08-07 16:28:53 -04:00
committed by GitHub
parent 33d891e67b
commit 37d6c160b9
10 changed files with 153 additions and 25 deletions

View File

@@ -136,7 +136,7 @@ def handle_changed_object(sender, instance, **kwargs):
# Enqueue the object for event processing
queue = events_queue.get()
enqueue_event(queue, instance, request.user, request.id, event_type)
enqueue_event(queue, instance, request, event_type)
events_queue.set(queue)
# Increment metric counters
@@ -220,7 +220,7 @@ def handle_deleted_object(sender, instance, **kwargs):
# Enqueue the object for event processing
queue = events_queue.get()
enqueue_event(queue, instance, request.user, request.id, OBJECT_DELETED)
enqueue_event(queue, instance, request, OBJECT_DELETED)
events_queue.set(queue)
# Increment metric counters