1
0

cliff.toml 2.5 KB

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