From 6f8ea19baafea2718a00a046b74f0cbbfacc8d46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Orhun=20Parmaks=C4=B1z?= Date: Wed, 21 Aug 2024 18:48:34 +0300 Subject: [PATCH] refactor(config): make example templates more user-friendly --- config/cliff.toml | 10 -------- examples/cocogitto.toml | 10 -------- examples/detailed.toml | 8 ------- examples/github-keepachangelog.toml | 8 ------- examples/github.toml | 8 ------- examples/keepachangelog.toml | 8 ------- examples/scoped.toml | 8 ------- examples/scopesorted.toml | 8 ------- examples/unconventional.toml | 12 ++-------- website/docs/templating/examples.md | 36 ++++++++++++++--------------- 10 files changed, 20 insertions(+), 96 deletions(-) diff --git a/config/cliff.toml b/config/cliff.toml index 078f667410..4d368fa85c 100644 --- a/config/cliff.toml +++ b/config/cliff.toml @@ -71,19 +71,9 @@ commit_parsers = [ { body = ".*security", group = "🛡️ Security" }, { message = "^revert", group = "◀️ Revert" }, ] -# 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 -# regex for matching git tags -# tag_pattern = "v[0-9].*" -# regex for skipping tags -# skip_tags = "" -# 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 diff --git a/examples/cocogitto.toml b/examples/cocogitto.toml index 477d017491..9a9a1b2379 100644 --- a/examples/cocogitto.toml +++ b/examples/cocogitto.toml @@ -74,19 +74,9 @@ commit_parsers = [ { message = "^chore", group = "Miscellaneous Chores" }, { 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 -# regex 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 diff --git a/examples/detailed.toml b/examples/detailed.toml index c4d6a88822..42320af6cd 100644 --- a/examples/detailed.toml +++ b/examples/detailed.toml @@ -61,16 +61,8 @@ commit_parsers = [ { message = "^chore|^ci", 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 -# regex 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 diff --git a/examples/github-keepachangelog.toml b/examples/github-keepachangelog.toml index 95b86d0e7b..af80bfb19a 100644 --- a/examples/github-keepachangelog.toml +++ b/examples/github-keepachangelog.toml @@ -91,16 +91,8 @@ commit_parsers = [ { message = "^.*: fix", group = "Fixed" }, { message = "^.*", group = "Changed" }, ] -# 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 = true -# regex 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 diff --git a/examples/github.toml b/examples/github.toml index 360955b1cc..9853f54aae 100644 --- a/examples/github.toml +++ b/examples/github.toml @@ -72,16 +72,8 @@ commit_preprocessors = [ # remove issue numbers from commits { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "" }, ] -# 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 -# regex for matching git tags -tag_pattern = "v[0-9].*" -# regex for skipping tags -skip_tags = "beta|alpha" -# regex for ignoring tags -ignore_tags = "rc" # sort the tags topologically topo_order = false # sort the commits inside sections by oldest/newest order diff --git a/examples/keepachangelog.toml b/examples/keepachangelog.toml index 41325704ad..adbe4040bb 100644 --- a/examples/keepachangelog.toml +++ b/examples/keepachangelog.toml @@ -62,16 +62,8 @@ commit_parsers = [ { message = "^.*: fix", group = "Fixed" }, { message = "^.*", group = "Changed" }, ] -# 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 = true -# regex 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 diff --git a/examples/scoped.toml b/examples/scoped.toml index 1d2efc8445..d13c086bf5 100644 --- a/examples/scoped.toml +++ b/examples/scoped.toml @@ -52,16 +52,8 @@ commit_parsers = [ { 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 -# regex 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 diff --git a/examples/scopesorted.toml b/examples/scopesorted.toml index 944be9006b..4bb0e02c99 100644 --- a/examples/scopesorted.toml +++ b/examples/scopesorted.toml @@ -66,16 +66,8 @@ commit_parsers = [ { 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 -# regex 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 diff --git a/examples/unconventional.toml b/examples/unconventional.toml index a2e9f72f56..b0990bb5df 100644 --- a/examples/unconventional.toml +++ b/examples/unconventional.toml @@ -18,7 +18,7 @@ body = """ {% for group, commits in commits | group_by(attribute="group") %} ### {{ group | upper_first }} {% for commit in commits %} - - {{ commit.message | upper_first | trim_end }} {% if commit.conventional %}✔️{% else %}❌{% endif %}\ + - {{ commit.message | split(pat="\n") | first | trim_end }}\ {% endfor %} {% endfor %}\n """ @@ -32,7 +32,7 @@ trim = true [git] # parse the commits based on https://www.conventionalcommits.org -conventional_commits = true +conventional_commits = false # filter out the commits that are not conventional filter_unconventional = false # process each line of a commit as an individual commit @@ -51,16 +51,8 @@ commit_parsers = [ { body = ".*security", group = "Security" }, { body = ".*", group = "Other (unconventional)" }, ] -# 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 -# regex 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 diff --git a/website/docs/templating/examples.md b/website/docs/templating/examples.md index d2d0b5bc6b..f4094021c8 100644 --- a/website/docs/templating/examples.md +++ b/website/docs/templating/examples.md @@ -854,37 +854,37 @@ All notable changes to this project will be documented in this file. ### Features -- Support multiple file formats ✔️ -- Use cache while fetching pages ✔️ +- feat(config): support multiple file formats +- feat(cache): use cache while fetching pages ## [1.0.1] - 2021-07-18 ### Miscellaneous Tasks -- Add release script ✔️ +- chore(release): add release script ### Refactor -- Expose string functions ✔️ +- refactor(parser): expose string functions ## [1.0.0] - 2021-07-18 ### Bug Fixes -- Rename help argument due to conflict ✔️ +- fix(args): rename help argument due to conflict ### Documentation -- Add README.md ✔️ -- Add tested usage example ✔️ +- docs(project): add README.md +- docs(example)!: add tested usage example ### Features -- Add ability to parse arrays ✔️ +- feat(parser): add ability to parse arrays ### Other (unconventional) -- Initial commit ❌ +- Initial commit ``` @@ -902,37 +902,37 @@ All notable changes to this project will be documented in this file. ### Features -- Support multiple file formats ✔️ -- Use cache while fetching pages ✔️ +- feat(config): support multiple file formats +- feat(cache): use cache while fetching pages ## [1.0.1] - 2021-07-18 ### Miscellaneous Tasks -- Add release script ✔️ +- chore(release): add release script ### Refactor -- Expose string functions ✔️ +- refactor(parser): expose string functions ## [1.0.0] - 2021-07-18 ### Bug Fixes -- Rename help argument due to conflict ✔️ +- fix(args): rename help argument due to conflict ### Documentation -- Add README.md ✔️ -- Add tested usage example ✔️ +- docs(project): add README.md +- docs(example)!: add tested usage example ### Features -- Add ability to parse arrays ✔️ +- feat(parser): add ability to parse arrays ### Other (unconventional) -- Initial commit ❌ +- Initial commit