Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ Run
gitlab-artifact-cleanup --write-default-config
```

to create an initial configuration file at `~/.gitlab-artifact-cleanuprc`. Then, open the web page of your GitLab
instance and navigate to *User Settings* -> *Access Tokens*. Create a new token with the `api` scope and copy its
contents into the newly created configuration file (`access_token`) and set the `url` of your GitLab server if you are
not using `gitlab.com`.
to create an initial configuration file at `${XDG_CONFIG_HOME}/gitlab-artifact-cleanup/config.ini`. Then, open the web
page of your GitLab instance and navigate to *User Settings* -> *Access Tokens*. Create a new token with the `api` scope
and copy its contents into the newly created configuration file (`access_token`) and set the `url` of your GitLab server
if you are not using `gitlab.com`.

Now, run

Expand Down
5 changes: 4 additions & 1 deletion gitlab_artifact_cleanup/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
from enum import Enum, auto
from typing import Any, Optional, TextIO, Union, cast

CONFIG_FILEPATH = "~/.gitlab-artifact-cleanuprc"
CONFIG_FILEPATH = os.path.join(
os.environ.get('XDG_CONFIG_HOME') or os.path.expanduser('~/.config'),
"gitlab-artifact-cleanup",
"config.ini")


class UnknownAlwaysKeepError(Exception):
Expand Down