-
-
Notifications
You must be signed in to change notification settings - Fork 163
feature: Read config directory from GLAB_CONFIG_DIR #921
Conversation
Codecov Report
@@ Coverage Diff @@
## trunk #921 +/- ##
==========================================
- Coverage 59.48% 59.48% -0.01%
==========================================
Files 97 97
Lines 7603 7607 +4
==========================================
+ Hits 4523 4525 +2
- Misses 2679 2680 +1
- Partials 401 402 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually like this change. There should be some changes to documentation so users know about this.
Also would need approval from @profclems but this LGTM!
4501183
to
72f37b0
Compare
Agreed. I added a comment to the README as I could not find any mentioning of the config files in the documentation at all. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great!
Please add it to the env vars here
Lines 41 to 60 in 9b44934
GITLAB_TOKEN: an authentication token for API requests. Setting this avoids being | |
prompted to authenticate and overrides any previously stored credentials. | |
Can be set in the config with 'glab config set token xxxxxx' | |
GITLAB_HOST or GL_HOST: specify the url of the gitlab server if self hosted (eg: https://gitlab.example.com). Default is https://gitlab.com. | |
REMOTE_ALIAS or GIT_REMOTE_URL_VAR: git remote variable or alias that contains the gitlab url. | |
Can be set in the config with 'glab config set remote_alias origin' | |
VISUAL, EDITOR (in order of precedence): the editor tool to use for authoring text. | |
Can be set in the config with 'glab config set editor vim' | |
BROWSER: the web browser to use for opening links. | |
Can be set in the config with 'glab config set browser mybrowser' | |
GLAMOUR_STYLE: environment variable to set your desired markdown renderer style | |
Available options are (dark|light|notty) or set a custom style | |
https://github.com/charmbracelet/glamour#styles | |
NO_PROMPT: set to 1 (true) or 0 (false) to disable and enable prompts respectively |
When working with many different gitlab instances for different projects, the global config quickly gets cluttered up with specific settings that do not clean up conveniently. On the other hand, local configs are to local, restricting the config to one repository instead of one project or instance that potentially contains many relevant repositories. This change introduces a middle ground solution via the GLAB_CONFIG_DIR environment variable. Setting this variable will allow global configuration to travel with the project instead of populating the XDG global config.
72f37b0
to
e532797
Compare
Done. |
Description
When working with many different gitlab instances for different
projects, the global config quickly gets cluttered up with
specific settings that do not clean up conveniently. On the other hand,
local configs are to local, restricting the config to one repository
instead of one project or instance that potentially contains many
relevant repositories.
This change introduces a middle ground solution via the GLAB_CONFIG_DIR
environment variable. Setting this variable will allow global
configuration to travel with the project instead of populating the XDG
global config.