knowledge-search

git clone git://archive.git.mtrnord.blog/MTRNord/knowledge-search.git
Log | Files | Refs | README | LICENSE

cliff.toml (2941B)


      1 # configuration file for git-cliff
      2 # see https://github.com/orhun/git-cliff#configuration-file
      3 
      4 [changelog]
      5 # changelog header
      6 header = """
      7 # Changelog\n
      8 All notable changes to this project will be documented in this file.\n
      9 """
     10 # template for the changelog body
     11 # https://tera.netlify.app/docs/#introduction
     12 body = """
     13 {% if version %}\
     14     ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
     15 {% else %}\
     16     ## [unreleased]
     17 {% endif %}\
     18 {% for group, commits in commits | group_by(attribute="group") %}
     19     ### {{ group | upper_first }}
     20     {% for commit in commits %}
     21         - {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }} ([{{ commit.id | truncate(length=7, end="") }}](https://github.com/MTRNord/knowledge-search/commit/{{ commit.id }}))\
     22     {% endfor %}
     23 {% endfor %}\n
     24 """
     25 # remove the leading and trailing whitespace from the template
     26 trim = true
     27 # changelog footer
     28 footer = """
     29 <!-- generated by git-cliff -->
     30 """
     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 = "Merge pull request #([0-9]+) from [^ ]+", replace = "PR # [${1}](https://github.com/MTRNord/knowledge-search/pull/${1}):"}, # Linkify Merge requests
     42     { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([Issue #${2}](https://github.com/MTRNord/knowledge-search/issues/${2}))"}, # replace issue numbers
     43     { pattern = "([ \\n])(([a-f0-9]{7})[a-f0-9]*)", replace = "${1}commit # [${3}](https://github.com/MTRNord/knowledge-search/commit/${2})"}, # Linkify commits
     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 = ""
     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