|
1 | | -# git-cliff configuration for RainingKeysPython |
| 1 | +# git-cliff ~ configuration file |
2 | 2 | # https://git-cliff.org/docs/configuration |
3 | 3 |
|
4 | | -[changelog] |
5 | | -# Changelog header template |
6 | | -header = """ |
7 | | -# Changelog - {{ version }} [{{ date | date(format='%Y-%m-%d') }}] |
8 | | -
|
9 | | -{{ range .patches }} |
10 | | -## [{{ .Commit.Title | replaceRE '(?m)(i18n)?' '' }}] - {{ .Commit.Author.Name }} ({{ .Commit.Author.Email }}) |
11 | | -
|
12 | | -{{ range .commits }} |
13 | | -### {{ .Commit.Header }} |
14 | | -
|
15 | | -{{ .Commit.Body }} |
16 | | -
|
17 | | -{{ end }} |
18 | | -{{ end }} |
19 | | -
|
20 | | -""" |
21 | 4 |
|
22 | | -# Changelog body template |
| 5 | +[changelog] |
| 6 | +# A Tera template to be rendered for each release in the changelog. |
| 7 | +# See https://keats.github.io/tera/docs/#introduction |
23 | 8 | body = """ |
24 | | -{{ range .patches }} |
25 | | -### {{ .Commit.Title | replaceRE '(?m)(i18n)?' '' }} |
26 | | -
|
27 | | -{{ range .commits }} |
28 | | -- **{{ .Commit.Header }}** |
29 | | - {{ .Commit.Body | upperFirst | replaceRE "\n" " " }} |
30 | | -{{ end }} |
31 | | -{{ end }} |
32 | | -
|
| 9 | +{% if version %}\ |
| 10 | + ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} |
| 11 | +{% else %}\ |
| 12 | + ## [unreleased] |
| 13 | +{% endif %}\ |
| 14 | +{% for group, commits in commits | group_by(attribute="group") %} |
| 15 | + ### {{ group | striptags | trim | upper_first }} |
| 16 | + {% for commit in commits %} |
| 17 | + - {% if commit.scope %}*({{ commit.scope }})* {% endif %}\ |
| 18 | + {% if commit.breaking %}[**breaking**] {% endif %}\ |
| 19 | + {{ commit.message | upper_first }}\ |
| 20 | + {% endfor %} |
| 21 | +{% endfor %} |
33 | 22 | """ |
34 | | - |
35 | | -# Changelog footer template |
36 | | -footer = """ |
37 | | -## [{{ version }}] - Release Notes |
38 | | -
|
39 | | -### 📦 Downloads |
40 | | -- 'RainingKeysPython.zip' - Release build (no console) |
41 | | -- 'RainingKeysPython-debug.zip' - Debug build (with console) |
42 | | -
|
43 | | -### 📚 Documentation |
44 | | -- [GitHub Repository](https://github.com/ianaw/RainingKeysPython) |
45 | | -- [AGENTS.md](https://github.com/ianaw/RainingKeysPython/blob/main/AGENTS.md) - Developer guide |
46 | | -- [CHANGELOG](https://github.com/ianaw/RainingKeysPython/releases) - Previous releases |
47 | | -
|
48 | | -### 🐛 Bug Fixes |
49 | | -- Bar lifecycle management - Fixed cascade of recycling warnings |
50 | | -- Font size validation - Prevented Qt warnings |
51 | | -- Thread safety - Added proper locking for key tracking |
52 | | -
|
53 | | -### ⚡ Performance |
54 | | -- Font caching - Eliminates repeated QFontDatabase queries |
55 | | -- Screen refresh rate optimization - Adapts to monitor refresh rate |
56 | | -- Throttled UI updates - Prevents lag during recording |
57 | | -
|
58 | | -### 🛠️ Improvements |
59 | | -- Configuration migration system - Future-proof config format |
60 | | -- Atomic config writes - Prevents config corruption |
61 | | -- Dependency checking - Graceful error messages |
62 | | -
|
63 | | ---- |
64 | | -
|
65 | | -## Migration Guide |
66 | | -
|
67 | | -### For Users |
68 | | -No breaking changes in this release. Your 'config.ini' will continue to work. |
69 | | -
|
70 | | -### For Developers |
71 | | -- Git-cliff now used for changelog generation |
72 | | -- Configuration format version added |
73 | | -- No API changes |
74 | | -
|
75 | | ---- |
76 | | -
|
77 | | -## Testing |
78 | | -
|
79 | | -- All files pass Python syntax validation |
80 | | -- Code quality checks passing (CI) |
81 | | -- Windows build tested |
82 | | -
|
83 | | ---- |
84 | | -
|
85 | | -## Acknowledgments |
86 | | -
|
87 | | -Special thanks to contributors who made this release possible. |
88 | | -
|
89 | | ---- |
90 | | -
|
91 | | -**Full Changelog**: See [CHANGELOG_{{ version }}.md](https://github.com/ianaw/RainingKeysPython/blob/main/CHANGELOG_{{ version }}.md) |
92 | | -""" |
93 | | - |
94 | | -# Remove old changelog files (keep last 3 releases) |
| 23 | +# Remove leading and trailing whitespaces from the changelog's body. |
95 | 24 | trim = true |
96 | | -# Only show the last 3 releases |
97 | | -# Default: 0 (show all) |
98 | | -# Set to: true (trim old entries) |
| 25 | +# Render body even when there are no releases to process. |
| 26 | +render_always = true |
| 27 | +# An array of regex based postprocessors to modify the changelog. |
| 28 | +postprocessors = [ |
| 29 | + # Replace the placeholder <REPO> with a URL. |
| 30 | + #{ pattern = '<REPO>', replace = "https://github.com/orhun/git-cliff" }, |
| 31 | +] |
| 32 | +# render body even when there are no releases to process |
| 33 | +# render_always = true |
| 34 | +# output file path |
| 35 | +# output = "test.md" |
99 | 36 |
|
100 | 37 | [git] |
101 | | -# Parse all commits |
| 38 | +# Parse commits according to the conventional commits specification. |
| 39 | +# See https://www.conventionalcommits.org |
102 | 40 | conventional_commits = true |
103 | | -# Detect conventional commits (feat:, fix:, chore:, etc.) |
104 | | - |
105 | | -# Parse merge commits |
| 41 | +# Exclude commits that do not match the conventional commits specification. |
106 | 42 | filter_unconventional = true |
107 | | -# Treat all commits as conventional (not just feat/fix) |
108 | | - |
109 | | -# Split commits by scope |
| 43 | +# Require all commits to be conventional. |
| 44 | +# Takes precedence over filter_unconventional. |
| 45 | +require_conventional = false |
| 46 | +# Split commits on newlines, treating each line as an individual commit. |
110 | 47 | split_commits = false |
111 | | -# Don't split by commit scope |
112 | | - |
113 | | -# Sort commits by time |
114 | | -sort = "date" |
115 | | -# Options: "date", "topo" (chronological) |
116 | | - |
117 | | -[git.conventional_commits] |
118 | | -# Commit types to include |
119 | | -types = ["feat", "fix", "perf", "refactor", "chore", "test", "docs", "style"] |
120 | | -# Feature additions, bug fixes, performance, refactoring, maintenance, testing, docs, styling |
121 | | - |
122 | | -# Commit types with changelog scope |
123 | | -# scope_enhancement = ["feat"] |
124 | | -# scope_bug = ["fix"] |
125 | | -# scope_performance = ["perf"] |
126 | | -# scope_refactor = ["refactor"] |
127 | | -# scope_breaking = ["BREAKING CHANGE"] |
128 | | - |
129 | | -# Default commit type |
130 | | -# default_scope = "misc" |
131 | | - |
132 | | -[remote] |
133 | | -# Remote repository for git operations |
134 | | -# Note: This is automatically detected by git-cliff |
135 | | -# Uncomment and set if needed |
136 | | -# git_remote = "origin" |
137 | | - |
138 | | -# Tag prefix |
139 | | -git_tag_pattern = "v*" |
140 | | -# Match tags like v1.4.0 |
141 | | - |
142 | | -# Compare from tag (default: last tag) |
143 | | -# Uncomment and set for specific behavior |
144 | | -# from_tag = "v1.3.0" |
145 | | -# to_tag = "v1.4.0" |
146 | | - |
147 | | -[bump] |
148 | | -# Automatically bump version (set to false if you manage version manually) |
149 | | -# Not used in our workflow since we create changelog manually |
150 | | -auto_bump = false |
151 | | - |
152 | | -[meta] |
153 | | -# Metadata for changelog generation |
154 | | -# These values are available in templates |
155 | | - |
156 | | -# Repository name |
157 | | -# Note: Automatically detected |
158 | | -# repo_name = "RainingKeysPython" |
159 | | - |
160 | | -# Repository URL |
161 | | -# Note: Automatically detected |
162 | | -# repo_url = "https://github.com/ianaw/RainingKeysPython" |
163 | | - |
164 | | -# Repository owner |
165 | | -# Note: Automatically detected |
166 | | -# repo_owner = "ianaw" |
167 | | - |
168 | | -# Remote URL |
169 | | -# Note: Automatically detected |
170 | | -# remote_url = "https://github.com/ianaw/RainingKeysPython" |
| 48 | +# An array of regex based parsers to modify commit messages prior to further processing. |
| 49 | +commit_preprocessors = [ |
| 50 | + # Replace issue numbers with link templates to be updated in `changelog.postprocessors`. |
| 51 | + #{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](<REPO>/issues/${2}))"}, |
| 52 | + # Check spelling of the commit message using https://github.com/crate-ci/typos. |
| 53 | + # If the spelling is incorrect, it will be fixed automatically. |
| 54 | + #{ pattern = '.*', replace_command = 'typos --write-changes -' }, |
| 55 | +] |
| 56 | +# Prevent commits that are breaking from being excluded by commit parsers. |
| 57 | +protect_breaking_commits = false |
| 58 | +# An array of regex based parsers for extracting data from the commit message. |
| 59 | +# Assigns commits to groups. |
| 60 | +# Optionally sets the commit's scope and can decide to exclude commits from further processing. |
| 61 | +commit_parsers = [ |
| 62 | + { message = "^feat", group = "<!-- 0 -->🚀 Features" }, |
| 63 | + { message = "^fix", group = "<!-- 1 -->🐛 Bug Fixes" }, |
| 64 | + { message = "^doc", group = "<!-- 3 -->📚 Documentation" }, |
| 65 | + { message = "^perf", group = "<!-- 4 -->⚡ Performance" }, |
| 66 | + { message = "^refactor", group = "<!-- 2 -->🚜 Refactor" }, |
| 67 | + { message = "^style", group = "<!-- 5 -->🎨 Styling" }, |
| 68 | + { message = "^test", group = "<!-- 6 -->🧪 Testing" }, |
| 69 | + { message = "^chore\\(release\\): prepare for", skip = true }, |
| 70 | + { message = "^chore\\(deps.*\\)", skip = true }, |
| 71 | + { message = "^chore\\(pr\\)", skip = true }, |
| 72 | + { message = "^chore\\(pull\\)", skip = true }, |
| 73 | + { message = "^chore|^ci", group = "<!-- 7 -->⚙️ Miscellaneous Tasks" }, |
| 74 | + { body = ".*security", group = "<!-- 8 -->🛡️ Security" }, |
| 75 | + { message = "^revert", group = "<!-- 9 -->◀️ Revert" }, |
| 76 | + { message = ".*", group = "<!-- 10 -->💼 Other" }, |
| 77 | +] |
| 78 | +# Exclude commits that are not matched by any commit parser. |
| 79 | +filter_commits = false |
| 80 | +# Fail on a commit that is not matched by any commit parser. |
| 81 | +fail_on_unmatched_commit = false |
| 82 | +# An array of link parsers for extracting external references, and turning them into URLs, using regex. |
| 83 | +link_parsers = [] |
| 84 | +# Include only the tags that belong to the current branch. |
| 85 | +use_branch_tags = false |
| 86 | +# Order releases topologically instead of chronologically. |
| 87 | +topo_order = false |
| 88 | +# Order commits topologically instead of chronologically. |
| 89 | +topo_order_commits = true |
| 90 | +# Order of commits in each group/release within the changelog. |
| 91 | +# Allowed values: newest, oldest |
| 92 | +sort_commits = "oldest" |
| 93 | +# Process submodules commits |
| 94 | +recurse_submodules = false |
0 commit comments