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
|
@ -88,13 +88,13 @@ async def github(request):
|
||||||
print()
|
print()
|
||||||
print(f"Hook type: {hook_type}")
|
print(f"Hook type: {hook_type}")
|
||||||
|
|
||||||
|
try:
|
||||||
repository = request.json["repository"]["name"]
|
repository = request.json["repository"]["name"]
|
||||||
|
|
||||||
# do not notify if the repo is 'apps_translations'
|
# do not notify if the repo is 'apps_translations'
|
||||||
if repository == "apps_translations":
|
if repository == "apps_translations":
|
||||||
return
|
return
|
||||||
|
|
||||||
try:
|
|
||||||
# https://developer.github.com/v3/activity/events/types/#pushevent
|
# https://developer.github.com/v3/activity/events/types/#pushevent
|
||||||
if hook_type == "push":
|
if hook_type == "push":
|
||||||
commits = request.json["commits"]
|
commits = request.json["commits"]
|
||||||
|
|
Loading…
Add table
Reference in a new issue