aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar jesopo2020-02-03 11:36:47 +0000
committerGravatar jesopo2020-02-03 11:36:47 +0000
commitc0f5367d343de94f65a6699827afec225e7966d1 (patch)
tree0e76f20ade71ce20c088583306160002ae4f9766
parentinit `usages` variable, for the case that there's no usage (diff)
signature
pull project name from "project_name" when "project" doesn't exist
-rw-r--r--modules/git_webhooks/gitlab.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/git_webhooks/gitlab.py b/modules/git_webhooks/gitlab.py
index 644ce823..fe9264c4 100644
--- a/modules/git_webhooks/gitlab.py
+++ b/modules/git_webhooks/gitlab.py
@@ -55,7 +55,10 @@ class GitLab(object):
return False
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)
organisation = None