Skip to content

Commit

Permalink
refactor(config): update description and documentation for option `ch…
Browse files Browse the repository at this point in the history
…angelog.header`

Updated description and documentation for option `changelog.header`.
  • Loading branch information
Cyclonit committed Mar 18, 2024
1 parent a5b599f commit 3be276d
Show file tree
Hide file tree
Showing 61 changed files with 695 additions and 565 deletions.
15 changes: 7 additions & 8 deletions .github/fixtures/new-fixture-template/cliff.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
[changelog]
# changelog header
# A static header for the changelog.
header = """
# Changelog\n
All notable changes to this project will be documented in this file.\n
"""
# template for the changelog body
# https://keats.github.io/tera/docs/#introduction
body = """
# A Tera template to be rendered for each release in the changelog (see https://keats.github.io/tera/docs/#introduction).
body_template = """
{% if version %}\
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
Expand All @@ -19,12 +18,12 @@ body = """
{% endfor %}
{% endfor %}\n
"""
# template for the changelog footer
footer = """
# A Tera template to be rendered as the changelog's footer (see https://keats.github.io/tera/docs/#introduction).
footer_template = """
<!-- generated by git-cliff -->
"""
# remove the leading and trailing whitespace from the templates
trim = true
# Whether to remove leading and trailing whitespaces from all lines of the changelog's body.
trim_body_whitespace = true

[commit]
# A list of parsers using regex for extracting data from the commit message.
Expand Down
15 changes: 7 additions & 8 deletions .github/fixtures/test-bump-version-keep-zerover/cliff.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
[changelog]
# changelog header
# A static header for the changelog.
header = """
# Changelog\n
All notable changes to this project will be documented in this file.\n
"""
# template for the changelog body
# https://keats.github.io/tera/docs/#introduction
body = """
# A Tera template to be rendered for each release in the changelog (see https://keats.github.io/tera/docs/#introduction).
body_template = """
{% if version %}\
## [{{ version | trim_start_matches(pat="v") }}]
{% else %}\
Expand All @@ -19,12 +18,12 @@ body = """
{% endfor %}
{% endfor %}\n
"""
# template for the changelog footer
footer = """
# A Tera template to be rendered as the changelog's footer (see https://keats.github.io/tera/docs/#introduction).
footer_template = """
<!-- generated by git-cliff -->
"""
# remove the leading and trailing whitespace from the templates
trim = true
# Whether to remove leading and trailing whitespaces from all lines of the changelog's body.
trim_body_whitespace = true

