cliff.toml 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. # git-cliff ~ configuration file
  2. # https://git-cliff.org/docs/configuration
  3. [changelog]
  4. # template for the changelog footer
  5. header = """
  6. # Changelog\n
  7. All notable changes to this project will be documented in this file.
  8. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
  9. and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n
  10. """
  11. # template for the changelog body
  12. # https://keats.github.io/tera/docs/#introduction
  13. body = """
  14. {% if version -%}
  15. ## [v{{ version | trim_start_matches(pat="v") }}]
  16. {% else -%}
  17. ## [Unreleased]
  18. {% endif -%}
  19. {% for group, commits in commits | group_by(attribute="group") %}
  20. ### {{ group | striptags }}
  21. {% for commit in commits %}
  22. - [{{ commit.id | truncate(length=7, end="") }}](https://github.com/williamdes/mariadb-mysql-kbs/commit/{{ commit.id }}) {{ commit.message }}\
  23. {% endfor %}
  24. {% endfor %}\n
  25. """
  26. # template for the changelog footer
  27. footer = """
  28. {% for release in releases -%}
  29. {% if release.version -%}
  30. {% if release.previous.version -%}
  31. [{{ release.version | trim_start_matches(pat="v") }}]: \
  32. https://github.com/williamdes/mariadb-mysql-kbs\
  33. /compare/{{ release.previous.version }}..{{ release.version }}
  34. {% endif -%}
  35. {% else -%}
  36. [unreleased]: https://github.com/williamdes/mariadb-mysql-kbs\
  37. /compare/{{ release.previous.version }}..HEAD
  38. {% endif -%}
  39. {% endfor %}
  40. <!-- generated by git-cliff -->
  41. """
  42. # remove the leading and trailing whitespace from the templates
  43. trim = true
  44. [git]
  45. # parse the commits based on https://www.conventionalcommits.org
  46. conventional_commits = true
  47. # filter out the commits that are not conventional
  48. filter_unconventional = false
  49. # process each line of a commit as an individual commit
  50. split_commits = false
  51. # regex for parsing and grouping commits
  52. commit_parsers = [
  53. { body = "^.*[changelog skip].*$", skip = true },
  54. { message = "^update", group = "<!-- 0 -->Changed" },
  55. { message = "^removed", group = "<!-- 0 -->Removed" },
  56. { message = "^add", group = "<!-- 0 -->Added" },
  57. { message = "^added", group = "<!-- 0 -->Added" },
  58. { message = "^doc", group = "<!-- 3 -->Documentation" },
  59. { message = "^docs", group = "<!-- 3 -->Documentation" },
  60. { message = "^fix", group = "<!-- 1 -->Fixed" },
  61. { message = "^feat", group = "<!-- 2 -->Features" },
  62. { message = "^perf", group = "<!-- 4 -->Performance" },
  63. { message = "^refactor", group = "<!-- 5 -->Refactor" },
  64. { message = "^style", skip = true },
  65. { message = "^test", group = "<!-- 6 -->Testing" },
  66. { message = "^chore|^ci", group = "<!-- 7 -->Others" },
  67. ]
  68. # protect breaking changes from being skipped due to matching a skipping commit_parser
  69. protect_breaking_commits = false
  70. # filter out the commits that are not matched by commit parsers
  71. filter_commits = true
  72. # regex for matching git tags
  73. tag_pattern = "v[0-9].*"
  74. # regex for skipping tags
  75. skip_tags = "v0.1.0-beta.1"
  76. # regex for ignoring tags
  77. ignore_tags = ""
  78. # sort the tags topologically
  79. topo_order = false
  80. # sort the commits inside sections by oldest/newest order
  81. sort_commits = "newest"