initial commit

This commit is contained in:
Lili (Tlapka) 2022-05-24 15:28:00 +02:00
commit 540f9309e1
1 changed files with 18 additions and 0 deletions

18
main.py Normal file
View File

@ -0,0 +1,18 @@
from flask import Flask,request,json
app = Flask(__name__)
@app.route('/')
def hello():
return 'Webhooks with Python'
@app.route('/githubIssue',methods=['POST'])
def githubIssue():
data = request.json
print(f'Issue {data["issue"]["title"]} {data["action"]} \n')
print(f'{data["issue"]["body"]} \n')
print(f'{data["issue"]["url"]} \n')
return data
if __name__ == '__main__':
app.run(debug=True)