[bump]
features_always_bump_minor = false
Expand Down
15 changes: 7 additions & 8 deletions .github/fixtures/test-bump-version/cliff.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
[changelog]
# changelog header
# A static header for the changelog.
header = """
# Changelog\n
All notable changes to this project will be documented in this file.\n
"""
# template for the changelog body
# https://keats.github.io/tera/docs/#introduction
body = """
# A Tera template to be rendered for each release in the changelog (see https://keats.github.io/tera/docs/#introduction).
body_template = """
{% if version %}\
## [{{ version | trim_start_matches(pat="v") }}]
{% else %}\
Expand All @@ -19,9 +18,9 @@ body = """
{% endfor %}
{% endfor %}\n
"""
# template for the changelog footer
footer = """
# A Tera template to be rendered as the changelog's footer (see https://keats.github.io/tera/docs/#introduction).
footer_template = """
<!-- generated by git-cliff -->
"""
# remove the leading and trailing whitespace from the templates
trim = true
# Whether to remove leading and trailing whitespaces from all lines of the changelog's body.
trim_body_whitespace = true
15 changes: 7 additions & 8 deletions .github/fixtures/test-bumped-version/cliff.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
[changelog]
# changelog header
# A static header for the changelog.
header = """
# Changelog\n
All notable changes to this project will be documented in this file.\n
"""
# template for the changelog body
# https://keats.github.io/tera/docs/#introduction
body = """
# A Tera template to be rendered for each release in the changelog (see https://keats.github.io/tera/docs/#introduction).
body_template = """
{% if version %}\
## [{{ version | trim_start_matches(pat="v") }}]
{% else %}\
Expand All @@ -19,9 +18,9 @@ body = """
{% endfor %}
{% endfor %}\n
"""
# template for the changelog footer
footer = """
# A Tera template to be rendered as the changelog's footer (see https://keats.github.io/tera/docs/#introduction).
footer_template = """
<!-- generated by git-cliff -->
"""
# remove the leading and trailing whitespace from the templates
trim = true
# Whether to remove leading and trailing whitespaces from all lines of the changelog's body.
trim_body_whitespace = true
15 changes: 7 additions & 8 deletions .github/fixtures/test-commit-footers/cliff.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
[changelog]
# changelog header
# A static header for the changelog.
header = """
# Changelog\n
All notable changes to this project will be documented in this file.\n
"""
# template for the changelog body
# https://keats.github.io/tera/docs/#introduction
body = """
# A Tera template to be rendered for each release in the changelog (see https://keats.github.io/tera/docs/#introduction).
body_template = """
{% if version %}\
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
Expand All @@ -22,9 +21,9 @@ body = """
{% endfor %}
{% endfor %}\n
"""
# template for the changelog footer
footer = """
# A Tera template to be rendered as the changelog's footer (see https://keats.github.io/tera/docs/#introduction).
footer_template = """
<!-- generated by git-cliff -->
"""
# remove the leading and trailing whitespace from the templates
trim = true
# Whether to remove leading and trailing whitespaces from all lines of the changelog's body.
trim_body_whitespace = true
15 changes: 7 additions & 8 deletions .github/fixtures/test-commit-preprocessors/cliff.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
[changelog]
# changelog header
# A static header for the changelog.
header = """
# Changelog\n
All notable changes to this project will be documented in this file.\n
"""
# template for the changelog body
# https://keats.github.io/tera/docs/#introduction
body = """
# A Tera template to be rendered for each release in the changelog (see https://keats.github.io/tera/docs/#introduction).
body_template = """
{% if version %}\
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
Expand All @@ -19,12 +18,12 @@ body = """
{% endfor %}
{% endfor %}\n
"""
# template for the changelog footer
footer = """
# A Tera template to be rendered as the changelog's footer (see https://keats.github.io/tera/docs/#introduction).
footer_template = """
<!-- generated by git-cliff -->
"""
# remove the leading and trailing whitespace from the templates
trim = true
# Whether to remove leading and trailing whitespaces from all lines of the changelog's body.
trim_body_whitespace = true

[commit]
# A list of preprocessors to modify commit messages using regex prior to further processing.
Expand Down
17 changes: 7 additions & 10 deletions .github/fixtures/test-custom-scope/cliff.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
[changelog]
# changelog header
# A static header for the changelog.
header = """
# Changelog\n
All notable changes to this project will be documented in this file.\n
"""
# template for the changelog body
# https://keats.github.io/tera/docs/#introduction
body = """
# A Tera template to be rendered for each release in the changelog (see https://keats.github.io/tera/docs/#introduction).
body_template = """
{% if version %}\
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
Expand All @@ -22,14 +21,12 @@ body = """
{% endfor %}\
{% endfor %}\n
"""
# template for the changelog footer
footer = """
# A Tera template to be rendered as the changelog's footer (see https://keats.github.io/tera/docs/#introduction).
footer_template = """
<!-- generated by git-cliff -->
"""
# remove the leading and trailing whitespace from the templates
trim = true

[release]
# Whether to remove leading and trailing whitespaces from all lines of the changelog's body.
trim_body_whitespace = true

[commit]
# A list of parsers using regex for extracting data from the commit message.
Expand Down
15 changes: 7 additions & 8 deletions .github/fixtures/test-custom-tag-pattern/cliff.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
[changelog]
# changelog header
# A static header for the changelog.
header = """
# Changelog\n
All notable changes to this project will be documented in this file.\n
"""
# template for the changelog body
# https://keats.github.io/tera/docs/#introduction
body = """
# A Tera template to be rendered for each release in the changelog (see https://keats.github.io/tera/docs/#introduction).
body_template = """
{% if version %}\
## [{{ version | trim_start_matches(pat="alpha-") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
Expand All @@ -19,12 +18,12 @@ body = """
{% endfor %}
{% endfor %}\n
"""
# template for the changelog footer
footer = """
# A Tera template to be rendered as the changelog's footer (see https://keats.github.io/tera/docs/#introduction).
footer_template = """
<!-- generated by git-cliff -->
"""
# remove the leading and trailing whitespace from the templates
trim = true
# Whether to remove leading and trailing whitespaces from all lines of the changelog's body.
trim_body_whitespace = true

