From 19f26497e7e73c22a60ccdeae31ab331ac8c1c9e Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 14 Jan 2021 15:09:27 +0100 Subject: [PATCH] Make sure the issue is a pull request Co-authored-by: Kayou --- run.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/run.py b/run.py index 912e3d7..9d2b0ed 100644 --- a/run.py +++ b/run.py @@ -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)