Compare commits
2 Commits
v1.1.0
...
d8bf0743f7
| Author | SHA1 | Date | |
|---|---|---|---|
|
d8bf0743f7
|
|||
|
a83ee3e88f
|
56
cliff.toml
56
cliff.toml
@@ -11,7 +11,7 @@ repo = "auto-changelog-release-action"
|
|||||||
|
|
||||||
[changelog]
|
[changelog]
|
||||||
postprocessors = [
|
postprocessors = [
|
||||||
{ pattern = '<GITEA_URL>', replace = "https://git.0xmax42.io" }, # replace gitea url
|
{ pattern = '<GITEA_URL>', replace = "https://git.0xmax42.io" }, # replace gitea url
|
||||||
]
|
]
|
||||||
|
|
||||||
header = """
|
header = """
|
||||||
@@ -24,6 +24,13 @@ body = """
|
|||||||
<GITEA_URL>/{{ remote.gitea.owner }}/{{ remote.gitea.repo }}
|
<GITEA_URL>/{{ remote.gitea.owner }}/{{ remote.gitea.repo }}
|
||||||
{%- endmacro -%}
|
{%- endmacro -%}
|
||||||
|
|
||||||
|
{%- macro indent(text, prefix=" ") -%}
|
||||||
|
{%- set lines = text | split(pat="\n") -%}
|
||||||
|
{%- for l in lines -%}
|
||||||
|
{{ prefix ~ l }}{% if not loop.last %}{{ "\n" }}{% endif %}
|
||||||
|
{%- endfor -%}
|
||||||
|
{%- endmacro -%}
|
||||||
|
|
||||||
{% if version %}\
|
{% if version %}\
|
||||||
{% if previous.version %}\
|
{% if previous.version %}\
|
||||||
## [{{ version | trim_start_matches(pat="v") }}]\
|
## [{{ version | trim_start_matches(pat="v") }}]\
|
||||||
@@ -40,9 +47,10 @@ body = """
|
|||||||
{% if commit.merge_commit %}\
|
{% if commit.merge_commit %}\
|
||||||
- 🔀 **{{ commit.message | upper_first }}** - \
|
- 🔀 **{{ commit.message | upper_first }}** - \
|
||||||
([{{ commit.id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ commit.id }}))\
|
([{{ commit.id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ commit.id }}))\
|
||||||
|
{% if commit.body %}\n{{ self::indent(text=commit.body, prefix=" ") }}{% endif %}\
|
||||||
{% if commit.extra and commit.extra.children %}\
|
{% if commit.extra and commit.extra.children %}\
|
||||||
{% for child in commit.extra.children %}
|
{% for child in commit.extra.children %}
|
||||||
{{ " " | safe }}- {% if child.scope %}*({{ child.scope }})* {% endif %}\
|
{{ " " | safe }}- {% if child.extra.mismatch_type %}**{{ child.extra.mismatch_type }}**:{% endif %}{% if child.scope %}*({{ child.scope }})* {% endif %}\
|
||||||
{% if child.breaking %}[**breaking**] {% endif %}\
|
{% if child.breaking %}[**breaking**] {% endif %}\
|
||||||
{{ child.message | upper_first }} - \
|
{{ child.message | upper_first }} - \
|
||||||
([{{ child.id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ child.id }}))\
|
([{{ child.id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ child.id }}))\
|
||||||
@@ -77,31 +85,31 @@ 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 = [
|
||||||
# Replace issue numbers
|
# Replace issue numbers
|
||||||
#{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](<REPO>/issues/${2}))"},
|
#{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](<REPO>/issues/${2}))"},
|
||||||
# Check spelling of the commit with https://github.com/crate-ci/typos
|
# Check spelling of the commit with https://github.com/crate-ci/typos
|
||||||
# If the spelling is incorrect, it will be automatically fixed.
|
# If the spelling is incorrect, it will be automatically fixed.
|
||||||
#{ pattern = '.*', replace_command = 'typos --write-changes -' },
|
#{ pattern = '.*', replace_command = 'typos --write-changes -' },
|
||||||
]
|
]
|
||||||
# regex for parsing and grouping commits
|
# regex for parsing and grouping commits
|
||||||
commit_parsers = [
|
commit_parsers = [
|
||||||
{ message = "^feat", group = "<!-- 0 -->🚀 Features" },
|
{ message = "^feat", group = "<!-- 0 -->🚀 Features" },
|
||||||
{ message = "^fix", group = "<!-- 1 -->🐛 Bug Fixes" },
|
{ message = "^fix", group = "<!-- 1 -->🐛 Bug Fixes" },
|
||||||
{ message = "^doc", group = "<!-- 3 -->📚 Documentation" },
|
{ message = "^doc", group = "<!-- 3 -->📚 Documentation" },
|
||||||
{ message = "^perf", group = "<!-- 4 -->⚡ Performance" },
|
{ message = "^perf", group = "<!-- 4 -->⚡ Performance" },
|
||||||
{ message = "^refactor", group = "<!-- 2 -->🚜 Refactor" },
|
{ message = "^refactor", group = "<!-- 2 -->🚜 Refactor" },
|
||||||
{ message = "^style", group = "<!-- 5 -->🎨 Styling" },
|
{ message = "^style", group = "<!-- 5 -->🎨 Styling" },
|
||||||
{ message = "^test", group = "<!-- 6 -->🧪 Testing" },
|
{ message = "^test", group = "<!-- 6 -->🧪 Testing" },
|
||||||
{ message = "^chore\\(changelog\\)", skip = true },
|
{ message = "^chore\\(changelog\\)", skip = true },
|
||||||
{ message = "^chore\\(version\\)", skip = true },
|
{ message = "^chore\\(version\\)", skip = true },
|
||||||
{ message = "^chore\\(release\\): prepare for", skip = true },
|
{ message = "^chore\\(release\\): prepare for", skip = true },
|
||||||
{ 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|^ci", 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" },
|
{ message = "^revert", group = "<!-- 9 -->◀️ Revert" },
|
||||||
{ message = ".*", group = "<!-- 10 -->💼 Other" },
|
{ message = ".*", group = "<!-- 10 -->💼 Other" },
|
||||||
]
|
]
|
||||||
# Regex to select git tags that represent releases.
|
# Regex to select git tags that represent releases.
|
||||||
tag_pattern = "v[0-9]+\\.[0-9]+\\.[0-9]+"
|
tag_pattern = "v[0-9]+\\.[0-9]+\\.[0-9]+"
|
||||||
|
|||||||
Reference in New Issue
Block a user