twisted / towncrier

Manage the release notes for your project.
https://towncrier.readthedocs.io
MIT License
755 stars 107 forks source link

Allow an empty name in the configuration #607

Closed SmileyChris closed 3 weeks ago

SmileyChris commented 3 weeks ago

If you want to just write the version number rather than the name in the fragment, you can explicitly specify it from the command line:

towncrier build --name ""

But if name in the configuration is string only, with a default of "" so for python packages you can't specify this as the default in your configuration.

It would be nice if the default of name was None, and you could set it explicitly to "" to not use a name when building.

The problem is that this is backwards incompatible though -- if someone currently has name: "" in their conf, then that it's changing the current behaviour...

adiroiban commented 3 weeks ago

I don't understand the use case here or what is the expected behaviour.

Basically, I don't understand "why you would want to do that" :)

Feel free to send a PR if this is something that bothers you.

Thanks

SmileyChris commented 3 weeks ago

To clarify, I wanted my changelog to look like this, without the name repeating for each version:

Change Log for MyProject

1.1 (2024-06-05)

  • ...

    1.0 (2024-05-04)

  • ...

But running towncrier build for a python project results in:

Change Log for MyProject

myproject_package 1.2 (2024-06-06)

...

It would be nice not having to rely on the command line of towncrier build --name "" and instead have the name config setting be made capable to do the same thing.

adiroiban commented 3 weeks ago

Why not use title_format ?

My understanding that title_format is designed to help create a custom title

SmileyChris commented 3 weeks ago

Derp, that seems like the correct way to do it!