From 7ede52d7c72b813e0805d3a796286208805d429f Mon Sep 17 00:00:00 2001 From: Jordan Petridis Date: Tue, 23 Oct 2018 23:14:17 +0300 Subject: [PATCH] build_manifest.py: Use the project path not the name The project path is what's shown in the url bar, ex gitlab.example.com/john/gstreamer -> path == gstreamer The project name is defined in project settings and its just. Its more common to change the name of a fork than its path. --- gitlab/build_manifest.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gitlab/build_manifest.py b/gitlab/build_manifest.py index dda8266da6..11de839d52 100755 --- a/gitlab/build_manifest.py +++ b/gitlab/build_manifest.py @@ -68,12 +68,12 @@ def find_repository_sha(module: str, branchname: str) -> Tuple[str, str]: continue id = project['id'] - if project['namespace']['name'] in useful_namespaces: - if project['namespace']['name'] == user_namespace: + if project['namespace']['path'] in useful_namespaces: + if project['namespace']['path'] == user_namespace: # If we have a branch with same name, use it. for branch in request(f"{id}/repository/branches"): if branch['name'] == branchname: - name = project['namespace']['name'] + name = project['namespace']['path'] print(f"{name}/{branchname}") return 'user', branch['commit']['id']