File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -13,19 +13,19 @@ orginally developed for Bloomberg's GHE install.
1313receives push events all it takes is:
1414
1515``` py
16- from flask import Flask
1716from github_webhook import Webhook
17+ from flask import Flask
1818
19- app = Flask(__name__ )
20- webhook = Webhook(app)
19+ app = Flask(__name__ ) # Standard Flask app
20+ webhook = Webhook(app) # Defines '/postreceive' endpoint
2121
22- @app.route (" /" )
22+ @app.route (" /" ) # Standard Flask endpoint
2323def hello_world ():
2424 return " Hello, World!"
2525
26- @webhook.hook ()
26+ @webhook.hook () # Defines a handler for the 'push' event
2727def on_push (data ):
28- print " Got push with: {0} " .format(data)
28+ print ( " Got push with: {0} " .format(data) )
2929
3030if __name__ == " __main__" :
3131 app.run(host = " 0.0.0.0" , port = 80 )
You can’t perform that action at this time.
0 commit comments