mirror of
https://github.com/YunoHost/yunorunner.git
synced 2024-09-03 20:05:52 +02:00
PR webhooks: Return 204 if PR gets created by somebody else than github-actions
This commit is contained in:
parent
6c15f5aba7
commit
50eb310429
1 changed files with 1 additions and 1 deletions
2
run.py
2
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"]
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue