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

Usage of expectedLatestVersion #293

Open
miparnisari opened this issue Jan 2, 2025 · 2 comments
Open

Usage of expectedLatestVersion #293

miparnisari opened this issue Jan 2, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@miparnisari
Copy link

miparnisari commented Jan 2, 2025

Hi, I don't understand the docs in https://github.com/dangoslen/changelog-enforcer?tab=readme-ov-file#expectedlatestversion. It's not clear to me what this field does, or what the default behavior is.

If I want to enforce that every PR must add a new entry under the unreleased section of the changelog, then should I specify expectedLatestVersion: 'unreleased'? Why would i ever add an entry under a fixed version? 🤔

@miparnisari miparnisari added the bug Something isn't working label Jan 2, 2025
@dangoslen
Copy link
Owner

Hi @miparnisari!

Thanks for the question. The use case of this option is mostly that someone doesn't accidentally get versions out of order. It is more of a sanity check more than strong validation.

This action doesn't enforce that you only update a specific version, sadly (though that might be a good feature to add!). The intention is more of a reminder to teams to pay attention to their changelog and to keep it up-to-date.

In your use case, leaving the option empty will allow the Unreleased section to be the first version listed. The use case of Unreleased itself allows for "building" a release over a set of changes rather than stating ahead of time which version it will be. Different flows have different patterns, but this allows for teams to choose which ones they want.

@miparnisari
Copy link
Author

Ohhh I see. Thanks for the explanation!

Then this ticket should be changed to "enhancement", I'd love to have the feature I described.

@dangoslen dangoslen added enhancement New feature or request and removed bug Something isn't working labels Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants