cliff.toml 2.6 KB

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