first commit
This commit is contained in:
18
listen.py
Normal file
18
listen.py
Normal 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"]
|
||||
)
|
||||
)
|
||||
Reference in New Issue
Block a user