cliff.toml 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. # configuration file for git-cliff (0.1.0)
  2. [changelog]
  3. # changelog header
  4. header = """
  5. # Changelog\n
  6. All notable changes to this project will be documented in this file.\n
  7. """
  8. # template for the changelog body
  9. # https://tera.netlify.app/docs/#introduction
  10. body = """
  11. {% if version %}\
  12. ## [{{ version | trim_start_matches(pat="v") }}]
  13. {% else %}\
  14. ## [unreleased]
  15. {% endif %}\
  16. {% for group, commits in commits | group_by(attribute="group") %}
  17. ### {{ group | upper_first }}
  18. {% for commit in commits
  19. | filter(attribute="scope")
  20. | sort(attribute="scope") %}
  21. - _({{commit.scope}})_ {{ commit.message | upper_first }}
  22. {%- if commit.breaking %}
  23. {% raw %} {% endraw %}- **BREAKING**: {{commit.breaking_description}}
  24. {%- endif -%}
  25. {%- endfor %}
  26. {% for commit in commits %}
  27. {%- if commit.scope -%}
  28. {% else -%}
  29. - {{ commit.message | upper_first }}
  30. {% if commit.breaking -%}
  31. {% raw %} {% endraw %}- **BREAKING**: {{commit.breaking_description}}
  32. {% endif -%}
  33. {% endif -%}
  34. {% endfor -%}
  35. {% raw %}{% endraw %}\
  36. {% endfor %}\n
  37. """
  38. # remove the leading and trailing whitespaces from the template
  39. trim = true
  40. # changelog footer
  41. footer = """
  42. <!-- generated by git-cliff -->
  43. """
  44. [git]
  45. # allow only conventional commits
  46. # https://www.conventionalcommits.org
  47. conventional_commits = true
  48. # filter out the commits that are not conventional
  49. filter_unconventional = true
  50. # regex for parsing and grouping commits
  51. commit_parsers = [
  52. { message = "(.*bump|.*Bump)", group = "<!-- 7 --> Miscellaneous Tasks", skip = true},
  53. { message = "^build", group = "<!-- 0 --> Packaging"},
  54. { message = "(^feat|^Feat|^\\[Feat)", group = "<!-- 1 --> Features"},
  55. { message = "(^bug|^Bug|^fix)", group = "<!-- 2 --> Bugfix"},
  56. { message = "^refactor", group = "<!-- 3 --> Refactor"},
  57. { message = "^doc", group = "<!-- 4 --> Documentation"},
  58. { message = "^revert", group = "<!-- 5 --> Revert"},
  59. { message = "^perf", group = "<!-- 6 --> Performance"},
  60. { message = "^chore", group = "<!-- 7 --> Miscellaneous Tasks", skip = true},
  61. { message = "^ci", group = "<!-- 7 --> Miscellaneous Tasks", skip = true},
  62. { message = "^test", group = "<!-- 7 --> Miscellaneous Tasks", skip = true},
  63. ]
  64. # filter out the commits that are not matched by commit parsers
  65. filter_commits = false
  66. # glob pattern for matching git tags
  67. tag_pattern = "v[0-9]*"
  68. # regex for skipping tags
  69. skip_tags = "v0.1.0-beta.1"
  70. # regex for ignoring tags
  71. ignore_tags = ""
  72. # sort the tags topologically
  73. topo_order = false
  74. # sort the commits inside sections by oldest/newest order
  75. sort_commits = "oldest"
  76. [features]
  77. preserve_order = ["serde_json/preserve_order"]