git-cliff
git-cliff copied to clipboard
feat: add include and exclude path to the config
Description
This PR adds the option of setting include_path and exclude_path in the config file.
Motivation and Context
Closes #1168. This is useful if you have tools calling git-cliff (like release-plz) that don't give the ability to set command line arguments.
How Has This Been Tested?
Testing exclude_path
- Run
git-cliff | wc -land note the amount of lines - Run
git-cliff --exclude-path git-cliff-core/ | wc -land note the amount of lines - Set
exclude-paths = ["git-cliff-core/"] - Run
git-cliff | wc -land note the amount of lines The output of step 4 should equal the output of step 2 and not equal the output of step 1
Testing include_path
- Run
git-cliff | wc -land note the amount of lines - Run
git-cliff --include-path git-cliff/ --include-path git-cliff-core/ | wc -land note the amount of lines - Set
include_paths = ["git-cliff/", "git-cliff-core/"] - Run
git-cliff | wc -land note the amount of lines The output of step 4 should equal the output of step 2 and not equal the output of step 1
Both tests were run in the root of the git-cliff repository on a Linux machine.
I could not figure out how to mock commits with changed files and thus have not written any unit/integration tests.
Types of Changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [x] Documentation (no code change)
- [ ] Refactor (refactoring production code)
- [ ] Other
Checklist:
Thanks for opening this pull request! Please check out our contributing guidelines! ⛰️
Codecov Report
Attention: Patch coverage is 0% with 25 lines in your changes missing coverage. Please review.
Project coverage is 41.87%. Comparing base (
871c3c9) to head (19afa3d).
| Files with missing lines | Patch % | Lines |
|---|---|---|
| git-cliff/src/lib.rs | 0.00% | 17 Missing :warning: |
| git-cliff-core/src/config.rs | 0.00% | 8 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #1173 +/- ##
==========================================
- Coverage 42.35% 41.87% -0.47%
==========================================
Files 21 21
Lines 1991 2011 +20
==========================================
- Hits 843 842 -1
- Misses 1148 1169 +21
| Flag | Coverage Δ | |
|---|---|---|
| unit-tests | 41.87% <0.00%> (-0.47%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
Congrats on merging your first pull request! ⛰️