updater-plugins/github.star
2023-06-09 11:04:14 -07:00

10 lines
297 B
Plaintext

def update_repo(req):
if req.method != 'POST':
return {"code": 405, "body": "Method not allowed"}
if req.headers["X-Github-Event"][0] != "push":
return {"code": 400, "body": "This plugin only accepts push events"}
updater.pull()
register_webhook(update_repo)