-
-
-
You know, what would be cool is if this could allow for custom event types that extensions could provide as well.
Not necessary right now, but food for thought.
-
-
This should explicitly call SiteConfiguration.objects.get_current(), to take advantage of caching and invalidation.
-
I wonder if we should just fork that and stick it into Djblets. Otherwise, poor Stephen's got another package he'll have to maintain :)
At the very least, we should give him a heads up. Want to add him as a reviewer?
Add a new webhooks framework and port over the review request published hook.
Review Request #6014 — Created June 21, 2014 and submitted
This change adds a new webhooks framework which obsoletes the rbwebhooks
extension. As more and more web services start integrating with each other,
it's becoming more expected that these sorts of facilities will be in the core
product.The payloads for events piggy-back on the WebAPI's serialization routines. This
means that we get all the relevant data, as well as the links for each
resource. This makes the payload for the webhook much more useful than it was
in the extension.Additionally, there's an X-ReviewBoard-Event header which lists the event name,
and an X-ReviewBoard-Signature header which is an HMAC signature of the
payload. If the webhook is configured with a 'secret', that secret is used as
the key for the HMAC digest.This new framework currently implements the
review_request_published
event.
Implementation for the others will come once this is approved.
Set up a webhook to point to requestb.in and published a review request.
Checked the request bin and saw the expected JSON payload with valid links, as
well as the correct headers.
- Commit:
-
97dac101b123f9d6535a04142ba374df1f31b79cca756eac11c13a08ae562980f548c379d769fad2
-
Tool: Pyflakes Processed Files: reviewboard/notifications/webhooks.py reviewboard/notifications/models.py reviewboard/notifications/__init__.py setup.py reviewboard/notifications/admin.py Tool: PEP8 Style Checker Processed Files: reviewboard/notifications/webhooks.py reviewboard/notifications/models.py reviewboard/notifications/__init__.py setup.py reviewboard/notifications/admin.py Tool: PEP8 Style Checker Processed Files: reviewboard/notifications/webhooks.py reviewboard/notifications/models.py reviewboard/notifications/__init__.py setup.py reviewboard/notifications/admin.py Tool: Pyflakes Processed Files: reviewboard/notifications/webhooks.py reviewboard/notifications/models.py reviewboard/notifications/__init__.py setup.py reviewboard/notifications/admin.py