mirror of
https://github.com/orhun/git-cliff.git
synced 2024-09-11 06:55:38 +03:00
style(config): further beautify the changelog in this repo
This commit is contained in:
parent
0bf5ebe79b
commit
fd7446ce2f
896
CHANGELOG.md
896
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
21
cliff.toml
21
cliff.toml
@ -15,7 +15,11 @@ All notable changes to this project will be documented in this file.\n
|
|||||||
# https://tera.netlify.app/docs/
|
# https://tera.netlify.app/docs/
|
||||||
body = """
|
body = """
|
||||||
{% if version %}\
|
{% if version %}\
|
||||||
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
|
{% if previous.version %}\
|
||||||
|
## [{{ version | trim_start_matches(pat="v") }}](<REPO>/compare/{{ previous.version }}..{{ version }}) - {{ timestamp | date(format="%Y-%m-%d") }}
|
||||||
|
{% else %}\
|
||||||
|
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
|
||||||
|
{% endif %}\
|
||||||
{% else %}\
|
{% else %}\
|
||||||
## [unreleased]
|
## [unreleased]
|
||||||
{% endif %}\
|
{% endif %}\
|
||||||
@ -25,14 +29,14 @@ body = """
|
|||||||
| filter(attribute="scope")
|
| filter(attribute="scope")
|
||||||
| sort(attribute="scope") %}
|
| sort(attribute="scope") %}
|
||||||
- *({{commit.scope}})*{% if commit.breaking %} [**breaking**]{% endif %} \
|
- *({{commit.scope}})*{% if commit.breaking %} [**breaking**]{% endif %} \
|
||||||
{{ commit.message | upper_first }}
|
{{ commit.message | upper_first }} - ([{{ commit.id | truncate(length=7, end="") }}](<REPO>/commit/{{ commit.id }}))
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{% raw %}\n{% endraw %}\
|
{% raw %}\n{% endraw %}\
|
||||||
{%- for commit in commits %}
|
{%- for commit in commits %}
|
||||||
{%- if commit.scope -%}
|
{%- if commit.scope -%}
|
||||||
{% else -%}
|
{% else -%}
|
||||||
- *(uncategorized)*{% if commit.breaking %} [**breaking**]{% endif %} \
|
- {% if commit.breaking %} [**breaking**]{% endif %}\
|
||||||
{{ commit.message | upper_first }}
|
{{ commit.message | upper_first }} - ([{{ commit.id | truncate(length=7, end="") }}](<REPO>/commit/{{ commit.id }}))
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
{% endfor -%}
|
{% endfor -%}
|
||||||
{% endfor %}\n
|
{% endfor %}\n
|
||||||
@ -43,6 +47,10 @@ trim = true
|
|||||||
footer = """
|
footer = """
|
||||||
<!-- generated by git-cliff -->
|
<!-- generated by git-cliff -->
|
||||||
"""
|
"""
|
||||||
|
# postprocessors
|
||||||
|
postprocessors = [
|
||||||
|
{ pattern = '<REPO>', replace = "https://github.com/orhun/git-cliff" }, # replace repository URL
|
||||||
|
]
|
||||||
|
|
||||||
[git]
|
[git]
|
||||||
# parse the commits based on https://www.conventionalcommits.org
|
# parse the commits based on https://www.conventionalcommits.org
|
||||||
@ -53,7 +61,7 @@ filter_unconventional = true
|
|||||||
split_commits = false
|
split_commits = false
|
||||||
# regex for preprocessing the commit messages
|
# regex for preprocessing the commit messages
|
||||||
commit_preprocessors = [
|
commit_preprocessors = [
|
||||||
{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](https://github.com/orhun/git-cliff/issues/${2}))" },
|
{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](<REPO>/issues/${2}))" },
|
||||||
]
|
]
|
||||||
# regex for parsing and grouping commits
|
# regex for parsing and grouping commits
|
||||||
commit_parsers = [
|
commit_parsers = [
|
||||||
@ -68,8 +76,9 @@ commit_parsers = [
|
|||||||
{ message = "^chore\\(deps\\)", skip = true },
|
{ message = "^chore\\(deps\\)", skip = true },
|
||||||
{ message = "^chore\\(pr\\)", skip = true },
|
{ message = "^chore\\(pr\\)", skip = true },
|
||||||
{ message = "^chore\\(pull\\)", skip = true },
|
{ message = "^chore\\(pull\\)", skip = true },
|
||||||
{ message = "^chore", group = "<!-- 7 -->⚙️ Miscellaneous Tasks" },
|
{ message = "^chore|ci", group = "<!-- 7 -->⚙️ Miscellaneous Tasks" },
|
||||||
{ body = ".*security", group = "<!-- 8 -->🛡️ Security" },
|
{ body = ".*security", group = "<!-- 8 -->🛡️ Security" },
|
||||||
|
{ message = "^revert", group = "<!-- 9 -->◀️ Revert" },
|
||||||
]
|
]
|
||||||
# protect breaking changes from being skipped due to matching a skipping commit_parser
|
# protect breaking changes from being skipped due to matching a skipping commit_parser
|
||||||
protect_breaking_commits = false
|
protect_breaking_commits = false
|
||||||
|
@ -32,7 +32,10 @@ trim = true
|
|||||||
footer = """
|
footer = """
|
||||||
<!-- generated by git-cliff -->
|
<!-- generated by git-cliff -->
|
||||||
"""
|
"""
|
||||||
|
# postprocessors
|
||||||
|
postprocessors = [
|
||||||
|
# { pattern = '<REPO>', replace = "https://github.com/orhun/git-cliff" }, # replace repository URL
|
||||||
|
]
|
||||||
[git]
|
[git]
|
||||||
# parse the commits based on https://www.conventionalcommits.org
|
# parse the commits based on https://www.conventionalcommits.org
|
||||||
conventional_commits = true
|
conventional_commits = true
|
||||||
@ -42,7 +45,7 @@ filter_unconventional = true
|
|||||||
split_commits = false
|
split_commits = false
|
||||||
# regex for preprocessing the commit messages
|
# regex for preprocessing the commit messages
|
||||||
commit_preprocessors = [
|
commit_preprocessors = [
|
||||||
# { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](https://github.com/orhun/git-cliff/issues/${2}))"}, # replace issue numbers
|
# { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](<REPO>/issues/${2}))"}, # replace issue numbers
|
||||||
]
|
]
|
||||||
# regex for parsing and grouping commits
|
# regex for parsing and grouping commits
|
||||||
commit_parsers = [
|
commit_parsers = [
|
||||||
|
Loading…
Reference in New Issue
Block a user