-
-
Notifications
You must be signed in to change notification settings - Fork 238
feat: add include and exclude path to the config #1173
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: add include and exclude path to the config #1173
Conversation
Thanks for opening this pull request! Please check out our contributing guidelines! ⛰️ |
Codecov ReportAttention: Patch coverage is
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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
a971cce
to
1b40d79
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Congrats on merging your first pull request! ⛰️ |
Description
This PR adds the option of setting
include_path
andexclude_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
git-cliff | wc -l
and note the amount of linesgit-cliff --exclude-path git-cliff-core/ | wc -l
and note the amount of linesexclude-paths = ["git-cliff-core/"]
git-cliff | wc -l
and note the amount of linesThe output of step 4 should equal the output of step 2 and not equal the output of step 1
Testing
include_path
git-cliff | wc -l
and note the amount of linesgit-cliff --include-path git-cliff/ --include-path git-cliff-core/ | wc -l
and note the amount of linesinclude_paths = ["git-cliff/", "git-cliff-core/"]
git-cliff | wc -l
and note the amount of linesThe 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
Checklist: