aboutsummaryrefslogtreecommitdiff
path: root/app/blueprints/gitlab/__init__.py
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2020-01-25 01:14:01 +0000
committerrubenwardy <rw@rubenwardy.com>2020-01-25 01:14:01 +0000
commitf2799349ab135b80f7804a2a07edb1d64f0ef60f (patch)
treef54527a782f944e31290fdd39c0b1843993a4fd7 /app/blueprints/gitlab/__init__.py
parent1d223cc16f2611ea0269c4a5d025a617a176a64a (diff)
downloadcheatdb-f2799349ab135b80f7804a2a07edb1d64f0ef60f.tar.xz
Add tag push support to webhooks
Diffstat (limited to 'app/blueprints/gitlab/__init__.py')
-rw-r--r--app/blueprints/gitlab/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/blueprints/gitlab/__init__.py b/app/blueprints/gitlab/__init__.py
index daddc1e..45b4aa5 100644
--- a/app/blueprints/gitlab/__init__.py
+++ b/app/blueprints/gitlab/__init__.py
@@ -54,8 +54,11 @@ def webhook():
if event == "push":
ref = json["after"]
title = ref[:5]
+ elif event == "tag_push":
+ ref = json["ref"]
+ title = ref.replace("refs/tags/", "")
else:
- return error(400, "Unsupported event. Only 'push' is supported.")
+ return error(400, "Unsupported event. Only 'push' and 'tag_push' are supported.")
#
# Perform release