minor fix
This commit is contained in:
parent
87856c9f86
commit
7c378ec75a
7
main.py
7
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):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user