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

changelog --max-minors does not work with gaps #112

Open
ite-klass opened this issue Jan 27, 2023 · 4 comments
Open

changelog --max-minors does not work with gaps #112

ite-klass opened this issue Jan 27, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@ite-klass
Copy link

ite-klass commented Jan 27, 2023

--max-minors does not seem to work. The generated changelog for --max-minors 1 includes all versions.

--max-majors, --max-patches, and --max-versions works fine, limiting the versions as expected.

convco v0.3.15

@ite-klass ite-klass added the bug Something isn't working label Jan 27, 2023
@hdevalke
Copy link
Collaborator

I can't reproduce.

--max-minors 1 return only the 0.3.x in this repo:

 convco changelog --max-minors 1 --no-links | rg \\bv[0-9]+\\.
### v0.3.15 (2023-01-18)
### v0.3.14 (2023-01-13)
### v0.3.13 (2023-01-12)
### v0.3.12 (2022-09-25)
### v0.3.11 (2022-07-09)
### v0.3.10 (2022-04-24)
### v0.3.9 (2022-03-02)
### v0.3.8 (2021-12-28)
### v0.3.7 (2021-10-13)
### v0.3.6 (2021-08-08)
### v0.3.5 (2021-05-01)
### v0.3.4 (2021-03-15)
### v0.3.3 (2021-02-12)
### v0.3.2 (2020-10-29)
### v0.3.1 (2020-08-30)
## v0.3.0 (2020-08-23)

@ite-klass
Copy link
Author

ite-klass commented Jan 30, 2023

I think it may have to do with/occur with version gaps or jumps.

Reproducible with

git init
git commit --allow-empty -m "misc: Test"
git commit --allow-empty -m "misc: Test"
git tag v23.2.4 HEAD
git tag v8.8.8 HEAD~1
convco changelog --max-minors 1

outputs both v23.2.4 and v8.8.8

# Changelog

### [v23.2.4](///compare/v8.8.8...v23.2.4) (2023-01-30)

### v8.8.8 (2023-01-30)

instead of only v23.2.4

@ite-klass ite-klass changed the title changelog --max-minors does not work changelog --max-minors does not work with gaps Feb 3, 2023
@hdevalke
Copy link
Collaborator

hdevalke commented Feb 9, 2023

Indeed, gaps don't work, because we calculate when to stop.
I am trying to implement it differently, but i have difficulties to find the right way to stop.

e.g. [v1.1.1, v1.1.0, v0.1.1, v0.1.0] with --max_minor 2 should contain all versions, but --max-minor 1 should only only contain the first two.

@hdevalke
Copy link
Collaborator

I have a solution for this, but it is part of a bigger refactor. This refactor will probably make #111 also easy to implement.
I need some time though to rewrite the whole changelog subcommand

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants