1
0
Fork 0

Fix webhooks: they should return response.empty (no error) on github_post if it's not a valid PR

This commit is contained in:
root 2024-08-17 09:50:46 +00:00
parent 4c04ef911c
commit f6cb50d374
2 changed files with 11 additions and 0 deletions

View file

@ -0,0 +1,9 @@
jinja2
sanic==21.12.2
GitPython
pyyaml
toml
websockets==10.0
babel
langcodes
language_data

View file

@ -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)