towncrier icon indicating copy to clipboard operation
towncrier copied to clipboard

Multiple fragment types for same fragment (e.g. `.bug` and `.bugfix`)

Open MaxWinterstein opened this issue 3 years ago • 1 comments

We have multiple developers and sometimes end up with changelog files like 123.bugfix.md and 123.bug.md.

I would love to have multiple fragment types grouped together.

Currently we use some CI task to verify no unknown fragments get committed, but I would love to see this as a feature.

Configuring multiple fragment types using the same name attribute just doubles the entry in the parsed changelog file.

MaxWinterstein avatar Sep 12 '22 08:09 MaxWinterstein

Thanks for the feedback.

Currently we use some CI task to verify no unknown fragments get committed, but I would love to see this as a feature.

This would be nice to be part of towncrier check CLI.


I don't understand what is the issue here?

What is the expected behaviour and what is the current behaviour?


I know that sometimes, for the same work ID / ticket ID / issue ID, I need to have separate bugfix entries.

I do a hack and have 123.bugfix and 123.1.bugfix ...


Right now, the full content of a fragment file is rewrapped.

What I can think of, is that if there is an empty new line, then a separate bullet entry is created in the final NEWS file

So for a file like 123.bugfix

Description of the first bugfix
on a wrapped line.

Another description of another bugfix.

The NEWS will be like


Bugfix
------

* Description of the first bugfix on a wrapped line. [#123]
* Another description of another bugfix. [#123]


adiroiban avatar Sep 12 '22 15:09 adiroiban

Currently we use some CI task to verify no unknown fragments get committed, but I would love to see this as a feature.

Relevant: https://github.com/twisted/towncrier/issues/619#issuecomment-2227483175 And with such a check you wouldn't have incorrectly named fragments slipping through.

Avasam avatar Jul 14 '24 21:07 Avasam

Thanks for the update.

We have PR #622

If you have time, please consider reviewing the changes from that PR and send your feedback if the proposed fix is good enough :)

adiroiban avatar Jul 15 '24 10:07 adiroiban