From c821612970388f51a7be302a2eee638d2a52735f Mon Sep 17 00:00:00 2001 From: Nick Vissari Date: Thu, 22 Jul 2021 12:47:02 -0400 Subject: [PATCH] Send json list of data returned from hooks --- github_webhook/webhook.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/github_webhook/webhook.py b/github_webhook/webhook.py index f4ca352..3f1a3d4 100644 --- a/github_webhook/webhook.py +++ b/github_webhook/webhook.py @@ -84,10 +84,11 @@ def _postreceive(self): self._logger.info("%s (%s)", _format_event(event_type, data), _get_header("X-Github-Delivery")) + return_data = [] for hook in self._hooks.get(event_type, []): - hook(data) + return_data.append(hook(data)) - return "", 204 + return json.dumps(return_data), 200 def _get_header(key):