mirror of
https://github.com/YunoHost/webhooks.git
synced 2024-09-03 19:56:54 +02:00
move the code in the 'try'
This commit is contained in:
parent
93a6bab156
commit
a3788101b8
1 changed files with 6 additions and 6 deletions
12
server.py
12
server.py
|
@ -88,13 +88,13 @@ async def github(request):
|
|||
print()
|
||||
print(f"Hook type: {hook_type}")
|
||||
|
||||
repository = request.json["repository"]["name"]
|
||||
|
||||
# do not notify if the repo is 'apps_translations'
|
||||
if repository == "apps_translations":
|
||||
return
|
||||
|
||||
try:
|
||||
repository = request.json["repository"]["name"]
|
||||
|
||||
# do not notify if the repo is 'apps_translations'
|
||||
if repository == "apps_translations":
|
||||
return
|
||||
|
||||
# https://developer.github.com/v3/activity/events/types/#pushevent
|
||||
if hook_type == "push":
|
||||
commits = request.json["commits"]
|
||||
|
|
Loading…
Reference in a new issue