ci,marge_queue: read token from file by default

This allows token to be stored in ~/.config/gitlab-token instead of
passing them as an argument.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37916>
This commit is contained in:
Job Noorman
2025-10-16 18:12:10 +02:00
committed by Marge Bot
parent 77fb8fb062
commit 3b2f7ed918

View File

@@ -22,7 +22,7 @@ import gitlab
from gitlab.base import RESTObjectList
from gitlab.exceptions import GitlabAuthenticationError
from gitlab.v4.objects import Project, ProjectMergeRequest
from gitlab_common import read_token, pretty_duration
from gitlab_common import get_token_from_default_dir, read_token, pretty_duration
from rich.console import Console
REFRESH_WAIT = 30
@@ -47,6 +47,7 @@ def parse_args() -> argparse.Namespace:
parse.add_argument(
"--token",
metavar="token",
default=get_token_from_default_dir(),
help="force GitLab token, otherwise it's read from ~/.config/gitlab-token",
)
return parse.parse_args()