diff options
Diffstat (limited to 'app/blueprints/github/__init__.py')
-rw-r--r-- | app/blueprints/github/__init__.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/blueprints/github/__init__.py b/app/blueprints/github/__init__.py index e3ce8d7..8c6aaa8 100644 --- a/app/blueprints/github/__init__.py +++ b/app/blueprints/github/__init__.py @@ -123,12 +123,15 @@ def webhook(): event = request.headers.get("X-GitHub-Event") if event == "push": - title = json["head_commit"]["message"].partition("\n")[0] ref = json["after"] + title = json["head_commit"]["message"].partition("\n")[0] + elif event == "create" and json["ref_type"] == "tag": + ref = json["ref"] + title = ref elif event == "ping": return jsonify({ "success": True, "message": "Ping successful" }) else: - return error(400, "Unsupported event. Only 'push' and 'ping' are supported.") + return error(400, "Unsupported event. Only 'push', `create:tag`, and 'ping' are supported.") # # Perform release |