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

auto-changelog includes tagged commits as changed #187

Closed
xdumaine opened this issue Oct 28, 2020 · 1 comment
Closed

auto-changelog includes tagged commits as changed #187

xdumaine opened this issue Oct 28, 2020 · 1 comment

Comments

@xdumaine
Copy link

Here's an example showing the output Note the line - 2.0.1 under the v2.1.0 section. I think this is happening because some versions of npm don't include the v prefix in the tagged commit message. In this case, the v2.0.1 tag has a message of just 2.0.1 and so it's being picked up as a commit inside the next release.

#### [v2.1.0](https://github.com/[redacted]/[redacted]/compare/v2.0.1...v2.1.0)

> 27 October 2020

- [redacted] [`#5`](https://github.com/[redacted]/[redacted]/pull/5)
- 2.0.1 [`#156`](https://github.com/[redacted]/[redacted]/pull/156)

#### [v2.0.1](https://github.com/[redacted]/[redacted]/compare/v2.0.0...v2.0.1)

> 23 September 2020

- [redacted] [`#155`](https://github.com/[redacted]/[redacted]/pull/155)
- v2.0.0 [`#152`](https://github.com/[redacted]/[redacted]/pull/152)
- [redacted] [`[redacted]`](https://github.com/[redacted]/[redacted]/commit/[redacted])

I tried to fix this by using a custom ignore commit pattern, but it doesn't seem to work. I tried auto-changelog --ignore-commit-pattern v?\d+\.\d+\.\d+

@cookpete
Copy link
Owner

It looks like you are tagging commits but then merging them to the branch via pull request. The tagged commit will appear before the merge in the "timeline" so the merge falls into the next version, even though it is named after the older version. The only reason they are appearing in the changelog in the first place is because they are pull requests and not regular commits.

Once I've pushed the fix for #195 your use of --ignore-commit-pattern should work.

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

No branches or pull requests

2 participants