From f2799349ab135b80f7804a2a07edb1d64f0ef60f Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Sat, 25 Jan 2020 01:14:01 +0000 Subject: Add tag push support to webhooks --- app/blueprints/gitlab/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'app/blueprints/gitlab') 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 -- cgit v1.2.3