twisted / towncrier

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

Don't render the issue reference when issue_format is not defined. #544

Open thet opened 9 months ago

thet commented 9 months ago

I'd like to disable the issue reference for issue_template at all. For one project we do not create issues which could be referenced.

Currently I'm doing a issue_format: "" in the pyproject.toml which generates empty parenthesis in the news entry like - NEWS TEXT. (). This is currently fine, but disabling would be even better.

adiroiban commented 9 months ago

Hi Johannes

Thanks for the report. I think that it would be nice to have this functionality.

That is, if issue_format is empty, don't include the parenthesis.


I did a quick check for the code, and it looks like this is not an easy fix.

I was hopping to have all this generated via Jinja2, but it looks like there is custom python code.

https://github.com/twisted/towncrier/blob/806bec1248b0ea8b86db21e0ce90b1849d3cd721/src/towncrier/_builder.py#L228

and

https://github.com/twisted/towncrier/blob/806bec1248b0ea8b86db21e0ce90b1849d3cd721/src/towncrier/_builder.py#L239