[commit]
# A list of parsers using regex for extracting data from the commit message.
Expand Down
15 changes: 7 additions & 8 deletions .github/fixtures/test-date-order/cliff.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
[changelog]
# changelog header
# A static header for the changelog.
header = """
# Changelog\n
All notable changes to this project will be documented in this file.\n
"""
# template for the changelog body
# https://keats.github.io/tera/docs/#introduction
body = """
# A Tera template to be rendered for each release in the changelog (see https://keats.github.io/tera/docs/#introduction).
body_template = """
{% if version %}\
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
Expand All @@ -19,9 +18,9 @@ body = """
{% endfor %}
{% endfor %}\n
"""
# template for the changelog footer
footer = """
# A Tera template to be rendered as the changelog's footer (see https://keats.github.io/tera/docs/#introduction).
footer_template = """
<!-- generated by git-cliff -->
"""
# remove the leading and trailing whitespace from the templates
trim = true
# Whether to remove leading and trailing whitespaces from all lines of the changelog's body.
trim_body_whitespace = true
15 changes: 7 additions & 8 deletions .github/fixtures/test-footer-template/cliff.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
[changelog]
# changelog header
# A static header for the changelog.
header = """
# Changelog\n
All notable changes to this project will be documented in this file.\n
"""
# template for the changelog body
# https://keats.github.io/tera/docs/#introduction
body = """
# A Tera template to be rendered for each release in the changelog (see https://keats.github.io/tera/docs/#introduction).
body_template = """
{% if version %}\
## [{{ version | trim_start_matches(pat="v") }}]
{% else %}\
Expand All @@ -19,8 +18,8 @@ body = """
{% endfor %}
{% endfor %}\n
"""
# template for the changelog footer
footer = """
# A Tera template to be rendered as the changelog's footer (see https://keats.github.io/tera/docs/#introduction).
footer_template = """
{% for release in releases %}\
{% if release.version %}\
{% if release.previous.version %}\
Expand All @@ -31,5 +30,5 @@ footer = """
{% endif %}\
{% endfor %}\
"""
# remove the leading and trailing whitespace from the templates
trim = true
# Whether to remove leading and trailing whitespaces from all lines of the changelog's body.
trim_body_whitespace = true
15 changes: 6 additions & 9 deletions .github/fixtures/test-github-integration/cliff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ owner = "orhun"
repo = "git-cliff-readme-example"

[changelog]
# template for the changelog body
# https://keats.github.io/tera/docs/#introduction
body = """
# A Tera template to be rendered for each release in the changelog (see https://keats.github.io/tera/docs/#introduction).
body_template = """
## What's Changed
{%- if version %} in {{ version }}{%- endif -%}
Expand All @@ -31,15 +30,13 @@ body = """
{% raw %}\n{% endraw %}
{% endif %}
"""
# remove the leading and trailing whitespace from the template
trim = true
# changelog footer
footer = """
# Whether to remove leading and trailing whitespaces from all lines of the changelog's body.
trim_body_whitespace = true
# A Tera template to be rendered as the changelog's footer (see https://keats.github.io/tera/docs/#introduction).
footer_template = """
<!-- generated by git-cliff -->
"""

[release]

[commit]
# Whether to parse commits according to the conventional commits specification.
# Sets the commits' `group` (= `type`), `scope`, `message` (= `description`), `body`, `breaking`, `breaking_description` and `footers`.
Expand Down
15 changes: 7 additions & 8 deletions .github/fixtures/test-ignore-tags/cliff.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
[changelog]
# changelog header
# A static header for the changelog.
header = """
# Changelog\n
All notable changes to this project will be documented in this file.\n
"""
# template for the changelog body
# https://keats.github.io/tera/docs/#introduction
body = """
# A Tera template to be rendered for each release in the changelog (see https://keats.github.io/tera/docs/#introduction).
body_template = """
{% if version %}\
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
Expand All @@ -19,12 +18,12 @@ body = """
{% endfor %}
{% endfor %}\n
"""
# template for the changelog footer
footer = """
# A Tera template to be rendered as the changelog's footer (see https://keats.github.io/tera/docs/#introduction).
footer_template = """
<!-- generated by git-cliff -->
"""
# remove the leading and trailing whitespace from the templates
trim = true
# Whether to remove leading and trailing whitespaces from all lines of the changelog's body.
trim_body_whitespace = true

[release]
# Regex to select git tags that do not represent proper releases. Takes precedence over `release.tags_pattern`.
Expand Down
Loading

0 comments on commit 3be276d

Please sign in to comment.