pull project name from "project_name" when "project" doesn't exist

This commit is contained in:
jesopo 2020-02-03 11:36:47 +00:00
parent b713cf7659
commit c0f5367d34

View file

@ -55,7 +55,10 @@ class GitLab(object):
return False return False
def names(self, data, headers): def names(self, data, headers):
full_name = data["project"]["path_with_namespace"] if "project" in data:
full_name = data["project"]["path_with_namespace"]
else:
full_name = data["project_name"].replace(" ", "")
repo_username, repo_name = full_name.split("/", 1) repo_username, repo_name = full_name.split("/", 1)
organisation = None organisation = None