-
Notifications
You must be signed in to change notification settings - Fork 265
Description
Feature Request
Description
Custom Jinja extensions configured via [tool.semantic_release.changelog.environment] are only available in
changelog templates, not in release notes templates (.release_notes.md.j2).
When using a custom extension:
[tool.semantic_release.changelog.environment]
extensions = ["my_package.ext:MyCustomExtension"]CHANGELOG.md.j2 can use filters from MyCustomExtension but .release_notes.md.j2 fails with "No filter named 'my_filter'"
This is because generate_release_notes() in changelog_writer.py creates a separate, non-configurable environment that ignores user settings.
Use cases
Users who customize their changelog templates with extensions usually expect the same formatting in GitHub releases, or at least being able to reuse custom Jinja filters etc.
Possible implementation
Apply the same changelog.environment configuration when creating the release notes Jinja environment in
generate_release_notes().
Alternative solutions
If intentional, document that release notes don't support custom extensions
This does not seem to be a very complex fix, happy to send a PR for this if we agree on the feature.