-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
title_format
doesn't work in 21.9.0
#386
Comments
I see that this functionality was touched as part of #346 and the code is here towncrier/src/towncrier/build.py Line 142 in 21c1174
The default template is at https://github.com/twisted/towncrier/blob/master/src/towncrier/templates/default.rst |
Ok. I think that the quick fix is to update your template and add at the start
to match the default template. The current towncrier config is a bit of mess. I think most configuration values are only valid when using the default template. |
I tried to add the lines to the Output of
The correct output should be
|
I even tried to use the https://github.com/twisted/towncrier/blob/master/src/towncrier/templates/default.rst without any change and the output of
|
Hm... I don't know what is going on there. I did a trial run on the releaese code and I can see that the title is included.
I don't know what is going on there. You can try to force your luck using
|
Hm, it seems that the issue must be somewhere in my configuration than. I will try to look at it more closely later. |
The behavior of the towncrier is inconsistent in this case. I used the default template again and now it worked. So I tried to add the macro I have in my own and it stopped working, so I removed the macro again and now the title doesn't work anymore, even if I'm in the same state that worked before. Does towncrier has any cache or something, that could cause this? EDIT: When commenting out all the templates in configuration it started working again :-D |
After some playing I figured out that the issue is actually in https://github.com/twisted/towncrier/blob/523f6ef428885ed80c2ba377fe5b5ad043818766/src/towncrier/_builder.py#L291= the I have Jinja2 3.1.2 in my virtual env. |
It seems that the current master has plenty of changes till then. Let me check the default from the release. |
When I copied over this part of default template from the 21.9.0
to my template it started working like a charm :-) It looks that the only thing I was missing was the |
Yes. The There is missing documentation for towncrier template design API and no commitment from towncrier devs to keep backward compatibility. towncrier/src/towncrier/_builder.py Lines 284 to 292 in 21c1174
The main issue is that towncrier lacks some dev love ... so there is no much we can do now. It is too late to fix the change now. |
I think that this can be closed. Somehow a fix would be to write documentation for what is public API available inside the templates. |
We are having this issue too. The fix that @Zlopez had of adding things to the template, will that continue working, or is there another workaround we'll need in the next release? |
Hi, The available variables are documented here https://towncrier.readthedocs.io/en/latest/configuration.html @timwsuqld what is the content of your template, what is the expected result, and what is the actual result? More details about the issue would help :)
|
I have
title_format = "{version} ({project_date})"
in my pyproject.toml[towncrier]
section and in towncrier 21.9.0 this seems to be ignored. The title is missing in both--draft
and the generated file.This worked in the past, but with the latest version it doesn't work anymore.
The whole configuration file can be found here.
The text was updated successfully, but these errors were encountered: