Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add json support for config #313

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

Copy link
Contributor

@danvergara danvergara commented Nov 27, 2020

Description

As mentioned in #120 , this PR add json support for configuration

Checklist

  • Add test cases to all the changes you introduce
  • Run ./script/format and ./script/test locally to ensure this change passes linter check and test
  • Test the changes on the local machine manually
  • Update the documentation for the changes

Expected behavior

Replace a TOML config file with a JSON config file with no side effects, (of course, passing the same arguments).

Steps to Test This Pull Request

  1. Run the tests
  2. Activate the virtual environment provided by the project/Poetry
  3. Since the json files are supported for configuration, try to add a new file called .cz.json to customize Commitizen.

Additional context

Related to #120

Lee-W and woile reacted with thumbs up emoji
Copy link

codecov bot commented Nov 27, 2020
edited
Loading

Codecov Report

Merging #313 (8619322) into master (5486075) will increase coverage by 0.10%.
The diff coverage is 100.00%.

Impacted file tree graph

@@ Coverage Diff @@
## master #313 +/- ##
==========================================
+ Coverage 96.97% 97.07% +0.10% 
==========================================
 Files 33 34 +1 
 Lines 926 958 +32 
==========================================
+ Hits 898 930 +32 
 Misses 28 28 
Flag Coverage Δ
unittests 97.07% <100.00%> (+0.10%) ⬆️

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

Impacted Files Coverage Δ
commitizen/commands/init.py 91.48% <100.00%> (+0.18%) ⬆️
commitizen/config/__init__.py 100.00% <100.00%> (ø)
commitizen/config/json_config.py 100.00% <100.00%> (ø)
commitizen/defaults.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c1322da...8619322. Read the comment docs.

@danvergara danvergara marked this pull request as ready for review November 29, 2020 09:06
Copy link
Member

@Lee-W Lee-W left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution! I just browse through it and it looks great! I'll clone it and test it locally to confirm again and then I think we can merge it 🎉

danvergara reacted with hooray emoji
Copy link
Member

Lee-W commented Dec 1, 2020

@danvergara You'll also need to handle the json format here so that cz init can run correctly

Copy link
Contributor Author

danvergara commented Dec 2, 2020
edited
Loading

@Lee-W thank you, man! I missed include the json support there!

Copy link
Contributor Author

@Lee-W Done!

Copy link
Member

Lee-W commented Dec 2, 2020

@danvergara I just confirmed it. Let's merge it!

danvergara reacted with hooray emoji danvergara reacted with rocket emoji

@Lee-W Lee-W merged commit 3d4a549 into commitizen-tools:master Dec 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@Lee-W Lee-W Lee-W left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /