chore(frontend): add git-cliff for generating changelog

This commit is contained in:
Lucien Cartier-Tilet 2023-02-09 13:19:20 +01:00
parent acd7297b7f
commit e255f872c4
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA
3 changed files with 114 additions and 0 deletions

71
cliff.toml Normal file
View File

@ -0,0 +1,71 @@
# configuration file for git-cliff
# see https://github.com/orhun/git-cliff#configuration-file
[changelog]
# changelog header
header = """
# Changelog\n
All notable changes to this project will be documented in this file.\n
"""
# template for the changelog body
# https://tera.netlify.app/docs/#introduction
body = """
{% if version %}\
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
## [unreleased]
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | upper_first }}
{% for commit in commits %}
- {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }}\
{% endfor %}
{% endfor %}\n
"""
# remove the leading and trailing whitespace from the template
trim = true
# changelog footer
footer = """
<!-- generated by git-cliff -->
"""
[git]
# parse the commits based on https://www.conventionalcommits.org
conventional_commits = true
# filter out the commits that are not conventional
filter_unconventional = true
# process each line of a commit as an individual commit
split_commits = false
# regex for preprocessing the commit messages
commit_preprocessors = [
# { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](https://github.com/orhun/git-cliff/issues/${2}))"}, # replace issue numbers
]
# regex for parsing and grouping commits
commit_parsers = [
{ message = "^feat", group = "Features"},
{ message = "^fix", group = "Bug Fixes"},
{ message = "^doc", group = "Documentation"},
{ message = "^perf", group = "Performance"},
{ message = "^refactor", group = "Refactor"},
{ message = "^style", group = "Styling"},
{ message = "^test", group = "Testing"},
{ message = "^chore\\(release\\): prepare for", skip = true},
{ message = "^chore", group = "Miscellaneous Tasks"},
{ body = ".*security", group = "Security"},
]
# protect breaking changes from being skipped due to matching a skipping commit_parser
protect_breaking_commits = false
# filter out the commits that are not matched by commit parsers
filter_commits = false
# glob pattern for matching git tags
tag_pattern = "v[0-9]*"
# regex for skipping tags
skip_tags = "v0.1.0-beta.1"
# regex for ignoring tags
ignore_tags = ""
# sort the tags topologically
topo_order = false
# sort the commits inside sections by oldest/newest order
sort_commits = "oldest"
# limit the number of commits included in the changelog.
# limit_commits = 42

View File

@ -9,6 +9,7 @@
"private": true,
"devDependencies": {
"cz-conventional-changelog": "^3.3.0",
"git-cliff": "^1.1.2",
"vuepress": "^2.0.0-beta.60"
},
"scripts": {

View File

@ -1511,6 +1511,48 @@ get-stream@^6.0.1:
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7"
integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==
git-cliff-darwin-arm64@1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/git-cliff-darwin-arm64/-/git-cliff-darwin-arm64-1.1.2.tgz#a7c95bae2ce55e5443066ca3b3ffb77e633834d2"
integrity sha512-z+pSh6vLrtgoILlWzhisLHiLOuStabJh/ShgbBq0q3JRedUmxfg6WqCi+fHymMkA4AeoXOIS7GGfyV5m+sLQeQ==
git-cliff-darwin-x64@1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/git-cliff-darwin-x64/-/git-cliff-darwin-x64-1.1.2.tgz#beb6520b96e1dbe0c87e8b8aa1dfa85f6145e87a"
integrity sha512-dhizA8pGobcxxTS2YQDSs960zFqKfjprDsX/pq+MqgEc68e60B2WSRwFWXd+jK2x/7d7PbnMzlXDqszeDwBpRQ==
git-cliff-linux-arm64@1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/git-cliff-linux-arm64/-/git-cliff-linux-arm64-1.1.2.tgz#361c04af8b48d252eb53dcaba1caa029be3b01ec"
integrity sha512-4TYzQHO8H8FquSxoO/O2IfYN6ZLef4SM5PEDG93jeK958s+/FWnFok8evGSJdoTeyu2MXWdw4J40o1AKl0fcxw==
git-cliff-linux-x64@1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/git-cliff-linux-x64/-/git-cliff-linux-x64-1.1.2.tgz#ac330433500c254c8b3e347e9b5fc9315504e52a"
integrity sha512-vDLQEITUPHliKVWD69baH1djdsCPpSgUqqbNdX5Xb4bzM8vugIwfpV0XE/BIDC05VUJY2TPLMK1Zh//pdaOhfg==
git-cliff-windows-arm64@1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/git-cliff-windows-arm64/-/git-cliff-windows-arm64-1.1.2.tgz#54aa83f6963eee929c3073fddd1385b39259db2e"
integrity sha512-wl1S3IU5ewZ6UYzPFZbTZjeyf6/3VIAjDQ0hFWN+LQeo6ttj5RtVzifMRadoCmb2Jgi9RT8qR4plwyL+/NtHlQ==
git-cliff-windows-x64@1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/git-cliff-windows-x64/-/git-cliff-windows-x64-1.1.2.tgz#639f8de3ea905af30a9f65831b206c72da3b7c73"
integrity sha512-KszFq4Pre+TdJiPuGP+4t1DtXHcVaF9/dBSmwldxWvyAomzeX2wHalquh2iv6YgcFUQ4oe/DP1qiNhLa5xw5/Q==
git-cliff@^1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/git-cliff/-/git-cliff-1.1.2.tgz#13f0891dbf14dbdb9625695cce729e1fceb43526"
integrity sha512-sjIhRW8BZSKkr0e9XcEFdxz2SF7lcOOJJuEEc+b07H7zM7WdhLh5dzZM2Et57adC5jUVO6mLpxuWRJSinGl4nQ==
optionalDependencies:
git-cliff-darwin-arm64 "1.1.2"
git-cliff-darwin-x64 "1.1.2"
git-cliff-linux-arm64 "1.1.2"
git-cliff-linux-x64 "1.1.2"
git-cliff-windows-arm64 "1.1.2"
git-cliff-windows-x64 "1.1.2"
glob-parent@^5.1.2, glob-parent@~5.1.2:
version "5.1.2"
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"