mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/ci/ci_fetch_submodule_fully_match_return_first_v4.0' into 'release/v4.0'
fix(ci): ci_fetch_submodule return full match name first (v4.0) See merge request espressif/esp-idf!13213
This commit is contained in:
commit
5f2a5c1f93
@ -37,17 +37,22 @@ class Gitlab(object):
|
|||||||
:return: project ID
|
:return: project ID
|
||||||
"""
|
"""
|
||||||
projects = self.gitlab_inst.projects.list(search=name)
|
projects = self.gitlab_inst.projects.list(search=name)
|
||||||
|
res = []
|
||||||
for project in projects:
|
for project in projects:
|
||||||
if namespace is None:
|
if namespace is None:
|
||||||
if len(projects) == 1:
|
if len(projects) == 1:
|
||||||
project_id = project.id
|
res.append(project.id)
|
||||||
break
|
break
|
||||||
|
|
||||||
if project.namespace["path"] == namespace:
|
if project.namespace["path"] == namespace:
|
||||||
project_id = project.id
|
if project.name == name:
|
||||||
break
|
res.insert(0, project.id)
|
||||||
else:
|
else:
|
||||||
|
res.append(project.id)
|
||||||
|
|
||||||
|
if not res:
|
||||||
raise ValueError("Can't find project")
|
raise ValueError("Can't find project")
|
||||||
return project_id
|
return res[0]
|
||||||
|
|
||||||
def download_artifacts(self, job_id, destination):
|
def download_artifacts(self, job_id, destination):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user