From 300bb0e7bd83490d65c7b71a6ad473bd1f78edff Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Mon, 25 Mar 2024 03:41:44 +0100 Subject: [PATCH] move the code in the 'try' --- server.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/server.py b/server.py index f331ee6..791796e 100644 --- a/server.py +++ b/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"]