Skip to content

Commit

Permalink
style(CHANGELOG.md): rename the default template as CHANGELOG.md.j2
Browse files Browse the repository at this point in the history
  • Loading branch information
noirbizarre authored and Lee-W committed Oct 18, 2023
1 parent 3adc171 commit 241faad
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion commitizen/changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions docs/customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -442,15 +442,15 @@ 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

There is 3 parameters available to change the template rendering from your custom `BaseCommitizen`.

| 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 |

Expand All @@ -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

Expand Down

0 comments on commit 241faad

Please sign in to comment.