aboutsummaryrefslogtreecommitdiff
path: root/modules/git_webhooks
diff options
context:
space:
mode:
authorGravatar jesopo2020-01-31 08:00:21 +0000
committerGravatar jesopo2020-01-31 08:00:21 +0000
commit7f659837abd3c3c8c16db51cffbeb2ffa879765f (patch)
treea044e3ea360fb6059c2939105815f8318b0005fb /modules/git_webhooks
parentadd 'date' command spec type (diff)
signature
support gitea respository["private"] as well as project["visibility_level"]
Diffstat (limited to 'modules/git_webhooks')
-rw-r--r--modules/git_webhooks/gitlab.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/git_webhooks/gitlab.py b/modules/git_webhooks/gitlab.py
index 644ce823..19d17ea9 100644
--- a/modules/git_webhooks/gitlab.py
+++ b/modules/git_webhooks/gitlab.py
@@ -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"]