Cliff.toml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. # git-cliff ~ 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. # template for the changelog body
  9. # https://keats.github.io/tera/docs/#introduction
  10. body = """
  11. {%- macro remote_url() -%}
  12. https://github.com/magicblock-labs/bolt
  13. {%- endmacro -%}
  14. {% macro print_commit(commit) -%}
  15. {% if commit.message is matching("#") %} \
  16. - {{ commit.message | upper_first }} \
  17. {% endif %} \
  18. {% endmacro -%}
  19. {% if version %}\
  20. ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
  21. {% else %}\
  22. ## [unreleased]
  23. {% endif %}\
  24. {% for group, commits in commits | group_by(attribute="group") %}
  25. ### {{ group | striptags | trim | upper_first }}
  26. {% for commit in commits
  27. | filter(attribute="scope")
  28. | unique(attribute="message")
  29. | sort(attribute="scope") %}
  30. {{ self::print_commit(commit=commit) }}
  31. {%- endfor -%}
  32. {% raw %}\n{% endraw %}\
  33. {%- for commit in commits %}
  34. {%- if not commit.scope -%}
  35. {{ self::print_commit(commit=commit) }}
  36. {% endif -%}
  37. {% endfor -%}
  38. {% endfor %}\n
  39. """
  40. # remove the leading and trailing whitespace from the templates
  41. trim = true
  42. # postprocessors
  43. postprocessors = [
  44. { pattern = '<REPO>', replace = "https://github.com/magicblock-labs/bolt" },
  45. { pattern = '\* :.*', replace = "" },
  46. { pattern = '\s*\n', replace = "\n" },
  47. { pattern = '\n.*(R|r)elease.*\n', replace = "" },
  48. { pattern = '### 🐛 Bug Fixes', replace = "\n### 🐛 Bug Fixes" },
  49. { pattern = '##', replace = "\n##" },
  50. { pattern = '- *(:\w+:|[\p{Emoji_Presentation}\p{Extended_Pictographic}](?:\u{FE0F})?\u{200D}?) *', replace = "- " },
  51. ]
  52. [git]
  53. # parse the commits based on https://www.conventionalcommits.org
  54. conventional_commits = false
  55. # filter out the commits that are not conventional
  56. filter_unconventional = true
  57. # process each line of a commit as an individual commit
  58. split_commits = false
  59. # regex for preprocessing the commit messages
  60. #commit_preprocessors = [
  61. # # Check spelling of the commit with https://github.com/crate-ci/typos
  62. # # If the spelling is incorrect, it will be automatically fixed.
  63. # { pattern = '.*', replace_command = 'typos --write-changes -' },
  64. #]
  65. # regex for parsing and grouping commits
  66. commit_parsers = [
  67. { message = "^Feat", group = "<!-- 0 -->✨️ Features" },
  68. { message = "^:sparkles:", group = "<!-- 0 -->✨️ Features" },
  69. { message = "^Feature", group = "<!-- 0 -->✨️ Features" },
  70. { message = "^:bug:", group = "<!-- 1 -->🐛 Bug Fixes" },
  71. { message = ":memo:", group = "<!-- 3 -->📚 Documentation" },
  72. { message = "^:zap:", group = "<!-- 4 -->⚡️ Performance" },
  73. { message = "^:art:", group = "<!-- 5 -->🎨 Styling" },
  74. { message = "^:construction_worker:", group = "<!-- 6 -->👷 CI/CD" },
  75. { message = "^:recycle:", group = "<!-- 7 -->♻️ Refactor" },
  76. { message = "^fix", group = "<!-- 1 -->🐛 Bug Fixes" },
  77. { message = "^docs", group = "<!-- 3 -->📚 Documentation" },
  78. { message = "^perf", group = "<!-- 4 -->⚡️ Performance" },
  79. { message = "^style", group = "<!-- 5 -->🎨 Styling" },
  80. { message = "^ci", group = "<!-- 6 -->👷 CI/CD" },
  81. { message = "^refactor", group = "<!-- 7 -->♻️ Refactor" },
  82. { message = "^test", group = "<!-- 8 -->🧪 Testing" },
  83. { message = "^chore", group = "<!-- 9 -->🔧 Maintenance" }
  84. ]
  85. # protect breaking changes from being skipped due to matching a skipping commit_parser
  86. protect_breaking_commits = false
  87. # filter out the commits that are not matched by commit parsers
  88. filter_commits = true
  89. # regex for matching git tags
  90. tag_pattern = "v[0-9].*"
  91. # regex for skipping tags
  92. skip_tags = "beta|alpha"
  93. # regex for ignoring tags
  94. ignore_tags = "rc"
  95. # sort the tags topologically
  96. topo_order = false
  97. # sort the commits inside sections by oldest/newest order
  98. sort_commits = "newest"