aboutsummaryrefslogtreecommitdiff
path: root/modules/git_webhooks/__init__.py
diff options
context:
space:
mode:
authorGravatar jesopo2019-10-15 16:04:21 +0100
committerGravatar jesopo2019-10-15 16:04:30 +0100
commitbe30cb81af8336c50b9fd0b92723a89159b6b280 (patch)
tree6b76cd7daa49cdca32af3c55938aa89995cd79b1 /modules/git_webhooks/__init__.py
parentmove cve.py to bitbot-modules repo (diff)
signature
add first draft of gitlab webhook support
Diffstat (limited to 'modules/git_webhooks/__init__.py')
-rw-r--r--modules/git_webhooks/__init__.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/git_webhooks/__init__.py b/modules/git_webhooks/__init__.py
index f2dd1f82..a3c3317b 100644
--- a/modules/git_webhooks/__init__.py
+++ b/modules/git_webhooks/__init__.py
@@ -38,6 +38,11 @@ class Module(ModuleManager.BaseModule):
return self._webhook("gitea", "Gitea", self._gitea,
event["data"], event["headers"])
+ @utils.hook("api.post.gitlab")
+ def _api_gitlab_webhook(self, event):
+ return self._webhook("gitlab", "GitLab", self._gitlab,
+ event["data"], event["headers"])
+
def _webhook(self, webhook_type, webhook_name, handler, payload_str,
headers):
payload = payload_str.decode("utf8")