support gitea respository["private"] as well as project["visibility_level"]

This commit is contained in:
jesopo 2020-01-31 08:00:21 +00:00
parent 5d3e1ea492
commit 7f659837ab

View file

@ -50,9 +50,9 @@ ISSUE_ACTIONS = {
class GitLab(object):
def is_private(self, data, headers):
if "project" in data:
if "visibility_level" in data.get("project", {}):
return not data["project"]["visibility_level"] == 20
return False
return data.get("repository", {}).get("private", False)
def names(self, data, headers):
full_name = data["project"]["path_with_namespace"]