RBGateway -Preliminary architecture for supporting webhooks
Review Request #8112 — Created April 10, 2016 and discarded — Latest diff uploaded
Preliminary architecture for supporting webhooks
New webhook.go - defines the structure and interface for a webhook. Almost a carbon copy of webhook spec from here but with some getters and setters.
New events.go - a combinations of reviewboard's reviewboard.reviews.signals and django's django.dispatch.signal, it defines a global of all the events that rb-gateway supports.
routes.go - added 2 new api routes. 1 for registering a new webhook and 1 for accessing/editing webhooks.
config.json - supports new config keys for defining webhooks
util.go - added new functions for creating webhooks and editing them
None yet but what is planned:
webhook_test.go
Test notify in webhook
Test get json in webhook
Test getters/settersutil_test.go
Test webhook/event/repo portion of TestLoadConfig in util_test.go
Test register webhook in util
Test delete webhook in util
Test save webhook in util
Test refresh config in utilevents_test.go
Test get receivers
Test send
Test subscribe/unsubscribe