Handle a situation where a repo full name isn't provided and there isn't one set

as default (github)
This commit is contained in:
jesopo 2019-01-22 17:16:04 +00:00
parent fc5671c7c5
commit c69f4414a0

View file

@ -70,7 +70,9 @@ class Module(ModuleManager.BaseModule):
if not repo:
repo = channel.get_setting("github-default-repo", None)
username, _, repository = repo.partition("/")
username, repository = None, None
if repo:
username, _, repository = repo.partition("/")
if not username or not repository or not number:
raise utils.EventError("Please provide username/repo#number")