Write basic content

This commit is contained in:
Théophile Bastian 2018-03-03 01:09:24 +01:00
parent 99ee4820af
commit 4c6e1fbdb4
3 changed files with 15 additions and 1 deletions

1
.gitignore vendored
View File

@ -58,3 +58,4 @@ docs/_build/
# PyBuilder
target/
venv

2
Makefile Normal file
View File

@ -0,0 +1,2 @@
dev-run: gogsmaker.py
FLASK_APP=$< flask run

View File

@ -2,4 +2,15 @@
A webhook-handler for Gogs running `make` when needed. """
from flask import Flask
from flask import Flask, request
app = Flask(__name__)
@app.route('/', methods=['POST'])
def view_root():
payload = request.json
if payload is None:
return 'Expected json\n', 415
print(payload)
return 'OK\n', 200