Closed iCrawl closed 2 years ago
Hello, good catch!
This should be fixed in 943c23f, can you try it out and let me know if it works as expected?
Yes, that did indeed solve it, I do have another question about this, it might be semi-related? Please do tell if you want a separate issue about this but:
Let's presume I want to run something like this:
git cliff --prepend CHANGELOG.md -l
which works with the changes/fixes you made now properly and populated previous
and everything to correctly give me all the info I need.
But with this approach I need to manually git tag
a release, then run the command with the --latest
flag to get the diff between the two tags and such the commits.
But ideally, I would want to run something like this:
git cliff --prepend CHANGELOG.md --unreleased --tag 14.0.0
Is this somehow possible or not at all? Since previous
does not seem to get populated if I do it this way, without manually creating the tag before.
Yes, that did indeed solve it,
Thanks for testing this out!
Please do tell if you want a separate issue about this
Yes, that would be nice šš¼
Let's presume I want to run something like this:
git cliff --prepend CHANGELOG.md -l
which works with the changes/fixes you made now properly and populatedprevious
and everything to correctly give me all the info I need. But with this approach I need to manuallygit tag
a release, then run the command with the--latest
flag to get the diff between the two tags and such the commits.But ideally, I would want to run something like this:
git cliff --prepend CHANGELOG.md --unreleased --tag 14.0.0
Is this somehow possible or not at all? Since
previous
does not seem to get populated if I do it this way, without manually creating the tag before.
This is supposed to be possible. Actually, there is an example command (which is similar to what you gave as an example) in README.md
:
# 1- changelog header is removed from CHANGELOG.md
# 2- new entries are prepended to CHANGELOG.md without footer part
git cliff --unreleased --tag 1.0.0 --prepend CHANGELOG.md
So I'm not sure if there is a problem here. Maybe you have a different use-case for --prepend
? Feel free to submit another issue about this and I'd be more than happy to work on it š
P.S. Sorry for the late reply.
Describe the bug If
skip_tags
is defined with a regex that correctly generates the changelog (by skipping the correct/defined ones), there is a regression when settingprevious
and using--latest
which was supposed to be fixed here: https://github.com/orhun/git-cliff/issues/3But it looks like if you use
--latest
in combination withskip_tags
, even if the pattern should not match the tag at all, it will simply not populate theprevious
field. This might have been introduced here(?): https://github.com/orhun/git-cliff/commit/7f867ae647ff30f54aae314596cbc7c7ce4f50c1If I remove the
skip_tags
from the config while generating with--latest
,previous
is populated as expected.To Reproduce Steps to reproduce the behavior:
All tags on the repo in question:
Expected behavior Expect
skip_tags
to not drop unrelated tags from theprevious
field.System (please complete the following information):