ci/ci_run_n_monitor: allow <user>/<project> in --project
Allow to monitor pipelines in any <user>/<project> on gitlab.fdo. If developers want to monitor MR pipelines, they can run with --project mesa/mesa to force it to be picked from mesa username. Signed-off-by: Helen Koike <helen.koike@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25473>
This commit is contained in:
@@ -14,9 +14,13 @@ from typing import Optional
|
||||
|
||||
def get_gitlab_project(glab, name: str):
|
||||
"""Finds a specified gitlab project for given user"""
|
||||
glab.auth()
|
||||
username = glab.user.username
|
||||
return glab.projects.get(f"{username}/{name}")
|
||||
if "/" in name:
|
||||
project_path = name
|
||||
else:
|
||||
glab.auth()
|
||||
username = glab.user.username
|
||||
project_path = f"{username}/{name}"
|
||||
return glab.projects.get(project_path)
|
||||
|
||||
|
||||
def read_token(token_arg: Optional[str]) -> str:
|
||||
|
Reference in New Issue
Block a user