Currently plugin authors are given a broad handle in processing incoming webhook requests. This requires the plugin author to understand a bunch of stuff about how metagov-core works, which might not be ideal. This issue suggests chunking up webhook handling into smaller pieces, and give the control back to the core. The core can then delegate each piece back to whichever handlers are defined by the plugin author.
Create some kind of middleware chain so plugin authors can hook in handlers for...
Routing incoming "global" requests to the correct Plugin instance (relevant for Slack, Github, Discord). (Currently happens on a per-platform basis in handle_incoming_webhook handler, example)
Currently plugin authors are given a broad handle in processing incoming webhook requests. This requires the plugin author to understand a bunch of stuff about how metagov-core works, which might not be ideal. This issue suggests chunking up webhook handling into smaller pieces, and give the control back to the core. The core can then delegate each piece back to whichever handlers are defined by the plugin author.
Create some kind of middleware chain so plugin authors can hook in handlers for...
handle_incoming_webhook
handler, example)*Look at how this works when authoring a Zapier app..