← Winnitude! Search  ·  Reader Mode (1585 ms)
Links: Stay in Reader Retro Site Converter Retro Mode: OFF Original Page ↗
GITHUB · 74 LINKS

feat(cli): do not require config file to run CLI by nejch · Pull Request #1743 · python-gitlab/python-gitlab

Repository navigation

feat(cli): do not require config file to run CLI - #1743


Merged
nejch merged 1 commit into main from feat/cli-without-config-file Dec 13, 2021
Merged

feat(cli): do not require config file to run CLI #1743 nejch merged 1 commit into main from feat/cli-without-config-file

Conversation

nejch commented Dec 12, 2021 · edited Loading



Copy link Copy Markdown
Member

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

codecov-commenter commented Dec 12, 2021 · edited Loading



Copy link Copy Markdown

Codecov Report

Merging #1743 (92a893b ) into main (af33aff ) will decrease coverage by 0.00%.
The diff coverage is 97.22%.

@@            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     
Flag Coverage Δ
cli_func_v4 81.34% <94.44%> (+0.04%) ⬆️
py_func_v4 80.71% <73.61%> (-0.21%) ⬇️
unit 83.23% <94.44%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
gitlab/config.py 94.44% <97.22%> (+0.77%) ⬆️
gitlab/cli.py 98.16% <0.00%> (-1.84%) ⬇️
JohnVillalovos reviewed Dec 12, 2021
View reviewed changes
nejch force-pushed the feat/cli-without-config-file branch 2 times, most recently from 8884417 to d0c6005
Compare
December 12, 2021 19:44 nejch marked this pull request as ready for review December 12, 2021 19:47 nejch requested a review from JohnVillalovos December 12, 2021 19:47 JohnVillalovos requested changes Dec 12, 2021
View reviewed changes

JohnVillalovos left a comment



Copy link Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more .

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/ 😟

nejch force-pushed the feat/cli-without-config-file branch from d0c6005 to e6449d3
Compare
December 12, 2021 23:47 feat(cli): do not require config file to run CLI 92a893b
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.
nejch force-pushed the feat/cli-without-config-file branch from e6449d3 to 92a893b
Compare
December 13, 2021 00:11 nejch requested a review from JohnVillalovos December 13, 2021 00:22 JohnVillalovos approved these changes Dec 13, 2021
View reviewed changes

JohnVillalovos left a comment



Copy link Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more .

Looks good to me. I wasn't sure if you wanted to merge it or not.

Please merge whenever you are ready.

Thanks.

nejch merged commit 170a4d9 into main Dec 13, 2021 nejch deleted the feat/cli-without-config-file branch December 13, 2021 08:32 nejch mentioned this pull request Jan 5, 2022 Breaking changes in 3.0.0 #1520 Closed 15 tasks done Sign up for free to join this conversation on GitHub . Already have an account? Sign in to comment

Labels

None yet

3 participants