Commit fdc1c3e5 authored by ale's avatar ale
Browse files

Fix project matching when parsing gitlab-deps

parent 35d67dcf
......@@ -99,13 +99,13 @@ def docker_image_to_project(docker_image, registry_hostname):
return m[3], branch
_url_rx = re.compile(r'^(https?://[^/]+/)([^:]+)(:.*)?$')
_url_rx = re.compile(r'^https?://[^/]+/([^:]+)(:(.*))?$')
def url_to_project(url, gitlab_url):
m = _url_rx.match(url)
if m and m[1] == gitlab_url:
return m[2], m[3] or DEFAULT_BRANCH
if url.startswith(gitlab_url) and m and m[1] == gitlab_url:
return m[1], m[3] or DEFAULT_BRANCH
def not_null(l):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment