4 from flask
import Flask
, render_template
, request
, abort
5 from flask_caching
import Cache
6 from flask_migrate
import Migrate
7 from flask_sqlalchemy
import SQLAlchemy
9 from ui
import gitlab
, config
, models
12 app
.config
.from_object(config
)
14 models
.db
.init_app(app
)
15 migrate
= Migrate(app
, models
.db
)
18 headers
= {'Private-Token': os
.environ
.get('GITLAB_TOKEN', '')}
22 return render_template('index.html')
24 @app.route("/webhook", methods
=('POST',))
25 def process_webhook():
26 gitlab
.webhooks
.process(request
)
29 if __name__
== '__main__':
30 app
.run(host
='0.0.0.0', port
=5000)