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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user