From 241faad85f6ebbdfc65b724da14ed6103293394d Mon Sep 17 00:00:00 2001 From: Axel H Date: Sat, 8 Apr 2023 15:13:07 +0200 Subject: [PATCH] style(CHANGELOG.md): rename the default template as `CHANGELOG.md.j2` --- commitizen/changelog.py | 2 +- .../{keep_a_changelog_template.j2 => CHANGELOG.md.j2} | 0 docs/customization.md | 6 +++--- 3 files changed, 4 insertions(+), 4 deletions(-) rename commitizen/templates/{keep_a_changelog_template.j2 => CHANGELOG.md.j2} (100%) diff --git a/commitizen/changelog.py b/commitizen/changelog.py index 2d26c9e0d..e839efca8 100644 --- a/commitizen/changelog.py +++ b/commitizen/changelog.py @@ -56,7 +56,7 @@ if TYPE_CHECKING: from commitizen.version_schemes import VersionScheme -DEFAULT_TEMPLATE = "keep_a_changelog_template.j2" +DEFAULT_TEMPLATE = "CHANGELOG.md.j2" def get_commit_tag(commit: GitCommit, tags: list[GitTag]) -> GitTag | None: diff --git a/commitizen/templates/keep_a_changelog_template.j2 b/commitizen/templates/CHANGELOG.md.j2 similarity index 100% rename from commitizen/templates/keep_a_changelog_template.j2 rename to commitizen/templates/CHANGELOG.md.j2 diff --git a/docs/customization.md b/docs/customization.md index b6ff6105d..0c86f60d2 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -442,7 +442,7 @@ Commitizen gives you the possibility to provide your own changelog template, by: - as `--template` parameter to both `bump` and `changelog` commands - either by providing a template with the same name as the default template -By default, the template used is the `keep_a_changelog_template.j2` file from the commitizen repository. +By default, the template used is the `CHANGELOG.md.j2` file from the commitizen repository. ### Providing a template with your customization class @@ -450,7 +450,7 @@ There is 3 parameters available to change the template rendering from your custo | Parameter | Type | Default | Description | | ----------------- | ------ | ------- | ----------------------------------------------------------------------------------------------------- | -| `template` | `str` | `None` | Provide your own template name (default to `keep_a_changelog_template.j2`) | +| `template` | `str` | `None` | Provide your own template name (default to `CHANGELOG.md.j2`) | | `template_loader` | `str` | `None` | Override the default template loader (so you can provide template from you customization class) | | `template_extras` | `dict` | `None` | Provide some extra template parameters | @@ -477,7 +477,7 @@ This snippet will: Users can provides their own template from their current working directory (your project root) by: -- providing a template with the same name (`keep_a_changelog_template.j2` unless overridden by your custom class) +- providing a template with the same name (`CHANGELOG.md.j2` unless overridden by your custom class) - setting your template path as `template` configuration - giving your template path as `--template` parameter to `bump` and `changelog` commands