minor fix

This commit is contained in:
fabolous005 2025-12-29 04:26:46 +01:00
parent 87856c9f86
commit 7c378ec75a

View File

@ -26,9 +26,6 @@ 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":
args = []
@ -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):