From 77c7084e9d59cb6e6d96d6035b9dd9a0bbadc038 Mon Sep 17 00:00:00 2001 From: jesopo Date: Wed, 16 Jan 2019 22:28:12 +0000 Subject: Don't try to parse username and repo name from a full name if there's no full name (github.py) --- modules/github.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules/github.py') diff --git a/modules/github.py b/modules/github.py index 7b4a48e6..4f893c5e 100644 --- a/modules/github.py +++ b/modules/github.py @@ -126,14 +126,16 @@ class Module(ModuleManager.BaseModule): github_event = event["headers"]["X-GitHub-Event"] full_name = None + repo_username = None + repo_name = None if "respository" in data: full_name = data["repository"]["full_name"] + repo_username, repo_name = full_name.split("/", 1) organisation = None if "organization" in data: organisation = data["organization"]["login"] - repo_username, repo_name = full_name.split("/", 1) hooks = self.bot.database.channel_settings.find_by_setting( "github-hook") targets = [] -- cgit v1.3.1-10-gc9f91