tgit 0.13.0__tar.gz → 0.13.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,32 @@
1
+ name: Build Python package with uv
2
+
3
+ on:
4
+ push:
5
+ tags: ["*"] # 仅tag push时自动release
6
+
7
+ jobs:
8
+ build:
9
+ runs-on: ubuntu-latest
10
+
11
+ steps:
12
+ - name: Checkout code
13
+ uses: actions/checkout@v4
14
+
15
+ - name: Set up uv
16
+ uses: astral-sh/setup-uv@v6
17
+ with:
18
+ python-version: "3.12"
19
+ activate-environment: true
20
+
21
+ - name: Install dependencies
22
+ run: uv sync
23
+
24
+ - name: Build package
25
+ run: uv build
26
+
27
+ - name: GitHub Release
28
+ uses: softprops/action-gh-release@v1
29
+ with:
30
+ files: dist/*
31
+ env:
32
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,299 @@
1
+ ## HEAD
2
+
3
+ [v0.13.0...HEAD](https://github.com/Jannchie/tgit/compare/v0.13.0...HEAD)
4
+
5
+ ### :wrench: Chores
6
+
7
+ - **ci**: update build workflow to release only on tag push && replace artifact upload with github release - By [Jianqi Pan](mailto:jannchie@gmail.com) in [7548485](https://github.com/Jannchie/tgit/commit/7548485)
8
+ - **code-cleanup**: remove unnecessary noqa for print && update changelog and ruff ignore list - By [Jianqi Pan](mailto:jannchie@gmail.com) in [bdf5665](https://github.com/Jannchie/tgit/commit/bdf5665)
9
+
10
+ ## v0.13.0
11
+
12
+ [v0.12.0...v0.13.0](https://github.com/Jannchie/tgit/compare/v0.12.0...v0.13.0)
13
+
14
+ ### :sparkles: Features
15
+
16
+ - **changelog**: add progress bar and improve tag changelog aggregation - By [Jianqi Pan](mailto:jannchie@gmail.com) in [e98fba4](https://github.com/Jannchie/tgit/commit/e98fba4)
17
+ - **commit**: filter large diffs and lock files from ai commit msg input && switch from litellm to openai - By [Jianqi Pan](mailto:jannchie@gmail.com) in [587c4d1](https://github.com/Jannchie/tgit/commit/587c4d1)
18
+
19
+ ### :memo: Documentation
20
+
21
+ - **changelog**: update changelog for v0.13.0 release - By [Jianqi Pan](mailto:jannchie@gmail.com) in [e61e8bb](https://github.com/Jannchie/tgit/commit/e61e8bb)
22
+
23
+ ### :wrench: Chores
24
+
25
+ - **ci**: trigger on tag && simplify commands && upload artifacts only for tags - By [Jianqi Pan](mailto:jannchie@gmail.com) in [ee952df](https://github.com/Jannchie/tgit/commit/ee952df)
26
+ - **ci**: add github actions workflow for building python package with uv - By [Jianqi Pan](mailto:jannchie@gmail.com) in [7450f78](https://github.com/Jannchie/tgit/commit/7450f78)
27
+
28
+ ## v0.12.0
29
+
30
+ [v0.11.2...v0.12.0](https://github.com/Jannchie/tgit/compare/v0.11.2...v0.12.0)
31
+
32
+ ### :sparkles: Features
33
+
34
+ - **commit**: add console status during ai command generation - By [Jianqi Pan](mailto:jannchie@gmail.com) in [779d2da](https://github.com/Jannchie/tgit/commit/779d2da)
35
+ - **commit**: add support for user-specified commit type in get_ai_command && update get_ai_command to handle default commit types - By [Jianqi Pan](mailto:jannchie@gmail.com) in [88f6980](https://github.com/Jannchie/tgit/commit/88f6980)
36
+ - **commit**: add branch name to AI commit prompt && update dependencies - By [Jianqi Pan](mailto:jannchie@gmail.com) in [016facc](https://github.com/Jannchie/tgit/commit/016facc)
37
+
38
+ ## v0.11.2
39
+
40
+ [v0.11.0...v0.11.2](https://github.com/Jannchie/tgit/compare/v0.11.0...v0.11.2)
41
+
42
+ ### :adhesive_bandage: Fixes
43
+
44
+ - **versioning**: correct cargo.toml regex for version update && update litellm package to 1.64.1 - By [Jianqi Pan](mailto:jannchie@gmail.com) in [bdb69c5](https://github.com/Jannchie/tgit/commit/bdb69c5)
45
+
46
+ ### :wrench: Chores
47
+
48
+ - **dependencies**: update package versions && add beautifulsoup4 dependency && update comments for sys_platform checks - By [Jianqi Pan](mailto:jannchie@gmail.com) in [4c9d14a](https://github.com/Jannchie/tgit/commit/4c9d14a)
49
+
50
+ ## v0.11.0
51
+
52
+ [v0.10.2...v0.11.0](https://github.com/Jannchie/tgit/compare/v0.10.2...v0.11.0)
53
+
54
+ ### :sparkles: Features
55
+
56
+ - **cli**: add config command && update dependencies - By [Jannchie](mailto:panjianqi@preferred.jp) in [32d0ecc](https://github.com/Jannchie/tgit/commit/32d0ecc)
57
+ - **config, dependencies, commit**: Add configuration command and update dependency versions and AI provider - By [Jannchie](mailto:panjianqi@preferred.jp) in [e446030](https://github.com/Jannchie/tgit/commit/e446030)
58
+
59
+ ### :art: Refactors
60
+
61
+ - **utils**: update function signature for get_commit_command - By [Jannchie](mailto:panjianqi@preferred.jp) in [4c67c0a](https://github.com/Jannchie/tgit/commit/4c67c0a)
62
+
63
+ ### :memo: Documentation
64
+
65
+ - **commit**: update commit prompt with class definition - By [Jannchie](mailto:panjianqi@preferred.jp) in [2f5a464](https://github.com/Jannchie/tgit/commit/2f5a464)
66
+
67
+ ### :wrench: Chores
68
+
69
+ - **dependencies**: add ruff to dev dependencies && update type hints and function signatures - By [Jannchie](mailto:panjianqi@preferred.jp) in [e137b4f](https://github.com/Jannchie/tgit/commit/e137b4f)
70
+ - **lock**: update lock file - By [Jannchie](mailto:panjianqi@preferred.jp) in [c4330c5](https://github.com/Jannchie/tgit/commit/c4330c5)
71
+
72
+ ## v0.10.2
73
+
74
+ [v0.10.1...v0.10.2](https://github.com/Jannchie/tgit/compare/v0.10.1...v0.10.2)
75
+
76
+ ### :adhesive_bandage: Fixes
77
+
78
+ - **template-rendering**: correct types rendering in commit prompt - By [Jianqi Pan](mailto:jannchie@gmail.com) in [542db82](https://github.com/Jannchie/tgit/commit/542db82)
79
+
80
+ ### :art: Refactors
81
+
82
+ - **commit-command**: improve function signatures && handle keyword args - By [Jianqi Pan](mailto:jannchie@gmail.com) in [8f3bc59](https://github.com/Jannchie/tgit/commit/8f3bc59)
83
+
84
+ ## v0.10.1
85
+
86
+ [v0.10.0...v0.10.1](https://github.com/Jannchie/tgit/compare/v0.10.0...v0.10.1)
87
+
88
+ ### :adhesive_bandage: Fixes
89
+
90
+ - **file-open**: open pyproject.toml and Cargo.toml in binary mode - By [Jianqi Pan](mailto:jannchie@gmail.com) in [5ba059a](https://github.com/Jannchie/tgit/commit/5ba059a)
91
+
92
+ ### :art: Refactors
93
+
94
+ - **project**: revise configuration files && update package dependencies && enhance type annotations - By [Jianqi Pan](mailto:jannchie@gmail.com) in [6ff2ecc](https://github.com/Jannchie/tgit/commit/6ff2ecc)
95
+ - **version**: modularize version retrieval && extract diff formatting - By [Jianqi Pan](mailto:jannchie@gmail.com) in [9832dfc](https://github.com/Jannchie/tgit/commit/9832dfc)
96
+
97
+ ## v0.10.0
98
+
99
+ [v0.9.0...v0.10.0](https://github.com/Jannchie/tgit/compare/v0.9.0...v0.10.0)
100
+
101
+ ### :sparkles: Features
102
+
103
+ - **version**: add support for updating build.gradle.kts version - By [Jianqi Pan](mailto:jannchie@gmail.com) in [c66e792](https://github.com/Jannchie/tgit/commit/c66e792)
104
+ - **version**: add custom path support for version handling - By [Jianqi Pan](mailto:jannchie@gmail.com) in [4c79f46](https://github.com/Jannchie/tgit/commit/4c79f46)
105
+
106
+ ## v0.9.0
107
+
108
+ [v0.8.1...v0.9.0](https://github.com/Jannchie/tgit/compare/v0.8.1...v0.9.0)
109
+
110
+ ### :sparkles: Features
111
+
112
+ - **add**: implement add command to wrap git add - By [Jianqi Pan](mailto:jannchie@gmail.com) in [e372314](https://github.com/Jannchie/tgit/commit/e372314)
113
+ - **version**: add recursive option for version bumping - By [Jianqi Pan](mailto:jannchie@gmail.com) in [c98bf05](https://github.com/Jannchie/tgit/commit/c98bf05)
114
+
115
+ ### :wrench: Chores
116
+
117
+ - **deps**: update python version and dependencies - By [Jianqi Pan](mailto:jannchie@gmail.com) in [3c49d1a](https://github.com/Jannchie/tgit/commit/3c49d1a)
118
+
119
+ ## v0.8.1
120
+
121
+ [v0.8.0...v0.8.1](https://github.com/Jannchie/tgit/compare/v0.8.0...v0.8.1)
122
+
123
+ ### :lipstick: Styles
124
+
125
+ - **commit**: update commit message instructions && change import style - By [Jianqi Pan](mailto:jannchie@gmail.com) in [538f27d](https://github.com/Jannchie/tgit/commit/538f27d)
126
+
127
+ ## v0.8.0
128
+
129
+ [v0.7.1...v0.8.0](https://github.com/Jannchie/tgit/compare/v0.7.1...v0.8.0)
130
+
131
+ ### :sparkles: Features
132
+
133
+ - **commit**: add 'wip' to commit types and correct invalid type error message - By [Jianqi Pan](mailto:jannchie@gmail.com) in [be64b23](https://github.com/Jannchie/tgit/commit/be64b23)
134
+
135
+ ### :memo: Documentation
136
+
137
+ - **commit**: clarify role description by specifying message should cover all changes in diff - By [Jianqi Pan](mailto:jannchie@gmail.com) in [486cb2c](https://github.com/Jannchie/tgit/commit/486cb2c)
138
+
139
+ ### :wrench: Chores
140
+
141
+ - **dependencies**: update dependencies versions in pyproject.toml and lock files - By [Jianqi Pan](mailto:jannchie@gmail.com) in [51142a2](https://github.com/Jannchie/tgit/commit/51142a2)
142
+ - update readme configuration to include content-type in pyproject.toml - By [Jianqi Pan](mailto:jannchie@gmail.com) in [122be13](https://github.com/Jannchie/tgit/commit/122be13)
143
+
144
+ ## v0.7.1
145
+
146
+ [v0.7.0...v0.7.1](https://github.com/Jannchie/tgit/compare/v0.7.0...v0.7.1)
147
+
148
+ ### :adhesive_bandage: Fixes
149
+
150
+ - **authentication**: handle openai authentication error - By [Jianqi Pan](mailto:jannchie@gmail.com) in [e2e0e53](https://github.com/Jannchie/tgit/commit/e2e0e53)
151
+ - handle invalid git repository error when getting ai command - By [Jianqi Pan](mailto:jannchie@gmail.com) in [c8c4a54](https://github.com/Jannchie/tgit/commit/c8c4a54)
152
+
153
+ ### :wrench: Chores
154
+
155
+ - update lock files with new dependencies - By [Jianqi Pan](mailto:jannchie@gmail.com) in [537c627](https://github.com/Jannchie/tgit/commit/537c627)
156
+
157
+ ## v0.7.0
158
+
159
+ [v0.6.1...v0.7.0](https://github.com/Jannchie/tgit/compare/v0.6.1...v0.7.0)
160
+
161
+ ### :sparkles: Features
162
+
163
+ - **changelog**: add ability to output changelog to a file - By [Jannchie](mailto:panjianqi@preferred.jp) in [b1a52e1](https://github.com/Jannchie/tgit/commit/b1a52e1)
164
+
165
+ ## v0.6.1
166
+
167
+ [v0.6.0...v0.6.1](https://github.com/Jannchie/tgit/compare/v0.6.0...v0.6.1)
168
+
169
+ ### :adhesive_bandage: Fixes
170
+
171
+ - **changelog**: simplify sort by scope logic and validate diff before AI command - By [Jannchie](mailto:panjianqi@preferred.jp) in [32dd4e3](https://github.com/Jannchie/tgit/commit/32dd4e3)
172
+
173
+ ### :wrench: Chores
174
+
175
+ - update gitignore, vscode settings, and pyproject.toml - By [Jannchie](mailto:panjianqi@preferred.jp) in [103271e](https://github.com/Jannchie/tgit/commit/103271e)
176
+
177
+ ## v0.6.0
178
+
179
+ [v0.5.2...v0.6.0](https://github.com/Jannchie/tgit/compare/v0.5.2...v0.6.0)
180
+
181
+ ### :sparkles: Features
182
+
183
+ - **version**: introduce auto-detection of version bump based on commit types - By [Jannchie](mailto:panjianqi@preferred.jp) in [910107f](https://github.com/Jannchie/tgit/commit/910107f)
184
+
185
+ ### :art: Refactors
186
+
187
+ - extract git commit range logic into separate function for better readability - By [Jannchie](mailto:panjianqi@preferred.jp) in [44f9c94](https://github.com/Jannchie/tgit/commit/44f9c94)
188
+
189
+ ## v0.5.2
190
+
191
+ [v0.5.1...v0.5.2](https://github.com/Jannchie/tgit/compare/v0.5.1...v0.5.2)
192
+
193
+ ### :adhesive_bandage: Fixes
194
+
195
+ - **commit**: correct commit message formatting and emoji usage - By [Jannchie](mailto:panjianqi@preferred.jp) in [34b58a9](https://github.com/Jannchie/tgit/commit/34b58a9)
196
+
197
+ ## v0.5.1
198
+
199
+ [v0.5.0...v0.5.1](https://github.com/Jannchie/tgit/compare/v0.5.0...v0.5.1)
200
+
201
+ ### :sparkles: Features
202
+
203
+ - **commit**: add rich print for missing commit message - By [Jannchie](mailto:panjianqi@preferred.jp) in [686cf4a](https://github.com/Jannchie/tgit/commit/686cf4a)
204
+
205
+ ## v0.5.0
206
+
207
+ [v0.4.3...v0.5.0](https://github.com/Jannchie/tgit/compare/v0.4.3...v0.5.0)
208
+
209
+ ### :sparkles: Features
210
+
211
+ - **tgit**: add ai-powered commit message suggestion using openai - By [Jannchie](mailto:panjianqi@preferred.jp) in [93299f1](https://github.com/Jannchie/tgit/commit/93299f1)
212
+
213
+ ## v0.4.3
214
+
215
+ [v0.4.2...v0.4.3](https://github.com/Jannchie/tgit/compare/v0.4.2...v0.4.3)
216
+
217
+ ### :art: Refactors
218
+
219
+ - **version**: make the code clearer - By [Jianqi Pan](mailto:jannchie@gmail.com) in [68d626e](https://github.com/Jannchie/tgit/commit/68d626e)
220
+
221
+ ### :memo: Documentation
222
+
223
+ - add codetime badge - By [Jianqi Pan](mailto:jannchie@gmail.com) in [984b9d3](https://github.com/Jannchie/tgit/commit/984b9d3)
224
+
225
+ ## v0.4.2
226
+
227
+ [v0.4.1...v0.4.2](https://github.com/Jannchie/tgit/compare/v0.4.1...v0.4.2)
228
+
229
+ ### :adhesive_bandage: Fixes
230
+
231
+ - **depeendencies**: need python 3.11 because of tomllib - By [Jianqi Pan](mailto:jannchie@gmail.com) in [d7b3c0a](https://github.com/Jannchie/tgit/commit/d7b3c0a)
232
+
233
+ ## v0.4.1
234
+
235
+ [v0.4.0...v0.4.1](https://github.com/Jannchie/tgit/compare/v0.4.0...v0.4.1)
236
+
237
+ ### :adhesive_bandage: Fixes
238
+
239
+ - **depeendencies**: add gitpython as dependencies - By [Jianqi Pan](mailto:jannchie@gmail.com) in [51bbcb1](https://github.com/Jannchie/tgit/commit/51bbcb1)
240
+
241
+ ## v0.4.0
242
+
243
+ [v0.3.0...v0.4.0](https://github.com/Jannchie/tgit/compare/v0.3.0...v0.4.0)
244
+
245
+ ### :sparkles: Features
246
+
247
+ - **changelog**: implement basic changelog features - By [Jianqi Pan](mailto:jannchie@gmail.com) in [cf623c6](https://github.com/Jannchie/tgit/commit/cf623c6)
248
+
249
+ ### :adhesive_bandage: Fixes
250
+
251
+ - **changelog**: check whether the latest commit has a tag - By [Jianqi Pan](mailto:jannchie@gmail.com) in [310a306](https://github.com/Jannchie/tgit/commit/310a306)
252
+
253
+ ### :memo: Documentation
254
+
255
+ - add readme - By [Jianqi Pan](mailto:jannchie@gmail.com) in [1b31cbf](https://github.com/Jannchie/tgit/commit/1b31cbf)
256
+
257
+ ### :wrench: Chores
258
+
259
+ - **build**: use poetry - By [Jianqi Pan](mailto:jannchie@gmail.com) in [656de25](https://github.com/Jannchie/tgit/commit/656de25)
260
+ - **version**: clean the useless code - By [Jianqi Pan](mailto:jannchie@gmail.com) in [0c24d69](https://github.com/Jannchie/tgit/commit/0c24d69)
261
+
262
+ ## v0.3.0
263
+
264
+ [v0.2.2...v0.3.0](https://github.com/Jannchie/tgit/compare/v0.2.2...v0.3.0)
265
+
266
+ ### :sparkles: Features
267
+
268
+ - **version**: update more version files - By [Jianqi Pan](mailto:jannchie@gmail.com) in [3a87374](https://github.com/Jannchie/tgit/commit/3a87374)
269
+ - add gitt as a alias - By [Jianqi Pan](mailto:jannchie@gmail.com) in [bacd8fe](https://github.com/Jannchie/tgit/commit/bacd8fe)
270
+
271
+ ### :wrench: Chores
272
+
273
+ - **commit**: do not show type choices because they are too long - By [Jianqi Pan](mailto:jannchie@gmail.com) in [886ed07](https://github.com/Jannchie/tgit/commit/886ed07)
274
+ - **scripts**: update build script - By [Jianqi Pan](mailto:jannchie@gmail.com) in [89702cd](https://github.com/Jannchie/tgit/commit/89702cd)
275
+
276
+ ## v0.2.2
277
+
278
+ [v0.2.1...v0.2.2](https://github.com/Jannchie/tgit/compare/v0.2.1...v0.2.2)
279
+
280
+ ### :adhesive_bandage: Fixes
281
+
282
+ - **commit**: add tag - By [Jianqi Pan](mailto:jannchie@gmail.com) in [8ea1e80](https://github.com/Jannchie/tgit/commit/8ea1e80)
283
+
284
+ ## v0.2.1
285
+
286
+ [0c6d5b32aad9f01678b114120e7530dfebf4fb85...v0.2.1](https://github.com/Jannchie/tgit/compare/0c6d5b32aad9f01678b114120e7530dfebf4fb85...v0.2.1)
287
+
288
+ ### :sparkles: Features
289
+
290
+ - **commit**: enable emoji settings - By [Jianqi Pan](mailto:jannchie@gmail.com) in [6acd0dc](https://github.com/Jannchie/tgit/commit/6acd0dc)
291
+ - **version**: detect version from file or git tags - By [Jianqi Pan](mailto:jannchie@gmail.com) in [5b4d4aa](https://github.com/Jannchie/tgit/commit/5b4d4aa)
292
+
293
+ ### :adhesive_bandage: Fixes
294
+
295
+ - **commit**: push tag - By [Jianqi Pan](mailto:jannchie@gmail.com) in [35c96a8](https://github.com/Jannchie/tgit/commit/35c96a8)
296
+
297
+ ### :wrench: Chores
298
+
299
+ - **format**: use sourcery - By [Jianqi Pan](mailto:jannchie@gmail.com) in [03f2078](https://github.com/Jannchie/tgit/commit/03f2078)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tgit
3
- Version: 0.13.0
3
+ Version: 0.13.2
4
4
  Summary: Tool for Git Interaction Temptation (tgit): An elegant CLI tool that simplifies and streamlines your Git workflow, making version control a breeze.
5
5
  Author-email: Jannchie <jannchie@gmail.com>
6
6
  License-Expression: MIT
@@ -1,65 +1,66 @@
1
- [project]
2
- name = "tgit"
3
- version = "0.13.0"
4
- description = "Tool for Git Interaction Temptation (tgit): An elegant CLI tool that simplifies and streamlines your Git workflow, making version control a breeze."
5
- authors = [{ name = "Jannchie", email = "jannchie@gmail.com" }]
6
- dependencies = [
7
- "rich>=13.9.4",
8
- "pyyaml>=6.0.2",
9
- "inquirer>=3.4.0",
10
- "gitpython>=3.1.43",
11
- "openai>=1.52.0",
12
- "jinja2>=3.1.4",
13
- "gitpython>=3.1.44",
14
- "inquirer>=3.4.0",
15
- "beautifulsoup4>=4.13.3",
16
- ]
17
- readme = { content-type = "text/markdown", file = "README.md" }
18
- requires-python = ">= 3.11"
19
- classifiers = [
20
- "Development Status :: 3 - Alpha",
21
- "Intended Audience :: Developers",
22
- "License :: OSI Approved :: MIT License",
23
- "Programming Language :: Python :: 3",
24
- "Topic :: Software Development :: Version Control",
25
- "Topic :: Utilities",
26
- "Typing :: Typed",
27
- ]
28
- keywords = ["git", "tool", "changelog", "version", "commit"]
29
- license = "MIT"
30
-
31
- [build-system]
32
- requires = ["hatchling"]
33
- build-backend = "hatchling.build"
34
-
35
- [tool.uv]
36
- upgrade = true
37
- package = true
38
-
39
- [tool.hatch.metadata]
40
- allow-direct-references = true
41
-
42
- [tool.hatch.build.targets.wheel]
43
- packages = ["tgit"]
44
-
45
- [project.scripts]
46
- tgit = "tgit:cli.main"
47
-
48
- [tool.ruff]
49
- line-length = 140
50
- select = ["ALL"]
51
-
52
- ignore = [
53
- "PGH",
54
- "RUF003",
55
- "BLE001",
56
- "ERA001",
57
- "FIX002",
58
- "TD002",
59
- "TD003",
60
- "D",
61
- "TRY300",
62
- ]
63
-
64
- [dependency-groups]
65
- dev = ["ruff>=0.9.4"]
1
+ [project]
2
+ name = "tgit"
3
+ version = "0.13.2"
4
+ description = "Tool for Git Interaction Temptation (tgit): An elegant CLI tool that simplifies and streamlines your Git workflow, making version control a breeze."
5
+ authors = [{ name = "Jannchie", email = "jannchie@gmail.com" }]
6
+ dependencies = [
7
+ "rich>=13.9.4",
8
+ "pyyaml>=6.0.2",
9
+ "inquirer>=3.4.0",
10
+ "gitpython>=3.1.43",
11
+ "openai>=1.52.0",
12
+ "jinja2>=3.1.4",
13
+ "gitpython>=3.1.44",
14
+ "inquirer>=3.4.0",
15
+ "beautifulsoup4>=4.13.3",
16
+ ]
17
+ readme = { content-type = "text/markdown", file = "README.md" }
18
+ requires-python = ">= 3.11"
19
+ classifiers = [
20
+ "Development Status :: 3 - Alpha",
21
+ "Intended Audience :: Developers",
22
+ "License :: OSI Approved :: MIT License",
23
+ "Programming Language :: Python :: 3",
24
+ "Topic :: Software Development :: Version Control",
25
+ "Topic :: Utilities",
26
+ "Typing :: Typed",
27
+ ]
28
+ keywords = ["git", "tool", "changelog", "version", "commit"]
29
+ license = "MIT"
30
+
31
+ [build-system]
32
+ requires = ["hatchling"]
33
+ build-backend = "hatchling.build"
34
+
35
+ [tool.uv]
36
+ upgrade = true
37
+ package = true
38
+
39
+ [tool.hatch.metadata]
40
+ allow-direct-references = true
41
+
42
+ [tool.hatch.build.targets.wheel]
43
+ packages = ["tgit"]
44
+
45
+ [project.scripts]
46
+ tgit = "tgit:cli.main"
47
+
48
+ [tool.ruff]
49
+ line-length = 140
50
+ select = ["ALL"]
51
+
52
+ ignore = [
53
+ "PGH",
54
+ "RUF003",
55
+ "BLE001",
56
+ "ERA001",
57
+ "FIX002",
58
+ "TD002",
59
+ "TD003",
60
+ "D",
61
+ "TRY300",
62
+ "A004",
63
+ ]
64
+
65
+ [dependency-groups]
66
+ dev = ["ruff>=0.9.4"]
@@ -7,6 +7,7 @@ from dataclasses import dataclass
7
7
  from pathlib import Path
8
8
 
9
9
  import git
10
+ from rich import print
10
11
  from rich.progress import Progress
11
12
 
12
13
  logger = logging.getLogger("tgit")
@@ -269,8 +270,8 @@ def handle_changelog(args: ChangelogArgs) -> None:
269
270
  if args.output:
270
271
  with Path(args.output).open("w") as output_file:
271
272
  output_file.write(changelogs.strip("\n") + "\n")
272
- print() # noqa: T201
273
- print(changelogs.strip("\n")) # noqa: T201
273
+ print()
274
+ print(changelogs.strip("\n"))
274
275
  return
275
276
 
276
277
  # 否则输出指定范围的 changelog
@@ -279,8 +280,9 @@ def handle_changelog(args: ChangelogArgs) -> None:
279
280
  if args.output:
280
281
  with Path(args.output).open("w") as output_file:
281
282
  output_file.write(changelog.strip("\n") + "\n")
282
- print() # noqa: T201
283
- print(changelog) # noqa: T201
283
+ else:
284
+ print()
285
+ print(changelog)
284
286
 
285
287
 
286
288
  def get_changelog_by_range(repo: git.Repo, from_ref: str, to_ref: str) -> str:
@@ -1,4 +1,5 @@
1
1
  import argparse
2
+ import contextlib
2
3
  import importlib.metadata
3
4
  import threading
4
5
 
@@ -33,7 +34,8 @@ def main() -> None:
33
34
  args = parser.parse_args()
34
35
 
35
36
  def import_openai() -> None:
36
- import openai # noqa: F401
37
+ with contextlib.suppress(Exception):
38
+ import openai # noqa: F401
37
39
 
38
40
  threading.Thread(target=import_openai).start()
39
41
 
@@ -7,10 +7,7 @@ from pathlib import Path
7
7
  import git
8
8
  from jinja2 import Environment, FileSystemLoader
9
9
  from pydantic import BaseModel
10
- from rich import (
11
- get_console,
12
- print, # noqa: A004
13
- )
10
+ from rich import get_console, print
14
11
 
15
12
  from tgit.settings import settings
16
13
  from tgit.utils import get_commit_command, run_command, type_emojis
@@ -93,7 +90,7 @@ def get_ai_command(specified_type: str | None = None) -> str | None:
93
90
  return None
94
91
  files_to_include, lock_files = get_filtered_diff_files(repo)
95
92
  if not files_to_include and not lock_files:
96
- print(f"[yellow]No files with diff lines <= {MAX_DIFF_LINES} to commit[/yellow]")
93
+ print("[yellow]No files to commit, please add some files before using AI[/yellow]")
97
94
  return None
98
95
  diff = ""
99
96
  if lock_files:
@@ -1,35 +0,0 @@
1
- name: Build Python package with uv
2
-
3
- on:
4
- push:
5
- branches: [main]
6
- pull_request:
7
- branches: [main]
8
- workflow_dispatch:
9
-
10
- jobs:
11
- build:
12
- runs-on: ubuntu-latest
13
-
14
- steps:
15
- - name: Checkout code
16
- uses: actions/checkout@v4
17
-
18
- - name: Set up uv
19
- uses: astral-sh/setup-uv@v6
20
- with:
21
- python-version: "3.12"
22
- activate-environment: true
23
- - name: Install dependencies
24
- run: |
25
- uv sync
26
-
27
- - name: Build package (wheel and sdist)
28
- run: |
29
- python -m build
30
-
31
- - name: Upload build artifacts
32
- uses: actions/upload-artifact@v4
33
- with:
34
- name: dist-packages
35
- path: dist/
tgit-0.13.0/CHANGELOG.md DELETED
@@ -1,135 +0,0 @@
1
- ## v0.6.1
2
-
3
- [v0.6.0...v0.6.1](https://github.com/Jannchie/tgit/compare/v0.6.0...v0.6.1)
4
-
5
- ### :adhesive_bandage: Fixes
6
-
7
- - **changelog**: simplify sort by scope logic and validate diff before AI command - By [Jannchie](mailto:panjianqi@preferred.jp) in [32dd4e3](https://github.com/Jannchie/tgit/commit/32dd4e3)
8
-
9
- ### :wrench: Chores
10
-
11
- - update gitignore, vscode settings, and pyproject.toml - By [Jannchie](mailto:panjianqi@preferred.jp) in [103271e](https://github.com/Jannchie/tgit/commit/103271e)
12
-
13
- ## v0.6.0
14
-
15
- [v0.5.2...v0.6.0](https://github.com/Jannchie/tgit/compare/v0.5.2...v0.6.0)
16
-
17
- ### :sparkles: Features
18
-
19
- - **version**: introduce auto-detection of version bump based on commit types - By [Jannchie](mailto:panjianqi@preferred.jp) in [910107f](https://github.com/Jannchie/tgit/commit/910107f)
20
-
21
- ### :art: Refactors
22
-
23
- - extract git commit range logic into separate function for better readability - By [Jannchie](mailto:panjianqi@preferred.jp) in [44f9c94](https://github.com/Jannchie/tgit/commit/44f9c94)
24
-
25
- ## v0.5.2
26
-
27
- [v0.5.1...v0.5.2](https://github.com/Jannchie/tgit/compare/v0.5.1...v0.5.2)
28
-
29
- ### :adhesive_bandage: Fixes
30
-
31
- - **commit**: correct commit message formatting and emoji usage - By [Jannchie](mailto:panjianqi@preferred.jp) in [34b58a9](https://github.com/Jannchie/tgit/commit/34b58a9)
32
-
33
- ## v0.5.1
34
-
35
- [v0.5.0...v0.5.1](https://github.com/Jannchie/tgit/compare/v0.5.0...v0.5.1)
36
-
37
- ### :sparkles: Features
38
-
39
- - **commit**: add rich print for missing commit message - By [Jannchie](mailto:panjianqi@preferred.jp) in [686cf4a](https://github.com/Jannchie/tgit/commit/686cf4a)
40
-
41
- ## v0.5.0
42
-
43
- [v0.4.3...v0.5.0](https://github.com/Jannchie/tgit/compare/v0.4.3...v0.5.0)
44
-
45
- ### :sparkles: Features
46
-
47
- - **tgit**: add ai-powered commit message suggestion using openai - By [Jannchie](mailto:panjianqi@preferred.jp) in [93299f1](https://github.com/Jannchie/tgit/commit/93299f1)
48
-
49
- ## v0.4.3
50
-
51
- [v0.4.2...v0.4.3](https://github.com/Jannchie/tgit/compare/v0.4.2...v0.4.3)
52
-
53
- ### :art: Refactors
54
-
55
- - **version**: make the code clearer - By [Jianqi Pan](mailto:jannchie@gmail.com) in [68d626e](https://github.com/Jannchie/tgit/commit/68d626e)
56
-
57
- ### :memo: Documentation
58
-
59
- - add codetime badge - By [Jianqi Pan](mailto:jannchie@gmail.com) in [984b9d3](https://github.com/Jannchie/tgit/commit/984b9d3)
60
-
61
- ## v0.4.2
62
-
63
- [v0.4.1...v0.4.2](https://github.com/Jannchie/tgit/compare/v0.4.1...v0.4.2)
64
-
65
- ### :adhesive_bandage: Fixes
66
-
67
- - **depeendencies**: need python 3.11 because of tomllib - By [Jianqi Pan](mailto:jannchie@gmail.com) in [d7b3c0a](https://github.com/Jannchie/tgit/commit/d7b3c0a)
68
-
69
- ## v0.4.1
70
-
71
- [v0.4.0...v0.4.1](https://github.com/Jannchie/tgit/compare/v0.4.0...v0.4.1)
72
-
73
- ### :adhesive_bandage: Fixes
74
-
75
- - **depeendencies**: add gitpython as dependencies - By [Jianqi Pan](mailto:jannchie@gmail.com) in [51bbcb1](https://github.com/Jannchie/tgit/commit/51bbcb1)
76
-
77
- ## v0.4.0
78
-
79
- [v0.3.0...v0.4.0](https://github.com/Jannchie/tgit/compare/v0.3.0...v0.4.0)
80
-
81
- ### :sparkles: Features
82
-
83
- - **changelog**: implement basic changelog features - By [Jianqi Pan](mailto:jannchie@gmail.com) in [cf623c6](https://github.com/Jannchie/tgit/commit/cf623c6)
84
-
85
- ### :adhesive_bandage: Fixes
86
-
87
- - **changelog**: check whether the latest commit has a tag - By [Jianqi Pan](mailto:jannchie@gmail.com) in [310a306](https://github.com/Jannchie/tgit/commit/310a306)
88
-
89
- ### :memo: Documentation
90
-
91
- - add readme - By [Jianqi Pan](mailto:jannchie@gmail.com) in [1b31cbf](https://github.com/Jannchie/tgit/commit/1b31cbf)
92
-
93
- ### :wrench: Chores
94
-
95
- - **build**: use poetry - By [Jianqi Pan](mailto:jannchie@gmail.com) in [656de25](https://github.com/Jannchie/tgit/commit/656de25)
96
- - **version**: clean the useless code - By [Jianqi Pan](mailto:jannchie@gmail.com) in [0c24d69](https://github.com/Jannchie/tgit/commit/0c24d69)
97
-
98
- ## v0.3.0
99
-
100
- [v0.2.2...v0.3.0](https://github.com/Jannchie/tgit/compare/v0.2.2...v0.3.0)
101
-
102
- ### :sparkles: Features
103
-
104
- - **version**: update more version files - By [Jianqi Pan](mailto:jannchie@gmail.com) in [3a87374](https://github.com/Jannchie/tgit/commit/3a87374)
105
- - add gitt as a alias - By [Jianqi Pan](mailto:jannchie@gmail.com) in [bacd8fe](https://github.com/Jannchie/tgit/commit/bacd8fe)
106
-
107
- ### :wrench: Chores
108
-
109
- - **commit**: do not show type choices because they are too long - By [Jianqi Pan](mailto:jannchie@gmail.com) in [886ed07](https://github.com/Jannchie/tgit/commit/886ed07)
110
- - **scripts**: update build script - By [Jianqi Pan](mailto:jannchie@gmail.com) in [89702cd](https://github.com/Jannchie/tgit/commit/89702cd)
111
-
112
- ## v0.2.2
113
-
114
- [v0.2.1...v0.2.2](https://github.com/Jannchie/tgit/compare/v0.2.1...v0.2.2)
115
-
116
- ### :adhesive_bandage: Fixes
117
-
118
- - **commit**: add tag - By [Jianqi Pan](mailto:jannchie@gmail.com) in [8ea1e80](https://github.com/Jannchie/tgit/commit/8ea1e80)
119
-
120
- ## v0.2.1
121
-
122
- [0c6d5b32aad9f01678b114120e7530dfebf4fb85...v0.2.1](https://github.com/Jannchie/tgit/compare/0c6d5b32aad9f01678b114120e7530dfebf4fb85...v0.2.1)
123
-
124
- ### :sparkles: Features
125
-
126
- - **commit**: enable emoji settings - By [Jianqi Pan](mailto:jannchie@gmail.com) in [6acd0dc](https://github.com/Jannchie/tgit/commit/6acd0dc)
127
- - **version**: detect version from file or git tags - By [Jianqi Pan](mailto:jannchie@gmail.com) in [5b4d4aa](https://github.com/Jannchie/tgit/commit/5b4d4aa)
128
-
129
- ### :adhesive_bandage: Fixes
130
-
131
- - **commit**: push tag - By [Jianqi Pan](mailto:jannchie@gmail.com) in [35c96a8](https://github.com/Jannchie/tgit/commit/35c96a8)
132
-
133
- ### :wrench: Chores
134
-
135
- - **format**: use sourcery - By [Jianqi Pan](mailto:jannchie@gmail.com) in [03f2078](https://github.com/Jannchie/tgit/commit/03f2078)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes