summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Flach <cmfcmf@users.noreply.github.com>2016-12-12 12:21:27 +0100
committerGitHub <noreply@github.com>2016-12-12 12:21:27 +0100
commitcce3e4788acc2f76416296f2d84d969784613eed (patch)
tree0537e90eadada5a1aa6f395747b415c903a606d0
parent30b8b34af911c3b3661f57366f0eeb56bfb5e3ed (diff)
downloadGit-Auto-Deploy-cce3e4788acc2f76416296f2d84d969784613eed.zip
Git-Auto-Deploy-cce3e4788acc2f76416296f2d84d969784613eed.tar.gz
Git-Auto-Deploy-cce3e4788acc2f76416296f2d84d969784613eed.tar.bz2
Correct url retrieval, fixes #142
-rw-r--r--gitautodeploy/parsers/gitlab.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/gitautodeploy/parsers/gitlab.py b/gitautodeploy/parsers/gitlab.py
index 68a1982..d220644 100644
--- a/gitautodeploy/parsers/gitlab.py
+++ b/gitautodeploy/parsers/gitlab.py
@@ -78,8 +78,10 @@ class GitLabCIRequestParser(WebhookRequestParser):
# Only add repositories if the build is successful. Ignore it in other case.
if data['build_status'] == "success":
for k in ['url', 'git_http_url', 'git_ssh_url']:
- if k in data['repository']:
- repo_urls.append(data['repository'][k])
+ for n in ['repository', 'project']:
+ if n in data:
+ if k in data[n]:
+ repo_urls.append(data[n][k])
else:
logger.warning("Gitlab CI build '%d' has status '%s'. Not pull will be done" % (
data['build_id'], data['build_status']))