first commit

This commit is contained in:
2025-01-07 18:37:10 -05:00
commit c3ef3f2dd5
5 changed files with 90 additions and 0 deletions

18
listen.py Normal file
View File

@@ -0,0 +1,18 @@
from flask import Flask, request
from .deploy import handle_request, DeployerRequest
app = Flask(__name__)
@app.route("/gitea", methods=["POST"])
def gitea():
data = request.get_json()
handle_request(
DeployerRequest(
repo = data["repository"]["name"],
branch = data["ref"].strip("refs/heads/"),
commit_hash = data["after"]
)
)