auto-changelog icon indicating copy to clipboard operation
auto-changelog copied to clipboard

Latest version on the changelog is not respecting tagPrefix

Open satazor opened this issue 2 years ago • 1 comments

I have a mono-repo with multiple packages. I run auto-changelog for each of them separately. It's working great, except that tagPrefix is not respected for the last version:

### Changelog

All notable changes to this project will be documented in this file. Dates are displayed in UTC.

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [0.0.2](https://github.com/xxx/yyy/compare/[email protected])

#### [[email protected]](https://github.com/xxx/yyy/compare/release/[email protected]@v0.0.1)

> 24 August 2023

- Add foo2 [`32b4010`](https://github.com/xxx/yyy/commit/xxx)

...

As you can see, both tag title and compare URL for 0.0.2 are wrong. If I release a new version, say 0.0.3, then 0.0.2 will be fixed and 0.0.3 will be wrong. I think the issue lies here because that block is not using tagPrefix to build the tag title and compareTo.

satazor avatar Aug 24 '23 08:08 satazor

I'm happy to do a PR if this is indeed a bug and if you agree to use tagPrefix in there.

One thing that I would prefer in my case is for the tag.title to actually have it's tagPrefix stripped off, so that each version on the changelog is x.x.x instead of <tagPrefix>x.x.x. I guess I can do it via a custom template but it would be great to have this as the default or via an option perhaps.

satazor avatar Aug 24 '23 09:08 satazor