From 7c378ec75a59f49745ba021ee80ba89cd5c7f0a2 Mon Sep 17 00:00:00 2001 From: fabolous005 Date: Mon, 29 Dec 2025 04:26:46 +0100 Subject: [PATCH] minor fix --- main.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index bf61a8b..2fa0fad 100644 --- a/main.py +++ b/main.py @@ -26,10 +26,7 @@ def gitea_webhook(): # Determine event type from header event_type = request.headers.get("X-Gitea-Event", "").lower() - if event_type not in ("release", "push"): - return jsonify({"message": f"Ignored event type: {event_type}"}), 200 - - if event_type == "push": + if event_type == "push": args = [] elif event_type == "release": @@ -37,6 +34,8 @@ def gitea_webhook(): if not version: return jsonify({"error": "Release version not found"}), 400 args = [version] + else: + return jsonify({"message": f"Ignored event type: {event_type}"}), 200 script_path = os.path.join(WEBBUMP_DIR, repo_name, event_type) if not os.path.isfile(script_path) or not os.access(script_path, os.X_OK):