1
0

cliff.toml 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. # SPDX-FileCopyrightText: 2024 Christina Sørensen
  2. # SPDX-License-Identifier: EUPL-1.2
  3. # git-cliff ~ default configuration file
  4. # https://git-cliff.org/docs/configuration
  5. #
  6. # Lines starting with "#" are comments.
  7. # Configuration options are organized into tables and keys.
  8. # See documentation for more information on available options.
  9. [changelog]
  10. # changelog header
  11. header = """
  12. <!--
  13. SPDX-FileCopyrightText: 2024 Christina Sørensen
  14. SPDX-FileContributor: Christina Sørensen
  15. SPDX-License-Identifier: EUPL-1.2
  16. -->
  17. # Changelog\n
  18. """
  19. # template for the changelog body
  20. # https://tera.netlify.app/docs
  21. body = """
  22. {% if version %}\
  23. ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
  24. {% else %}\
  25. ## [unreleased]
  26. {% endif %}\
  27. {% for group, commits in commits | group_by(attribute="group") %}
  28. ### {{ group | upper_first }}
  29. {% for commit in commits %}
  30. - {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }}\
  31. {% endfor %}
  32. {% endfor %}\n
  33. """
  34. # remove the leading and trailing whitespace from the template
  35. trim = true
  36. # changelog footer
  37. footer = """
  38. """
  39. [git]
  40. # parse the commits based on https://www.conventionalcommits.org
  41. conventional_commits = true
  42. # filter out the commits that are not conventional
  43. filter_unconventional = true
  44. # process each line of a commit as an individual commit
  45. split_commits = false
  46. # regex for preprocessing the commit messages
  47. commit_preprocessors = [
  48. # { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](https://github.com/orhun/git-cliff/issues/${2}))"}, # replace issue numbers
  49. ]
  50. # regex for parsing and grouping commits
  51. commit_parsers = [
  52. { message = "^feat", group = "Features" },
  53. { message = "^fix", group = "Bug Fixes" },
  54. { message = "^docs", group = "Documentation" },
  55. { message = "^perf", group = "Performance" },
  56. { message = "^refactor", group = "Refactor" },
  57. { message = "^style", group = "Styling" },
  58. { message = "^test", group = "Testing" },
  59. { message = "^chore\\(release\\): prepare for", skip = true },
  60. { message = "^chore", group = "Miscellaneous Tasks" },
  61. { body = ".*security", group = "Security" },
  62. ]
  63. # protect breaking changes from being skipped due to matching a skipping commit_parser
  64. protect_breaking_commits = false
  65. # filter out the commits that are not matched by commit parsers
  66. filter_commits = false
  67. # glob pattern for matching git tags
  68. tag_pattern = "v[0-9]*"
  69. # regex for skipping tags
  70. skip_tags = "v0.1.0-beta.1"
  71. # regex for ignoring tags
  72. ignore_tags = ""
  73. # sort the tags topologically
  74. topo_order = false
  75. # sort the commits inside sections by oldest/newest order
  76. sort_commits = "oldest"
  77. # limit the number of commits included in the changelog.
  78. # limit_commits = 42