Closed SmileyChris closed 3 months ago
Thanks for the PR.
I am not using the create
command, so there is not much UI/UX feedback I can provide.
As long as you are happy with the behaviour, we can merge it.
I am tring to understand what "sections" is in the context of towncrier.
I am reading something about it here https://towncrier.readthedocs.io/en/latest/configuration.html#sections
Especially the part from Section Path Behaviour
is confusing.
I think that it needs better example.
For example
If
directory
is not set, “newsfragments” is added to the end of each path. For example, with the above sections, the paths would be:
Which directory
, I guess that this is [tool.towncrier] -> directory
Are people using this behaviour ?
To me, this all seems very confusing.
Description
towncrier create
should work better with sections if defined in the configuration file.This adds a new
towncrier create --section <section name>
option, or if you're using the new interactive create then you'll be asked for the section if there are multiple ones defined in your config:If you use sections and none have an empty path, you must now specify the section when creating a new news fragment (if one does have an empty path, that section will be used by default).
This PR also deduplicates the code that determines the base fragment path which was done in three places!
Checklist
src/towncrier/newsfragments/
. Describe your change and include important information. Your change will be included in the public release notes.docs/tutorial.rst
is still up-to-date.docs/cli.rst
reflects those changes.docs/configuration.rst
reflects those changes.