From 50eb3104296181a8cbda95ff33f537a1d0c7faa5 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 22 Sep 2021 15:32:22 +0200 Subject: [PATCH] PR webhooks: Return 204 if PR gets created by somebody else than github-actions --- run.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run.py b/run.py index 3b34294..f9e4893 100644 --- a/run.py +++ b/run.py @@ -1059,7 +1059,7 @@ async def github(request): if hook_infos["pull_request"]["user"]["login"] != "github-actions[bot]" \ or not hook_infos["pull_request"]["head"]["ref"].startswith("ci-auto-update-"): # Unauthorized - abort(403, "Unauthorized") + abort(204, "Nothing to do") # Fetch the PR infos (yeah they ain't in the initial infos we get @_@) pr_infos_url = hook_infos["pull_request"]["url"]