Fixed secret check not working as expected.

This commit is contained in:
Marvin Pohl 2018-09-04 15:52:49 +02:00
parent 7bb4f04cd2
commit 78012f4f3c

View File

@ -19,7 +19,7 @@ class GiteaHandler(BaseHookHandler):
# We only care about regular heads or tags # We only care about regular heads or tags
match = re.match(r"^refs/(heads|tags)/(.+)$", refname) match = re.match(r"^refs/(heads|tags)/(.+)$", refname)
if not match: 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 return changes
branch = match.group(2) branch = match.group(2)
@ -99,7 +99,7 @@ class GiteaHandler(BaseHookHandler):
def getChanges(self, request): def getChanges(self, request):
secret = None secret = None
if self.options is dict: if isinstance(self.options, dict):
secret = self.options.get('secret') secret = self.options.get('secret')
try: try: