cliff.toml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. # git-cliff ~ configuration file
  2. # https://git-cliff.org/docs/configuration
  3. [changelog]
  4. header = """
  5. # Changelog\n
  6. All notable changes to this project will be documented in this file. See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines.\n
  7. """
  8. body = """
  9. ---
  10. {% if version %}
  11. {% if previous.version %}
  12. ## [{{ version | trim_start_matches(pat="v") }}]($REPO/compare/{{ previous.version }}..{{ version }}) - {{ timestamp | date(format="%Y-%m-%d") }}
  13. {% else %}
  14. ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
  15. {% endif %}
  16. {% else %}
  17. ## [unreleased]
  18. {% endif %}
  19. {% for group, commits in commits | group_by(attribute="group") %}
  20. ### {{ group | striptags | trim | upper_first }}
  21. {% for commit in commits | filter(attribute="scope") | sort(attribute="scope") %}
  22. - **({{commit.scope}})**{% if commit.breaking %} [**breaking**]{% endif %} {{ commit.message|trim }} - ([{{ commit.id | truncate(length=7, end="") }}]($REPO/commit/{{ commit.id }})) - {{ commit.author.name }}
  23. {%- endfor -%}
  24. {% raw %}\n{% endraw %}
  25. {%- for commit in commits %}
  26. {%- if not commit.scope -%}
  27. - {% if commit.breaking %} [**breaking**]{% endif %}{{ commit.message|trim }} - ([{{ commit.id | truncate(length=7, end="") }}]($REPO/commit/{{ commit.id }})) - {{ commit.author.name }}
  28. {%- endif -%}
  29. {% endfor -%}
  30. {% endfor %}\n
  31. """
  32. footer = "<!-- generated by git-cliff -->"
  33. trim = true
  34. postprocessors = [
  35. { pattern = '\$REPO', replace = "https://github.com/rustsbi/prototyper" },
  36. ]
  37. [git]
  38. conventional_commits = true
  39. filter_unconventional = false
  40. split_commits = false
  41. commit_preprocessors = []
  42. commit_parsers = [
  43. { message = "\\[skip", skip = true },
  44. { message = "\\p{Han}", skip = true },
  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 = "Refactoring" },
  50. { message = "^style", group = "Style" },
  51. { message = "^revert", group = "Revert" },
  52. { message = "^test", group = "Tests" },
  53. { message = "^chore\\(version\\):", skip = true },
  54. { message = "^chore", group = "Miscellaneous Chores" },
  55. { message = ".*", group = "Other" },
  56. { body = ".*security", group = "Security" },
  57. ]
  58. protect_breaking_commits = false
  59. filter_commits = false
  60. tag_pattern = "v[0-9].*"
  61. skip_tags = "v0.1.0-beta.1"
  62. ignore_tags = ""
  63. topo_order = false
  64. sort_commits = "oldest"