summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Louis Bonicoli <pierre-louis.bonicoli@libregerbil.fr>2020-05-17 05:31:20 +0200
committerPierre-Louis Bonicoli <pierre-louis.bonicoli@libregerbil.fr>2020-05-17 06:27:32 +0200
commit23f8e5df8b60cac4cea1b6bd4c67cc8e52fac199 (patch)
treea932930511004eb7c8ec27d432c50a671fa34f21
parent931eac4030cc7e8e1a13a1e32947db90f37219a5 (diff)
downloadzuul-23f8e5df8b60cac4cea1b6bd4c67cc8e52fac199.tar.gz
Gitlab - allow to use the 'zuul enqueue' command
- set 'url' in order to avoid "'NoneType' object is not iterable" exception - fix value of 'uris': - use a list of URLs, not a list of characters - remove scheme from the URL Change-Id: Iaa0197eb290a9e21aa63eb65a1c8a677abf8298b
-rw-r--r--zuul/driver/gitlab/gitlabconnection.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/zuul/driver/gitlab/gitlabconnection.py b/zuul/driver/gitlab/gitlabconnection.py
index a75e09e6f..363281fec 100644
--- a/zuul/driver/gitlab/gitlabconnection.py
+++ b/zuul/driver/gitlab/gitlabconnection.py
@@ -388,8 +388,8 @@ class GitlabConnection(BaseConnection):
change.number = number
# patchset is the tips commit of the PR
change.patchset = patchset
- change.url = url
- change.uris = list(url)
+ change.url = url or self.getPullUrl(project.name, number)
+ change.uris = [change.url.split('://', 1)[-1]] # remove scheme
self._change_cache[key] = change
try:
log.debug("Getting change mr#%s from project %s" % (