Don't try to parse username and repo name from a full name if there's no full
name (github.py)
This commit is contained in:
parent
a342f82f40
commit
77c7084e9d
1 changed files with 3 additions and 1 deletions
|
@ -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 = []
|
||||
|
|
Loading…
Reference in a new issue