feat(cli): do not require config file to run CLI#1743
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1743 +/- ##
==========================================
- Coverage 91.97% 91.97% -0.01%
==========================================
Files 76 76
Lines 4737 4759 +22
==========================================
+ Hits 4357 4377 +20
- Misses 380 382 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
8884417 to
d0c6005
Compare
JohnVillalovos
requested changes
Dec 12, 2021
Member
JohnVillalovos
left a comment
There was a problem hiding this comment.
Can functional tests be added for this. In particular a functional test that demonstrates it works without a config file? Though I guess that will try to contact https://gitlab.com/ 😟
d0c6005 to
e6449d3
Compare
BREAKING CHANGE: A config file is no longer needed to run the CLI. python-gitlab will default to https://gitlab.com with no authentication if there is no config file provided. python-gitlab will now also only look for configuration in the provided PYTHON_GITLAB_CFG path, instead of merging it with user- and system-wide config files. If the environment variable is defined and the file cannot be opened, python-gitlab will now explicitly fail.
e6449d3 to
92a893b
Compare
JohnVillalovos
approved these changes
Dec 13, 2021
Member
JohnVillalovos
left a comment
There was a problem hiding this comment.
Looks good to me. I wasn't sure if you wanted to merge it or not.
Please merge whenever you are ready.
Thanks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BREAKING CHANGE: A config file is no longer needed to run
the CLI. python-gitlab will default to https://gitlab.com
with no authentication if there is no config file provided.
python-gitlab will now also only look for configuration
in the provided PYTHON_GITLAB_CFG path, instead of merging
it with user- and system-wide config files. If the
environment variable is defined and the file cannot be
opened, python-gitlab will now explicitly fail.
Needed for #1296