diff --git a/cliff.toml b/cliff.toml index f43b45bb4cf..bdaa51b8015 100644 --- a/cliff.toml +++ b/cliff.toml @@ -13,7 +13,9 @@ body = """ {%- endmacro -%} {%- macro pr_link(num) -%} - [#{{ num }}]({{ self::remote_url() }}/pull/{{ num }})\ + {%- if num -%} + {% raw %} {% endraw %}- [#{{ num }}]({{ self::remote_url() }}/pull/{{ num }})\ + {% endif -%} {%- endmacro -%} {% for group, commits in commits | group_by(attribute="group") %} @@ -51,11 +53,11 @@ body = """ {%- endif -%} {%- if themes -%} - - *{{ themes | join(sep="|") | replace(from="theme:", to="") }}*: {{ commit_message }} - {{ self::pr_link(num=commit.github.pr_number) }} + - *{{ themes | join(sep="|") | replace(from="theme:", to="") }}*: {{ commit_message }}{{ self::pr_link(num=commit.github.pr_number) }} {% elif commit.scope -%} - - *{{ commit.scope }}*: {{ commit_message }} - {{ self::pr_link(num=commit.github.pr_number) }} + - *{{ commit.scope }}*: {{ commit_message }}{{ self::pr_link(num=commit.github.pr_number) }} {% else -%} - - *{{ default_scope }}*: {{ commit_message }} - {{ self::pr_link(num=commit.github.pr_number) }} + - *{{ default_scope }}*: {{ commit_message }}{{ self::pr_link(num=commit.github.pr_number) }} {% endif -%} {%- endfor -%} {% endfor %} @@ -104,19 +106,19 @@ commit_parsers = [ { message = "version bump", skip = true }, { message = "prepare for release", skip = true }, { message = "Merge branch 'main' into", skip = true }, + { message = "Merge remote-tracking branch 'origin/main' into", skip = true }, # classify commits into sections - { message = "feat", group = ":rocket: Features" }, - { message = "doc", group = ":notebook: Documentation" }, - { message = "fix", group = ":bug: Bug Fixes" }, - { message = "perf", group = ":runner: Performance" }, - { message = "refactor", group = ":sailboat: Refactor" }, - { message = "style", group = ":nail_care: Styling" }, - { message = "test", group = ":mag_right: Testing" }, - { message = "ci:", group = ":mag_right: CI/CD" }, - { message = "chore", group = ":clipboard: Miscellaneous Tasks" }, + { message = "feat(\\(.+\\))?:", group = ":rocket: Features" }, + { message = "(doc|docs)(\\(.+\\))?:", group = ":notebook: Documentation" }, + { message = "fix(\\(.+\\))?:", group = ":bug: Bug Fixes" }, + { message = "perf(\\(.+\\))?:", group = ":runner: Performance" }, + { message = "(refactor|refactoring)(\\(.+\\))?:", group = ":sailboat: Refactor" }, + { message = "style(\\(.+\\))?:", group = ":nail_care: Styling" }, + { message = "(test|tests|testing)(\\(.+\\))?:", group = ":mag_right: Testing" }, + { message = "ci(\\(.+\\))?:", group = ":mag_right: CI/CD" }, + { message = "chore(\\(.+\\))?:", group = ":clipboard: Miscellaneous Tasks" }, { body = ".*security", group = ":lock: Security" }, - { message = ".*(deps|Bump).*", group = "Dependencies"}, { message = ".*", group = ":clipboard: Miscellaneous Tasks"}, ]