1
Fork 0

Add webhook secret config and logging

This commit is contained in:
Jake Howard 2018-10-25 20:49:18 +01:00
parent 08fcf339f1
commit 5659d01686
Signed by: jake
GPG key ID: 57AFB45680EDD477
2 changed files with 10 additions and 1 deletions

3
app/config.py Normal file
View file

@ -0,0 +1,3 @@
import os
GITHUB_WEBHOOK_SECRET = os.environ.get("GITHUB_WEBHOOK_SECRET")

View file

@ -1,9 +1,15 @@
#!/usr/bin/env python3
import logging
from flask import Flask
from github_webhook import Webhook
import config
logging.basicConfig(level=logging.INFO)
app = Flask(__name__)
webhook = Webhook(app)
webhook = Webhook(app, secret=config.GITHUB_WEBHOOK_SECRET)
if __name__ == "__main__":
app.run(host="0.0.0.0")