Skip to content
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

feat(args): support initialization with built-in templates #370

Merged
merged 3 commits into from
Dec 6, 2023

Conversation

orhun
Copy link
Owner

@orhun orhun commented Dec 6, 2023

Motivation

Now we embed the files under examples/ into the binary and support the following use cases:

# creates cliff.toml with keepachangelog template
git cliff --init keepachangelog
# generates a changelog in keepachangelog format
git cliff --config keepachangelog

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (no code change)
  • Refactor (refactoring production code)
  • Other

Checklist:

  • My code follows the code style of this project.
  • I have updated the documentation accordingly.
  • I have formatted the code with rustfmt.
  • I checked the lints with clippy.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@codecov-commenter
Copy link

codecov-commenter commented Dec 6, 2023

Codecov Report

Attention: 21 lines in your changes are missing coverage. Please review.

Comparison is base (0945fa8) 43.76% compared to head (d104c20) 42.65%.

Files Patch % Lines
git-cliff/src/lib.rs 0.00% 12 Missing ⚠️
git-cliff-core/src/embed.rs 0.00% 9 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #370      +/-   ##
==========================================
- Coverage   43.76%   42.65%   -1.11%     
==========================================
  Files          13       13              
  Lines         649      666      +17     
==========================================
  Hits          284      284              
- Misses        365      382      +17     
Flag Coverage Δ
unit-tests 42.65% <0.00%> (-1.11%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@orhun orhun changed the title Support initialization with built-in templates feat(args): support initialization with built-in templates Dec 6, 2023
@orhun orhun merged commit 4bee628 into main Dec 6, 2023
26 of 27 checks passed
@liuyinz
Copy link
Contributor

liuyinz commented Dec 27, 2023

@orhun Brilliant work !
how about more options related to built-in templates? e.g.

# add directory which stores user-defined templates, 
git cliff --templates-dir <PATH> (ENV: GIT_CLIFF_TEMPLATES_DIR=)

# print all available templates, both built-in and user-defined templates, which is needed for providing completion in emacs.
 git cliff --list-templates

these features are implemented in my emacs plugin for now and glad for more features are supported natively.

@orhun
Copy link
Owner Author

orhun commented Dec 27, 2023

@liuyinz thank you! Those are great suggestions.

Would you be potentially interested in contributing this? Either way, I would appreciate a tracking issue to implement them in the future.

@liuyinz
Copy link
Contributor

liuyinz commented Dec 27, 2023

@orhun I know nothing about rust.. so waiting :>

@orhun
Copy link
Owner Author

orhun commented Dec 27, 2023

Can you at least create an issue so that I won't forget about this feature? :D

@liuyinz
Copy link
Contributor

liuyinz commented Dec 27, 2023

#412 created. My job: done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants