Orphans in non showcontent categories#612
Conversation
11f7606 to
86911a1
Compare
…ents in non-showcontent categories
| {% for category, val in definitions.items() if category in sections[section] %} | ||
| ### {{ definitions[category]['name'] }} | ||
|
|
||
| {% if definitions[category]['showcontent'] %} |
There was a problem hiding this comment.
I think that we should add an 612.removal fragment, informat that when showcontent = False the template will no longer receive the fragment content.
This is a note, just in case someone was missusing this feature with a custom template.
There was a problem hiding this comment.
I think there's some confusion here. The existing behaviour is already that fragment content is not sent to the template (https://github.com/twisted/towncrier/pull/612/files#diff-36db088409efe07783d49792a18cec6ae3778ace338bf1cd08daa8a3fce29e93L166). This change just means that orphan fragment contents are sent.
There was a problem hiding this comment.
True. My bad. I misinterpreted the changes in the code.
adiroiban
left a comment
There was a problem hiding this comment.
Thanks. Looks good.
My only major comment is to add a .removal release note informing that the Jinja2 template will no longer receive the fragment content, for showcontent = False categories.
* Refactor rendering of title via config.title_format * Add newsfragment * Config docs * Fix restructuredtext formatting error
…wisted#608) * Refactor issue_key function to sort issues in a human-friendly way * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Rename newsfragment * Small improvement to test to show how text with numeric issues are sorted * Update src/towncrier/_builder.py docstring grammar Co-authored-by: Adi Roiban <adiroiban@gmail.com> * clarify new behaviour in newsfragment * Add some docstrings/comments to tests * linelength fix * Clarify news fragments vs tickets Co-authored-by: Adi Roiban <adiroiban@gmail.com> * Consistent use of "issue" rather than "ticket" * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * typo --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Adi Roiban <adiroiban@gmail.com>
adiroiban
left a comment
There was a problem hiding this comment.
All good. Thanks.
Sorry for the previous review that was mediocre.
Description
Currently, orphans (newsfragments without an issue number) don't display correctly in a non "showcontent" category, such as the "misc" category.
These fragments don't have an issue number, but if they were important enough to have a fragment, I still think their content should then be shown.
Checklist
src/towncrier/newsfragments/. Describe yourchange and include important information. Your change will be included in the public release notes.