You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have several use cases where I need different git-cliff output formats while keeping exactly the same underlying configuration:
CHANGELOG.md + an RST version included in Sphinx.
Full CHANGELOG.md + latest-release-only output used as release description.
CHANGELOG.md + an RPM spec %changelog include.
Today, this requires duplicating the configuration even though only the templates differ, except for one preprocessor in the first case.
Would it make sense to support named template sets within a single configuration?
For example:
[changelog]
body = """# CHANGELOG"""
[changelog.rst]
body = """CHANGELOG========="""
Then git-cliff --template rst could select [changelog.rst], while omitting --template would retain the current [changelog] behavior. Requesting an undefined template would result in an error.
As an optional extension, preprocessors could also be scoped to a template:
A scoped preprocessor would only run for that template, while preprocessors without template would retain today's behavior. An empty template selector could be used to scope a preprocessor to the default template.
That part is not essential, though. In my case it could also be handled by preprocessing to intermediate markup and resolving it differently in each output template with replace_regex.
The main feature I am interested in is avoiding duplicated configuration when only the output templates differ.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hello.
I have several use cases where I need different git-cliff output formats while keeping exactly the same underlying configuration:
CHANGELOG.md+ an RST version included in Sphinx.CHANGELOG.md+ latest-release-only output used as release description.CHANGELOG.md+ an RPM spec%changeloginclude.Today, this requires duplicating the configuration even though only the templates differ, except for one preprocessor in the first case.
Would it make sense to support named template sets within a single configuration?
For example:
Then
git-cliff --template rstcould select[changelog.rst], while omitting--templatewould retain the current[changelog]behavior. Requesting an undefined template would result in an error.As an optional extension, preprocessors could also be scoped to a template:
A scoped preprocessor would only run for that template, while preprocessors without template would retain today's behavior. An empty template selector could be used to scope a preprocessor to the default template.
That part is not essential, though. In my case it could also be handled by preprocessing to intermediate markup and resolving it differently in each output template with
replace_regex.The main feature I am interested in is avoiding duplicated configuration when only the output templates differ.
All reactions