Skip to content

Commit 8265da4

Browse files
chore: update changelog and cliff config
1 parent af3ab07 commit 8265da4

File tree

2 files changed

+122
-88
lines changed

2 files changed

+122
-88
lines changed

CHANGELOG.md

Lines changed: 58 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,63 @@
11
# Changelog
22

33
All notable changes to this project will be documented in this file.
4-
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
5-
6-
## What's Changed in 1.2.0
7-
* refactor: rename get_update_info to get_package_info for clarity
8-
* chore: update CHANGELOG.md and add cliff.toml configuration
9-
* refactor: move update check log to check_updates function
10-
* feat: add new flag options to check only prod or optional deps
11-
* docs: readme update
12-
* refactor: optimize check_updates code readability and performance
13-
* docs: update README
14-
* refactor: improve version parsing and error handling in PackageInfo display
15-
16-
**Full Changelog**: https://github.com///compare/v1.1.1...1.2.0
17-
18-
## What's Changed in v1.1.1
19-
* chore: Release pushapp-cli version 1.1.1
20-
* refactor: detect package manager from package json field
21-
* chore: readme update
22-
23-
**Full Changelog**: https://github.com///compare/v1.1.0...v1.1.1
24-
25-
## What's Changed in v1.1.0
26-
* chore: add CHANGELOG.md
27-
* chore: Release pushapp-cli version 1.1.0
28-
* feat: add --dev flag to update only dev deps
29-
* chore: move renovate in .github folder
30-
* chore: update release workflow to include changelog and add pre-release-hook
31-
* fix: update badge labels in README for clarity
32-
* feat: add GitHub Actions workflow for release automation
33-
34-
**Full Changelog**: https://github.com///compare/v1.0.1...v1.1.0
35-
36-
## What's Changed in v1.0.1
37-
* chore: Release pushapp-cli version 1.0.1
38-
* feat: add clap
39-
40-
**Full Changelog**: https://github.com///compare/v1.0.0...v1.0.1
41-
42-
## What's Changed in v1.0.0
43-
* 🚀 first commit
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [1.2.0] - 2024-10-03
9+
10+
### Added
11+
- Feat: add new flag options to check only prod or optional deps by @flaviodelgrosso
12+
13+
### Changed
14+
- Release pushapp-cli version 1.2.0 by @flaviodelgrosso
15+
- Rename get_update_info to get_package_info for clarity by @flaviodelgrosso
16+
- Update CHANGELOG.md and add cliff.toml configuration by @flaviodelgrosso
17+
- Move update check log to check_updates function by @flaviodelgrosso
18+
- Readme update by @flaviodelgrosso
19+
- Optimize check_updates code readability and performance by @flaviodelgrosso
20+
- Update README by @flaviodelgrosso
21+
- Improve version parsing and error handling in PackageInfo display by @flaviodelgrosso
22+
23+
## [1.1.1] - 2024-10-02
24+
25+
### Changed
26+
- Release pushapp-cli version 1.1.1 by @flaviodelgrosso
27+
- Detect package manager from package json field by @flaviodelgrosso
28+
- Readme update by @flaviodelgrosso
29+
30+
## [1.1.0] - 2024-10-02
31+
32+
### Added
33+
- Add CHANGELOG.md by @flaviodelgrosso
34+
- Add --dev flag to update only dev deps by @flaviodelgrosso
35+
- Add GitHub Actions workflow for release automation by @flaviodelgrosso
36+
37+
### Changed
38+
- Release pushapp-cli version 1.1.0 by @flaviodelgrosso
39+
- Move renovate in .github folder by @flaviodelgrosso
40+
- Update release workflow to include changelog and add pre-release-hook by @flaviodelgrosso
41+
42+
### Fixed
43+
- Update badge labels in README for clarity by @flaviodelgrosso
44+
45+
## [1.0.1] - 2024-10-01
46+
47+
### Added
48+
- Add clap by @flaviodelgrosso
49+
50+
### Changed
51+
- Release pushapp-cli version 1.0.1 by @flaviodelgrosso
52+
53+
## [1.0.0] - 2024-10-01
54+
55+
### Changed
56+
- 🚀 first commit by @flaviodelgrosso
57+
58+
[1.2.0]: https://github.com/flaviodelgrosso/pushapp/compare/v1.1.1..v1.2.0
59+
[1.1.1]: https://github.com/flaviodelgrosso/pushapp/compare/v1.1.0..v1.1.1
60+
[1.1.0]: https://github.com/flaviodelgrosso/pushapp/compare/v1.0.1..v1.1.0
61+
[1.0.1]: https://github.com/flaviodelgrosso/pushapp/compare/v1.0.0..v1.0.1
4462

4563
<!-- generated by git-cliff -->

cliff.toml

Lines changed: 64 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,98 @@
11
# git-cliff ~ configuration file
22
# https://git-cliff.org/docs/configuration
33

4-
# [remote.github]
5-
# owner = "flaviodelgrosso"
6-
# repo = "pushapp"
7-
# token = ""
4+
[remote]
5+
# the remote repository
6+
github = { owner = "flaviodelgrosso", repo = "pushapp" }
87

