Make sure the issue is a pull request

Co-authored-by: Kayou <pierre@kayou.io>
This commit is contained in:
Alexandre Aubin 2021-01-14 15:09:27 +01:00 committed by GitHub
parent d97747eed0
commit 19f26497e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

3
run.py
View file

@ -989,7 +989,8 @@ async def github(request):
# - On issue/PRs which are still open
if hook_type != "issue_comment" \
or hook_infos["action"] != "created" \
or hook_infos["issue"]["state"] != "open": \
or hook_infos["issue"]["state"] != "open" \
or "pull_request" not in hook_infos["issue"]:
# idk what code we want to return
abort(400)