mirror of
https://github.com/YunoHost/yunorunner.git
synced 2024-09-03 20:05:52 +02:00
Add check for branch to start with ci-auto-update
This commit is contained in:
parent
84c6eb1a2a
commit
6c15f5aba7
1 changed files with 2 additions and 1 deletions
3
run.py
3
run.py
|
@ -1056,7 +1056,8 @@ async def github(request):
|
|||
# Nothing to do but success anyway (204 = No content)
|
||||
abort(204, "Nothing to do")
|
||||
# We only accept PRs that are created by github-action bot
|
||||
if hook_infos["pull_request"]["user"]["login"] != "github-actions[bot]":
|
||||
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")
|
||||
# Fetch the PR infos (yeah they ain't in the initial infos we get @_@)
|
||||
|
|
Loading…
Add table
Reference in a new issue