98
[changelog]
9+
# template for the changelog header
1010
header = """
1111
# Changelog\n
1212
All notable changes to this project will be documented in this file.
13-
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n
14-
"""
1513
14+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
15+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n
16+
"""
1617
# template for the changelog body
1718
# https://keats.github.io/tera/docs/#introduction
1819
body = """
19-
## What's Changed
20+
{%- macro remote_url() -%}
21+
https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}
22+
{%- endmacro -%}
2023
21-
{%- if version %} in {{ version }}{%- endif -%}
22-
{% for commit in commits %}
23-
{% if commit.remote.pr_title -%}
24-
{%- set commit_message = commit.remote.pr_title -%}
25-
{%- else -%}
26-
{%- set commit_message = commit.message -%}
27-
{%- endif -%}
28-
* {{ commit_message | split(pat="\n") | first | trim }}\
29-
{% if commit.remote.username %} by @{{ commit.remote.username }}{%- endif -%}
30-
{% if commit.remote.pr_number %} in \
31-
[#{{ commit.remote.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.remote.pr_number }}) \
32-
{%- endif %}
33-
{%- endfor -%}
24+
{% if version -%}
25+
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
26+
{% else -%}
27+
## [Unreleased]
28+
{% endif -%}
29+
30+
{% for group, commits in commits | group_by(attribute="group") %}
31+
### {{ group | upper_first }}
32+
{%- for commit in commits %}
33+
- {{ commit.message | split(pat="\n") | first | upper_first | trim }}\
34+
{% if commit.remote.username %} by @{{ commit.remote.username }}{%- endif -%}
35+
{% if commit.remote.pr_number %} in \
36+
[#{{ commit.remote.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.remote.pr_number }}) \
37+
{%- endif -%}
38+
{% endfor %}
39+
{% endfor %}
3440
35-
{%- if github -%}
36-
{% if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %}
37-
{% raw %}\n{% endraw -%}
41+
{%- if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %}
3842
## New Contributors
39-
{%- endif %}\
43+
{%- endif -%}
44+
4045
{% for contributor in github.contributors | filter(attribute="is_first_time", value=true) %}
4146
* @{{ contributor.username }} made their first contribution
4247
{%- if contributor.pr_number %} in \
4348
[#{{ contributor.pr_number }}]({{ self::remote_url() }}/pull/{{ contributor.pr_number }}) \
4449
{%- endif %}
45-
{%- endfor -%}
46-
{%- endif -%}
47-
48-
{% if version %}
49-
{% if previous.version %}
50-
**Full Changelog**: {{ self::remote_url() }}/compare/{{ previous.version }}...{{ version }}
51-
{% endif %}
52-
{% else -%}
53-
{% raw %}\n{% endraw %}
54-
{% endif %}
55-
56-
{%- macro remote_url() -%}
57-
https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}
58-
{%- endmacro -%}
50+
{%- endfor %}\n
5951
"""
60-
# remove the leading and trailing whitespace from the template
61-
trim = true
6252
# template for the changelog footer
6353
footer = """
54+
{%- macro remote_url() -%}
55+
https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}
56+
{%- endmacro -%}
57+
58+
{% for release in releases -%}
59+
{% if release.version -%}
60+
{% if release.previous.version -%}
61+
[{{ release.version | trim_start_matches(pat="v") }}]: \
62+
{{ self::remote_url() }}/compare/{{ release.previous.version }}..{{ release.version }}
63+
{% endif -%}
64+
{% else -%}
65+
[unreleased]: {{ self::remote_url() }}/compare/{{ release.previous.version }}..HEAD
66+
{% endif -%}
67+
{% endfor %}
6468
<!-- generated by git-cliff -->
6569
"""
66-
# postprocessors
67-
postprocessors = []
70+
# remove the leading and trailing whitespace from the templates
71+
trim = true
6872

6973
[git]
7074
# parse the commits based on https://www.conventionalcommits.org
71-
conventional_commits = false
75+
conventional_commits = true
7276
# filter out the commits that are not conventional
73-
filter_unconventional = true
74-
# process each line of a commit as an individual commit
75-
split_commits = false
77+
filter_unconventional = false
7678
# regex for preprocessing the commit messages
7779
commit_preprocessors = [
78-
# remove issue numbers from commits
79-
{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "" },
80+
# remove issue numbers from commits
81+
{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "" },
82+
]
83+
# regex for parsing and grouping commits
84+
commit_parsers = [
85+
{ message = "^[a|A]dd", group = "Added" },
86+
{ message = "^[s|S]upport", group = "Added" },
87+
{ message = "^[r|R]emove", group = "Removed" },
88+
{ message = "^.*: add", group = "Added" },
89+
{ message = "^.*: support", group = "Added" },
90+
{ message = "^.*: remove", group = "Removed" },
91+
{ message = "^.*: delete", group = "Removed" },
92+
{ message = "^test", group = "Fixed" },
93+
{ message = "^fix", group = "Fixed" },
94+
{ message = "^.*: fix", group = "Fixed" },
95+
{ message = "^.*", group = "Changed" },
8096
]
8197
# filter out the commits that are not matched by commit parsers
8298
filter_commits = false

0 commit comments

Comments
 (0)