From 78012f4f3cf3ff37abd225d629970d7030c2cc45 Mon Sep 17 00:00:00 2001 From: Marvin Pohl Date: Tue, 4 Sep 2018 15:52:49 +0200 Subject: [PATCH] Fixed secret check not working as expected. --- gitea/webhook.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gitea/webhook.py b/gitea/webhook.py index 6d2600c..bd92cd6 100644 --- a/gitea/webhook.py +++ b/gitea/webhook.py @@ -19,7 +19,7 @@ class GiteaHandler(BaseHookHandler): # We only care about regular heads or tags match = re.match(r"^refs/(heads|tags)/(.+)$", refname) if not match: - log.msg("Ignoring refname '{}': Not a branch".format(refname)) + log.msg("Ignoring refname '{}': Not a branch or tag".format(refname)) return changes branch = match.group(2) @@ -99,7 +99,7 @@ class GiteaHandler(BaseHookHandler): def getChanges(self, request): secret = None - if self.options is dict: + if isinstance(self.options, dict): secret = self.options.get('secret') try: