Skip to content
Snippets Groups Projects
Commit fdc1c3e5 authored by ale's avatar ale
Browse files

Fix project matching when parsing gitlab-deps

parent 35d67dcf
No related branches found
No related tags found
No related merge requests found
...@@ -99,13 +99,13 @@ def docker_image_to_project(docker_image, registry_hostname): ...@@ -99,13 +99,13 @@ def docker_image_to_project(docker_image, registry_hostname):
return m[3], branch return m[3], branch
_url_rx = re.compile(r'^(https?://[^/]+/)([^:]+)(:.*)?$') _url_rx = re.compile(r'^https?://[^/]+/([^:]+)(:(.*))?$')
def url_to_project(url, gitlab_url): def url_to_project(url, gitlab_url):
m = _url_rx.match(url) m = _url_rx.match(url)
if m and m[1] == gitlab_url: if url.startswith(gitlab_url) and m and m[1] == gitlab_url:
return m[2], m[3] or DEFAULT_BRANCH return m[1], m[3] or DEFAULT_BRANCH
def not_null(l): def not_null(l):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment