aboutsummaryrefslogtreecommitdiff
path: root/modules/github.py
diff options
context:
space:
mode:
authorGravatar jesopo2019-01-16 22:28:12 +0000
committerGravatar jesopo2019-01-16 22:28:12 +0000
commit77c7084e9d59cb6e6d96d6035b9dd9a0bbadc038 (patch)
tree22d1a8eff68beeae2cf7b2645ee0e5107644f83a /modules/github.py
parentDo filtering of github events based on categories of events (github.py) (diff)
signature
Don't try to parse username and repo name from a full name if there's no full
name (github.py)
Diffstat (limited to 'modules/github.py')
-rw-r--r--modules/github.py4
1 files changed, 3 insertions, 1 deletions
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 = []