chore(examples): improve example templates (#835)

* chore(examples): improve example templates

* chore(typos): configure typos
This commit is contained in:
Orhun Parmaksız
2024-09-01 11:18:35 +03:00
committed by GitHub
parent 81854d2166
commit 08e761c20f
9 changed files with 121 additions and 119 deletions
+4 -6
View File
@@ -11,9 +11,9 @@ All notable changes to this project will be documented in this file.\n
# https://keats.github.io/tera/docs/#introduction
body = """
{% if version %}\
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
## {{ version | trim_start_matches(pat="v") }} - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
## [unreleased]
## Unreleased
{% endif %}\
{% if previous %}\
{% if previous.commit_id and commit_id %}
@@ -24,7 +24,7 @@ body = """
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | upper_first }}
{% for commit in commits %}
- {{ commit.message | upper_first }} ([{{ commit.id | truncate(length=7, end="") }}]({{ commit.id }}))\
- {{ commit.message | split(pat="\n") | first | upper_first | trim }} ([{{ commit.id | truncate(length=7, end="") }}]({{ commit.id }}))\
{% for footer in commit.footers -%}
, {{ footer.token }}{{ footer.separator }}{{ footer.value }}\
{% endfor %}\
@@ -42,9 +42,7 @@ trim = true
# 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
filter_unconventional = false
# regex for parsing and grouping commits
commit_parsers = [
{ message = "^feat", group = "Features" },
+9 -10
View File
@@ -23,15 +23,13 @@ body = """
## [Unreleased]
{% endif -%}
### Details\
{% for group, commits in commits | group_by(attribute="group") %}
#### {{ group | upper_first }}
### {{ group | upper_first }}
{%- for commit in commits %}
- {{ commit.message | upper_first | trim }}\
- {{ commit.message | split(pat="\n") | first | upper_first | trim }}\
{% if commit.github.username %} by @{{ commit.github.username }}{%- endif -%}
{% if commit.github.pr_number %} in \
[#{{ commit.github.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.github.pr_number }}) \
[#{{ commit.github.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.github.pr_number }}) \
{%- endif -%}
{% endfor %}
{% endfor %}
@@ -72,9 +70,7 @@ trim = true
# 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
filter_unconventional = false
# regex for preprocessing the commit messages
commit_preprocessors = [
# remove issue numbers from commits
@@ -82,6 +78,9 @@ commit_preprocessors = [
]
# regex for parsing and grouping commits
commit_parsers = [
{ message = "^[a|A]dd", group = "Added" },
{ message = "^[s|S]upport", group = "Added" },
{ message = "^[r|R]emove", group = "Removed" },
{ message = "^.*: add", group = "Added" },
{ message = "^.*: support", group = "Added" },
{ message = "^.*: remove", group = "Removed" },
@@ -92,8 +91,8 @@ commit_parsers = [
{ message = "^.*", group = "Changed" },
]
# filter out the commits that are not matched by commit parsers
filter_commits = true
filter_commits = false
# sort the tags topologically
topo_order = false
# sort the commits inside sections by oldest/newest order
sort_commits = "oldest"
sort_commits = "newest"
+15 -14
View File
@@ -21,7 +21,7 @@ body = """
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | upper_first }}
{% for commit in commits %}
- {{ commit.message | upper_first }}\
- {{ commit.message | split(pat="\n") | first | upper_first | trim }}\
{% endfor %}
{% endfor %}\n
"""
@@ -48,23 +48,24 @@ trim = true
# 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
filter_unconventional = false
# regex for parsing and grouping commits
commit_parsers = [
{ message = "^.*: add", group = "Added" },
{ message = "^.*: support", group = "Added" },
{ message = "^.*: remove", group = "Removed" },
{ message = "^.*: delete", group = "Removed" },
{ message = "^test", group = "Fixed" },
{ message = "^fix", group = "Fixed" },
{ message = "^.*: fix", group = "Fixed" },
{ message = "^.*", group = "Changed" },
{ message = "^[a|A]dd", group = "Added" },
{ message = "^[s|S]upport", group = "Added" },
{ message = "^[r|R]emove", group = "Removed" },
{ message = "^.*: add", group = "Added" },
{ message = "^.*: support", group = "Added" },
{ message = "^.*: remove", group = "Removed" },
{ message = "^.*: delete", group = "Removed" },
{ message = "^test", group = "Fixed" },
{ message = "^fix", group = "Fixed" },
{ message = "^.*: fix", group = "Fixed" },
{ message = "^.*", group = "Changed" },
]
# filter out the commits that are not matched by commit parsers
filter_commits = true
filter_commits = false
# sort the tags topologically
topo_order = false
# sort the commits inside sections by oldest/newest order
sort_commits = "oldest"
sort_commits = "newest"
+2 -2
View File
@@ -6,9 +6,9 @@
# https://keats.github.io/tera/docs/#introduction
body = """
{% if version %}\
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}\
## {{ version | trim_start_matches(pat="v") }} - {{ timestamp | date(format="%Y-%m-%d") }}\
{% else %}\
## [unreleased]\
## Unreleased\
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | upper_first }}
+2 -2
View File
@@ -11,9 +11,9 @@ All notable changes to this project will be documented in this file.\n
# https://keats.github.io/tera/docs/#introduction
body = """
{% if version %}\
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
## {{ version | trim_start_matches(pat="v") }} - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
## [unreleased]
## Unreleased
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | upper_first }}
+2 -4
View File
@@ -11,9 +11,9 @@ All notable changes to this project will be documented in this file.\n
# https://keats.github.io/tera/docs/#introduction
body = """
{% if version %}\
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
## {{ version | trim_start_matches(pat="v") }} - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
## [unreleased]
## Unreleased
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | upper_first }}
@@ -51,8 +51,6 @@ trim = true
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 parsing and grouping commits
commit_parsers = [
{ message = "^feat", group = "Features" },
+2 -2
View File
@@ -11,9 +11,9 @@ All notable changes to this project will be documented in this file.\n
# https://keats.github.io/tera/docs/#introduction
body = """
{% if version %}\
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
## {{ version | trim_start_matches(pat="v") }} - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
## [unreleased]
## Unreleased
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | upper_first }}
+6
View File
@@ -1,5 +1,11 @@
# configuration for https://github.com/crate-ci/typos
[type.md]
extend-ignore-re = [
"\\[[[:xdigit:]]{7}\\]\\(https://github.com/orhun/git-cliff/commit/[[:xdigit:]]{40}\\)",
"\\[halp\\]\\(https://github.com/orhun/halp\\)",
"upport",
]
[default.extend-words]
upport = "upport"
+79 -79
View File
@@ -237,16 +237,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Add README.md
- Add ability to parse arrays
- Add tested usage example
- Add ability to parse arrays
- Add README.md
### Changed
- Initial commit
### Fixed
- Rename help argument due to conflict
[unreleased]: https://github.com/orhun/git-cliff/compare/v1.0.1..HEAD
[1.0.1]: https://github.com/orhun/git-cliff/compare/v1.0.0..v1.0.1
[unreleased]: https://github.com/orhun/git-cliff-readme-example/compare/v1.0.1..HEAD
[1.0.1]: https://github.com/orhun/git-cliff-readme-example/compare/v1.0.0..v1.0.1
<!-- generated by git-cliff -->
```
@@ -287,16 +291,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Add README.md
- Add ability to parse arrays
- Add tested usage example
- Add ability to parse arrays
- Add README.md
### Changed
- Initial commit
### Fixed
- Rename help argument due to conflict
[unreleased]: https://github.com/orhun/git-cliff/compare/v1.0.1..HEAD
[1.0.1]: https://github.com/orhun/git-cliff/compare/v1.0.0..v1.0.1
[unreleased]: https://github.com/orhun/git-cliff-readme-example/compare/v1.0.1..HEAD
[1.0.1]: https://github.com/orhun/git-cliff-readme-example/compare/v1.0.0..v1.0.1
<!-- generated by git-cliff -->
@@ -371,29 +379,32 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Details
#### Added
### Added
- Support multiple file formats by @orhun
#### Changed
### Changed
- Use cache while fetching pages by @orhun
## [1.0.1] - 2021-07-18
### Details
#### Added
### Added
- Add release script by @orhun
#### Changed
### Changed
- Expose string functions by @orhun
## [1.0.0] - 2021-07-18
### Details
#### Added
- Add README.md by @orhun
- Add ability to parse arrays by @orhun
- Add tested usage example by @orhun
#### Fixed
### Added
- Add tested usage example by @orhun
- Add ability to parse arrays by @orhun
- Add README.md by @orhun
### Changed
- Initial commit by @orhun
### Fixed
- Rename help argument due to conflict by @orhun
[unreleased]: https://github.com/orhun/git-cliff-readme-example/compare/v1.0.1..HEAD
@@ -416,39 +427,37 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Details
#### Added
### Added
- Support multiple file formats by @orhun
#### Changed
### Changed
- Use cache while fetching pages by @orhun
## [1.0.1] - 2021-07-18
### Details
#### Added
### Added
- Add release script by @orhun
#### Changed
### Changed
- Expose string functions by @orhun
## [1.0.0] - 2021-07-18
### Details
### Added
#### Added
- Add README.md by @orhun
- Add ability to parse arrays by @orhun
- Add tested usage example by @orhun
- Add ability to parse arrays by @orhun
- Add README.md by @orhun
#### Fixed
### Changed
- Initial commit by @orhun
### Fixed
- Rename help argument due to conflict by @orhun
@@ -465,19 +474,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
<summary>Raw Output</summary>
```
## [unreleased]
## Unreleased
### Feat
- Support multiple file formats
- Use cache while fetching pages
## [1.0.1] - 2021-07-18
## 1.0.1 - 2021-07-18
### Chore
- Add release script
### Refactor
- Expose string functions
## [1.0.0] - 2021-07-18
## 1.0.0 - 2021-07-18
### Docs
- Add README.md
- [**breaking**] Add tested usage example
@@ -494,36 +503,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
<details>
<summary>Rendered Output</summary>
## [unreleased]
## Unreleased
### Feat
- Support multiple file formats
- Use cache while fetching pages
## [1.0.1] - 2021-07-18
## 1.0.1 - 2021-07-18
### Chore
- Add release script
### Refactor
- Expose string functions
## [1.0.0] - 2021-07-18
## 1.0.0 - 2021-07-18
### Docs
- Add README.md
- [**breaking**] Add tested usage example
### Feat
- Add ability to parse arrays
### Fix
- Rename help argument due to conflict
</details>
@@ -538,14 +538,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
All notable changes to this project will be documented in this file.
## [unreleased]
## Unreleased
### Features
- Support multiple file formats ([a9d4050](a9d4050212a18f6b3bd76e2e41fbb9045d268b80))
- Use cache while fetching pages ([df6aef4](df6aef41292f3ffe5887754232e6ea7831c50ba5))
## [1.0.1] - 2021-07-18
## 1.0.1 - 2021-07-18
[ad27b43](ad27b43e8032671afb4809a1a3ecf12f45c60e0e)...[06412ac](06412ac1dd4071006c465dde6597a21d4367a158)
@@ -557,7 +557,7 @@ All notable changes to this project will be documented in this file.
- Expose string functions ([e4fd3cf](e4fd3cf8e2e6f49c0b57f66416e886c37cbb3715))
## [1.0.0] - 2021-07-18
## 1.0.0 - 2021-07-18
### Bug Fixes
@@ -584,7 +584,7 @@ All notable changes to this project will be documented in this file.
All notable changes to this project will be documented in this file.
## [unreleased]
## Unreleased
### Features
@@ -632,7 +632,7 @@ ad27b43...06412ac
All notable changes to this project will be documented in this file.
## [unreleased]
## Unreleased
### Features
@@ -644,7 +644,7 @@ All notable changes to this project will be documented in this file.
- Support multiple file formats
## [1.0.1] - 2021-07-18
## 1.0.1 - 2021-07-18
### Miscellaneous Tasks
@@ -658,7 +658,7 @@ All notable changes to this project will be documented in this file.
- Expose string functions
## [1.0.0] - 2021-07-18
## 1.0.0 - 2021-07-18
### Bug Fixes
@@ -694,7 +694,7 @@ All notable changes to this project will be documented in this file.
All notable changes to this project will be documented in this file.
## [unreleased]
## Unreleased
### Features
@@ -706,7 +706,7 @@ All notable changes to this project will be documented in this file.
- Support multiple file formats
## [1.0.1] - 2021-07-18
## 1.0.1 - 2021-07-18
### Miscellaneous Tasks
@@ -720,7 +720,7 @@ All notable changes to this project will be documented in this file.
- Expose string functions
## [1.0.0] - 2021-07-18
## 1.0.0 - 2021-07-18
### Bug Fixes
@@ -758,14 +758,14 @@ All notable changes to this project will be documented in this file.
All notable changes to this project will be documented in this file.
## [unreleased]
## Unreleased
### Features
- *(cache)* Use cache while fetching pages
- *(config)* Support multiple file formats
## [1.0.1] - 2021-07-18
## 1.0.1 - 2021-07-18
### Miscellaneous Tasks
@@ -775,7 +775,7 @@ All notable changes to this project will be documented in this file.
- *(parser)* Expose string functions
## [1.0.0] - 2021-07-18
## 1.0.0 - 2021-07-18
### Bug Fixes
@@ -803,38 +803,38 @@ All notable changes to this project will be documented in this file.
All notable changes to this project will be documented in this file.
## [unreleased]
## Unreleased
### Features
- _(cache)_ Use cache while fetching pages
- _(config)_ Support multiple file formats
- *(cache)* Use cache while fetching pages
- *(config)* Support multiple file formats
## [1.0.1] - 2021-07-18
## 1.0.1 - 2021-07-18
### Miscellaneous Tasks
- _(release)_ Add release script
- *(release)* Add release script
### Refactor
- _(parser)_ Expose string functions
- *(parser)* Expose string functions
## [1.0.0] - 2021-07-18
## 1.0.0 - 2021-07-18
### Bug Fixes
- _(args)_ Rename help argument due to conflict
- *(args)* Rename help argument due to conflict
### Documentation
- _(example)_ Add tested usage example
- *(example)* Add tested usage example
- **BREAKING**: add tested usage example
- _(project)_ Add README.md
- *(project)* Add README.md
### Features
- _(parser)_ Add ability to parse arrays
- *(parser)* Add ability to parse arrays
<!-- generated by git-cliff -->
@@ -850,14 +850,14 @@ All notable changes to this project will be documented in this file.
All notable changes to this project will be documented in this file.
## [unreleased]
## Unreleased
### Features
- feat(config): support multiple file formats
- feat(cache): use cache while fetching pages
## [1.0.1] - 2021-07-18
## 1.0.1 - 2021-07-18
### Miscellaneous Tasks
@@ -867,7 +867,7 @@ All notable changes to this project will be documented in this file.
- refactor(parser): expose string functions
## [1.0.0] - 2021-07-18
## 1.0.0 - 2021-07-18
### Bug Fixes
@@ -898,14 +898,14 @@ All notable changes to this project will be documented in this file.
All notable changes to this project will be documented in this file.
## [unreleased]
## Unreleased
### Features
- feat(config): support multiple file formats
- feat(cache): use cache while fetching pages
## [1.0.1] - 2021-07-18
## 1.0.1 - 2021-07-18
### Miscellaneous Tasks
@@ -915,7 +915,7 @@ All notable changes to this project will be documented in this file.
- refactor(parser): expose string functions
## [1.0.0] - 2021-07-18
## 1.0.0 - 2021-07-18
### Bug Fixes