diff --git a/webhooks/requirements.txt b/webhooks/requirements.txt new file mode 100644 index 0000000..9640b65 --- /dev/null +++ b/webhooks/requirements.txt @@ -0,0 +1,9 @@ +jinja2 +sanic==21.12.2 +GitPython +pyyaml +toml +websockets==10.0 +babel +langcodes +language_data diff --git a/webhooks/webhook.py b/webhooks/webhook.py index 239951f..2796ecb 100755 --- a/webhooks/webhook.py +++ b/webhooks/webhook.py @@ -73,6 +73,8 @@ async def github_post(request: Request) -> HTTPResponse: if valid_pr_comment: return on_pr_comment(request, pr_infos) + else: + return response.empty() return response.json({"error": f"Unknown event '{event}'"}, 422)