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

Add filter to cargo changelog and map conventional commits 1:1 #6

Open
simonsan opened this issue Jan 23, 2022 · 1 comment
Open

Add filter to cargo changelog and map conventional commits 1:1 #6

simonsan opened this issue Jan 23, 2022 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@simonsan
Copy link

[TRACE] Skipping unknown git-conventional kind "chore" and all 2 message(s) in it.

Maybe I'm doing something wrong, but I can't get cargo-smart-release to "find" conventional commit types like chore or feat(x). Is there something I've overlooked or doing wrong?

After a bit of research it seems that the conventional commit type is being parsed from the message, but cargo changelog doesn't want them to be written to the changelog.

I see that in the changelog generation it's not being matched for e.g. chore: https://github.com/Byron/gitoxide/blob/fbe2c93b13fc05414dc5c7d80f4197d279b6b81b/cargo-smart-release/src/changelog/section/segment.rs#L26 while in https://github.com/Byron/gitoxide/blob/fbe2c93b13fc05414dc5c7d80f4197d279b6b81b/cargo-smart-release/src/commit/message.rs#L122 these clearly exist.

I'm asking myself if it would be sensible to do the mapping 1:1 in regards to conventional commits and pass a filter to cargo changelog where someone could state that they might not want to have chores printed to the changelog file or have their own mapping parsed from a toml configuration file.

As said above, if I'm overlooking something, please correct me. :)

Thanks for the nice tooling!

@Byron
Copy link
Owner

Byron commented Jan 24, 2022

That's great research right there and I can assure you that nothing has been missed. This oddity was intentional knowing that I could write a tool that just suits me, with my preferences hard-coded.

However, I see (and happily so) that cargo smart-release outgrows its original audience (me) and that comes with changing requirements. I think it's fair to not be surprising and as a first step, pass on 'kind' names unchanged with the option of passing additional filters on the command-line or via configuration files.

For now the fix is only available on main, and I will create a new release once GitoxideLabs/gitoxide#316 is fixed.

Thanks for giving it a shot!

Byron referenced this issue in GitoxideLabs/gitoxide Jan 24, 2022
…ntional messages (#318)

Previously we would intentionally avoid writing out information about
refactors or chores as they are not deemed useful in a changelog.

However, this can be confusing for anyone but the original author.

We now write them as seen.

Future iterations on this may consider adding more options
to configure which sections should go into the changelog.
@Byron Byron added the enhancement New feature or request label Nov 19, 2022
@Byron Byron transferred this issue from GitoxideLabs/gitoxide Aug 23, 2023
@Byron Byron added the help wanted Extra attention is needed label Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants