cliff.toml 2.9 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. - {% if commit.breaking %}[**breaking**] {% endif %}_({{commit.scope}})_ {{ commit.message }}
  22. {%- endfor %}
  23. {% for commit in commits %}
  24. {%- if commit.scope -%}
  25. {% else -%}
  26. - {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message }}
  27. {% endif -%}
  28. {% endfor -%}
  29. {% raw %}{% endraw %}\
  30. {% endfor %}\n
  31. """
  32. # remove the leading and trailing whitespaces from the template
  33. trim = true
  34. # changelog footer
  35. footer = """
  36. <!-- generated by git-cliff -->
  37. """
  38. [git]
  39. # allow only conventional commits
  40. # https://www.conventionalcommits.org
  41. conventional_commits = true
  42. # filter out the commits that are not conventional
  43. filter_unconventional = true
  44. # regex for parsing and grouping commits
  45. commit_preprocessors = [
  46. { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](https://github.com/lunarvim/lunarvim/pull/${2}))"},
  47. ]
  48. commit_parsers = [
  49. { message = "(.*[bB]ump)", group = "<!-- 7 --> Miscellaneous Tasks", skip = true},
  50. { message = "^[bB]uild", group = "<!-- 0 --> Packaging"},
  51. { message = "(^[fF]eat|^\\[Feat)", group = "<!-- 1 --> Features"},
  52. { message = "(^[bB]ug|^[Ff]ix|^\\[Bug)", group = "<!-- 2 --> Bugfix"},
  53. { message = "(^[rR]efactor|^ref)", group = "<!-- 3 --> Refactor"},
  54. { message = "^[dD]oc", group = "<!-- 4 --> Documentation"},
  55. { message = "^[rR]evert", group = "<!-- 5 --> Revert"},
  56. { message = "^[pP]erf", group = "<!-- 6 --> Performance"},
  57. { message = "^[cC]hore", group = "<!-- 7 --> Miscellaneous Tasks", skip = true},
  58. { message = "^ci", group = "<!-- 7 --> Miscellaneous Tasks", skip = true},
  59. { message = "^test", group = "<!-- 7 --> Miscellaneous Tasks", skip = true},
  60. { message = "[wW]orkflow", group = "<!-- 7 --> Miscellaneous Tasks", skip = true},
  61. ]
  62. # filter out the commits that are not matched by commit parsers
  63. filter_commits = false
  64. # glob pattern for matching git tags
  65. tag_pattern = "v[0-9]*"
  66. # regex for skipping tags
  67. skip_tags = "v0.1.0-beta.1"
  68. # regex for ignoring tags
  69. ignore_tags = ""
  70. # sort the tags topologically
  71. topo_order = false
  72. # sort the commits inside sections by oldest/newest order
  73. sort_commits = "oldest"
  74. # protect breaking changes from being skipped due to matching a skipping commit_parser
  75. protect_breaking_commits = false
  76. [features]
  77. preserve_order = ["serde_json/preserve_order"]