robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
4c3b0ecb46
master
1# configuration file for git-cliff 2 3[ changelog ] 4# changelog header 5header = """ 6# Changelog\n 7Following is a list of commits (fixes/features only) in this release.\n 8See `:help news` in Nvim for release notes.\n 9""" 10# template for the changelog body 11# https://github.com/Keats/tera 12# https://keats.github.io/tera/docs/ 13body = """ 14{% if version %}\ 15# [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} 16{% else %}\ 17# [unreleased] 18{% endif %}\ 19{% for group, commits in commits | group_by(attribute="group") %} 20{{ group | striptags | upper_first }} 21-------------------------------------------------------------------------------- 22{% for commit in commits | sort(attribute="message")%}\ 23{% if not commit.scope %}\ 24- {{ commit.id | truncate(length=12, end="") }} {{ commit.message }} 25{% endif %}\ 26{% endfor %}\ 27{% for group, commits in commits | group_by(attribute="scope") %}\ 28{% for commit in commits | sort(attribute="message") %}\ 29- {{ commit.id | truncate(length=12, end="") }} {{commit.scope}}: {{ commit.message }} 30{% endfor %}\ 31{% endfor %} 32{% endfor %}\n 33""" 34# remove the leading and trailing whitespace from the template 35trim = true 36 37[ git ] 38# parse the commits based on https://www.conventionalcommits.org 39conventional_commits = true 40# filter out the commits that are not conventional 41filter_unconventional = true 42# process each line of a commit as an individual commit 43split_commits = false 44# regex for preprocessing the commit messages 45commit_preprocessors = [ 46# { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](https://github.com/neovim/neovim/issues/${2}))"}, 47# Strip "backport:" prefix so backported commits are not treated as OTHER. 48{ pattern = '^backport[: ]\s*' , replace = "" }, 49] 50# regex for parsing and grouping commits 51commit_parsers = [ 52{ message = "!:" , group = "<!-- 0 -->BREAKING" }, 53{ message = "^feat" , group = "<!-- 1 -->FEATURES" }, 54{ message = "^fix" , group = "<!-- 2 -->FIXES" }, 55{ message = "^perf" , group = "<!-- 3 -->PERFORMANCE" }, 56{ message = "^build" , group = "<!-- 4 -->BUILD" }, 57{ message = "^vim-patch" , group = "<!-- 5 -->VIM PATCHES" }, 58{ message = "^refactor" , group = "<!-- 6 -->REFACTOR" }, 59{ message = "^ci" , group = "<!-- 8 -->CI" }, 60{ message = "^test" , group = "<!-- 9 -->TESTING" }, 61{ message = "^docs" , group = "<!-- 99 -->DOCUMENTATION" }, 62{ message = "^revert" , group = "<!-- 999 -->REVERTED CHANGES" }, 63{ message = ".*" , group = "<!-- 9999 -->OTHER" }, 64] 65# filter out the commits that are not matched by commit parsers 66filter_commits = true 67# glob pattern for matching git tags 68tag_pattern = "v[0-9]*" 69# regex for skipping tags 70skip_tags = "v0.1.0-beta.1" 71# regex for ignoring tags 72ignore_tags = "" 73# sort the tags chronologically 74date_order = false 75# sort the commits inside sections by oldest/newest order 76sort_commits = "oldest"