git-copilot-commit 0.1.10__tar.gz → 0.1.12__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.
- {git_copilot_commit-0.1.10 → git_copilot_commit-0.1.12}/.github/workflows/ci.yml +3 -0
- {git_copilot_commit-0.1.10 → git_copilot_commit-0.1.12}/PKG-INFO +43 -14
- {git_copilot_commit-0.1.10 → git_copilot_commit-0.1.12}/README.md +42 -13
- git_copilot_commit-0.1.12/pyproject.toml +41 -0
- git_copilot_commit-0.1.12/src/git_copilot_commit/version.py +3 -0
- {git_copilot_commit-0.1.10 → git_copilot_commit-0.1.12}/uv.lock +0 -1
- git_copilot_commit-0.1.10/pyproject.toml +0 -108
- git_copilot_commit-0.1.10/src/git_copilot_commit/version.py +0 -40
- {git_copilot_commit-0.1.10 → git_copilot_commit-0.1.12}/.gitignore +0 -0
- {git_copilot_commit-0.1.10 → git_copilot_commit-0.1.12}/.python-version +0 -0
- {git_copilot_commit-0.1.10 → git_copilot_commit-0.1.12}/LICENSE +0 -0
- {git_copilot_commit-0.1.10 → git_copilot_commit-0.1.12}/src/git_copilot_commit/__init__.py +0 -0
- {git_copilot_commit-0.1.10 → git_copilot_commit-0.1.12}/src/git_copilot_commit/cli.py +0 -0
- {git_copilot_commit-0.1.10 → git_copilot_commit-0.1.12}/src/git_copilot_commit/git.py +0 -0
- {git_copilot_commit-0.1.10 → git_copilot_commit-0.1.12}/src/git_copilot_commit/py.typed +0 -0
- {git_copilot_commit-0.1.10 → git_copilot_commit-0.1.12}/src/git_copilot_commit/settings.py +0 -0
- {git_copilot_commit-0.1.10 → git_copilot_commit-0.1.12}/vhs/demo.vhs +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: git-copilot-commit
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.12
|
|
4
4
|
Summary: Automatically generate and commit changes using copilot
|
|
5
5
|
Author-email: Dheepak Krishnamurthy <1813121+kdheepak@users.noreply.github.com>
|
|
6
6
|
License-File: LICENSE
|
|
@@ -15,7 +15,7 @@ Description-Content-Type: text/markdown
|
|
|
15
15
|
|
|
16
16
|
AI-powered Git commit assistant that generates conventional commit messages using GitHub Copilot.
|
|
17
17
|
|
|
18
|
-

|
|
18
|
+

|
|
19
19
|
|
|
20
20
|
## Features
|
|
21
21
|
|
|
@@ -26,26 +26,49 @@ AI-powered Git commit assistant that generates conventional commit messages usin
|
|
|
26
26
|
|
|
27
27
|
## Installation
|
|
28
28
|
|
|
29
|
-
Install
|
|
29
|
+
### Install the tool using [`uv`] (recommended)
|
|
30
|
+
|
|
31
|
+
Install [`uv`]:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# On macOS and Linux.
|
|
35
|
+
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
36
|
+
|
|
37
|
+
# On Windows.
|
|
38
|
+
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Then install `git-copilot-commit`:
|
|
30
42
|
|
|
31
43
|
```bash
|
|
44
|
+
# Install into isolated environment.
|
|
32
45
|
uv tool install git-copilot-commit
|
|
33
46
|
```
|
|
34
47
|
|
|
35
|
-
|
|
48
|
+
Run the tool using:
|
|
36
49
|
|
|
37
50
|
```bash
|
|
38
|
-
|
|
51
|
+
git-copilot-commit --help
|
|
39
52
|
```
|
|
40
53
|
|
|
41
|
-
|
|
54
|
+
Alternatively, you can always install and run the latest version of tool directly in one command by
|
|
55
|
+
using:
|
|
42
56
|
|
|
43
57
|
```bash
|
|
58
|
+
# Install latest version into temporary environment and run
|
|
44
59
|
uvx git-copilot-commit --help
|
|
45
60
|
```
|
|
46
61
|
|
|
47
62
|
[`uv`]: https://github.com/astral-sh/uv
|
|
48
63
|
|
|
64
|
+
### Install with `pipx`
|
|
65
|
+
|
|
66
|
+
If you prefer to use `pipx`:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
pipx install git-copilot-commit
|
|
70
|
+
```
|
|
71
|
+
|
|
49
72
|
## Prerequisites
|
|
50
73
|
|
|
51
74
|
- Active GitHub Copilot subscription
|
|
@@ -54,17 +77,23 @@ uvx git-copilot-commit --help
|
|
|
54
77
|
|
|
55
78
|
1. Authenticate with GitHub Copilot:
|
|
56
79
|
|
|
57
|
-
```bash
|
|
58
|
-
git-copilot-commit authenticate
|
|
59
|
-
```
|
|
80
|
+
```bash
|
|
81
|
+
git-copilot-commit authenticate
|
|
82
|
+
```
|
|
60
83
|
|
|
61
84
|
2. Make changes in your repository.
|
|
62
85
|
|
|
63
86
|
3. Generate and commit:
|
|
64
87
|
|
|
65
|
-
```bash
|
|
66
|
-
git-copilot-commit commit
|
|
67
|
-
```
|
|
88
|
+
```bash
|
|
89
|
+
git-copilot-commit commit
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
4. Or, if you want to stage all files before committing use:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
git-copilot-commit commit --all
|
|
96
|
+
```
|
|
68
97
|
|
|
69
98
|
## Usage
|
|
70
99
|
|
|
@@ -153,7 +182,7 @@ git-copilot-commit commit --model claude-3.5-sonnet
|
|
|
153
182
|
|
|
154
183
|
Follows [Conventional Commits](https://www.conventionalcommits.org/):
|
|
155
184
|
|
|
156
|
-
```
|
|
185
|
+
```plaintext
|
|
157
186
|
<type>[optional scope]: <description>
|
|
158
187
|
```
|
|
159
188
|
|
|
@@ -175,7 +204,7 @@ Add a git alias by adding the following to your `~/.gitconfig`:
|
|
|
175
204
|
|
|
176
205
|
```ini
|
|
177
206
|
[alias]
|
|
178
|
-
ai-commit = "!f() { git-copilot-commit commit $@; }; f"
|
|
207
|
+
ai-commit = "!f() { uvx git-copilot-commit commit $@; }; f"
|
|
179
208
|
```
|
|
180
209
|
|
|
181
210
|
Now you can run:
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
AI-powered Git commit assistant that generates conventional commit messages using GitHub Copilot.
|
|
4
4
|
|
|
5
|
-

|
|
5
|
+

|
|
6
6
|
|
|
7
7
|
## Features
|
|
8
8
|
|
|
@@ -13,26 +13,49 @@ AI-powered Git commit assistant that generates conventional commit messages usin
|
|
|
13
13
|
|
|
14
14
|
## Installation
|
|
15
15
|
|
|
16
|
-
Install
|
|
16
|
+
### Install the tool using [`uv`] (recommended)
|
|
17
|
+
|
|
18
|
+
Install [`uv`]:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# On macOS and Linux.
|
|
22
|
+
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
23
|
+
|
|
24
|
+
# On Windows.
|
|
25
|
+
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Then install `git-copilot-commit`:
|
|
17
29
|
|
|
18
30
|
```bash
|
|
31
|
+
# Install into isolated environment.
|
|
19
32
|
uv tool install git-copilot-commit
|
|
20
33
|
```
|
|
21
34
|
|
|
22
|
-
|
|
35
|
+
Run the tool using:
|
|
23
36
|
|
|
24
37
|
```bash
|
|
25
|
-
|
|
38
|
+
git-copilot-commit --help
|
|
26
39
|
```
|
|
27
40
|
|
|
28
|
-
|
|
41
|
+
Alternatively, you can always install and run the latest version of tool directly in one command by
|
|
42
|
+
using:
|
|
29
43
|
|
|
30
44
|
```bash
|
|
45
|
+
# Install latest version into temporary environment and run
|
|
31
46
|
uvx git-copilot-commit --help
|
|
32
47
|
```
|
|
33
48
|
|
|
34
49
|
[`uv`]: https://github.com/astral-sh/uv
|
|
35
50
|
|
|
51
|
+
### Install with `pipx`
|
|
52
|
+
|
|
53
|
+
If you prefer to use `pipx`:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
pipx install git-copilot-commit
|
|
57
|
+
```
|
|
58
|
+
|
|
36
59
|
## Prerequisites
|
|
37
60
|
|
|
38
61
|
- Active GitHub Copilot subscription
|
|
@@ -41,17 +64,23 @@ uvx git-copilot-commit --help
|
|
|
41
64
|
|
|
42
65
|
1. Authenticate with GitHub Copilot:
|
|
43
66
|
|
|
44
|
-
```bash
|
|
45
|
-
git-copilot-commit authenticate
|
|
46
|
-
```
|
|
67
|
+
```bash
|
|
68
|
+
git-copilot-commit authenticate
|
|
69
|
+
```
|
|
47
70
|
|
|
48
71
|
2. Make changes in your repository.
|
|
49
72
|
|
|
50
73
|
3. Generate and commit:
|
|
51
74
|
|
|
52
|
-
```bash
|
|
53
|
-
git-copilot-commit commit
|
|
54
|
-
```
|
|
75
|
+
```bash
|
|
76
|
+
git-copilot-commit commit
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
4. Or, if you want to stage all files before committing use:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
git-copilot-commit commit --all
|
|
83
|
+
```
|
|
55
84
|
|
|
56
85
|
## Usage
|
|
57
86
|
|
|
@@ -140,7 +169,7 @@ git-copilot-commit commit --model claude-3.5-sonnet
|
|
|
140
169
|
|
|
141
170
|
Follows [Conventional Commits](https://www.conventionalcommits.org/):
|
|
142
171
|
|
|
143
|
-
```
|
|
172
|
+
```plaintext
|
|
144
173
|
<type>[optional scope]: <description>
|
|
145
174
|
```
|
|
146
175
|
|
|
@@ -162,7 +191,7 @@ Add a git alias by adding the following to your `~/.gitconfig`:
|
|
|
162
191
|
|
|
163
192
|
```ini
|
|
164
193
|
[alias]
|
|
165
|
-
ai-commit = "!f() { git-copilot-commit commit $@; }; f"
|
|
194
|
+
ai-commit = "!f() { uvx git-copilot-commit commit $@; }; f"
|
|
166
195
|
```
|
|
167
196
|
|
|
168
197
|
Now you can run:
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "git-copilot-commit"
|
|
3
|
+
dynamic = ["version"]
|
|
4
|
+
description = "Automatically generate and commit changes using copilot"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
authors = [
|
|
7
|
+
{ name = "Dheepak Krishnamurthy", email = "1813121+kdheepak@users.noreply.github.com" },
|
|
8
|
+
]
|
|
9
|
+
requires-python = ">=3.12"
|
|
10
|
+
dependencies = [
|
|
11
|
+
"pycopilot>=0.1.6",
|
|
12
|
+
"rich>=14.0.0",
|
|
13
|
+
"typer>=0.16.0",
|
|
14
|
+
"platformdirs>=4.0.0",
|
|
15
|
+
]
|
|
16
|
+
|
|
17
|
+
[project.scripts]
|
|
18
|
+
git-copilot-commit = "git_copilot_commit.cli:app"
|
|
19
|
+
|
|
20
|
+
[build-system]
|
|
21
|
+
requires = ["hatchling", "versioningit"]
|
|
22
|
+
build-backend = "hatchling.build"
|
|
23
|
+
|
|
24
|
+
[tool.hatch.version]
|
|
25
|
+
source = "versioningit"
|
|
26
|
+
|
|
27
|
+
[tool.versioningit.next-version]
|
|
28
|
+
method = "smallest"
|
|
29
|
+
|
|
30
|
+
[tool.versioningit.format]
|
|
31
|
+
distance = "{next_version}.dev{distance}+{vcs}{rev}"
|
|
32
|
+
# Example formatted version: 1.2.4.dev42+ge174a1f
|
|
33
|
+
|
|
34
|
+
dirty = "{base_version}+d{build_date:%Y%m%d}"
|
|
35
|
+
# Example formatted version: 1.2.3+d20230922
|
|
36
|
+
|
|
37
|
+
distance-dirty = "{next_version}.dev{distance}+{vcs}{rev}.d{build_date:%Y%m%d}"
|
|
38
|
+
# Example formatted version: 1.2.4.dev42+ge174a1f.d20230922
|
|
39
|
+
|
|
40
|
+
[tool.versioningit.fallback]
|
|
41
|
+
version = "0.1.0.dev0"
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
[project]
|
|
2
|
-
name = "git-copilot-commit"
|
|
3
|
-
version = "0.1.10"
|
|
4
|
-
description = "Automatically generate and commit changes using copilot"
|
|
5
|
-
readme = "README.md"
|
|
6
|
-
authors = [
|
|
7
|
-
{ name = "Dheepak Krishnamurthy", email = "1813121+kdheepak@users.noreply.github.com" },
|
|
8
|
-
]
|
|
9
|
-
requires-python = ">=3.12"
|
|
10
|
-
dependencies = [
|
|
11
|
-
"pycopilot>=0.1.6",
|
|
12
|
-
"rich>=14.0.0",
|
|
13
|
-
"typer>=0.16.0",
|
|
14
|
-
"platformdirs>=4.0.0",
|
|
15
|
-
]
|
|
16
|
-
|
|
17
|
-
[project.scripts]
|
|
18
|
-
git-copilot-commit = "git_copilot_commit.cli:app"
|
|
19
|
-
|
|
20
|
-
[build-system]
|
|
21
|
-
requires = ["hatchling"]
|
|
22
|
-
build-backend = "hatchling.build"
|
|
23
|
-
|
|
24
|
-
[tool.semantic_release]
|
|
25
|
-
assets = []
|
|
26
|
-
build_command_env = []
|
|
27
|
-
commit_message = "{version}\n\nAutomatically generated by python-semantic-release"
|
|
28
|
-
commit_parser = "conventional"
|
|
29
|
-
logging_use_named_masks = false
|
|
30
|
-
major_on_zero = true
|
|
31
|
-
allow_zero_version = false
|
|
32
|
-
repo_dir = "."
|
|
33
|
-
no_git_verify = false
|
|
34
|
-
tag_format = "v{version}"
|
|
35
|
-
version_toml = ["pyproject.toml:project.version"]
|
|
36
|
-
|
|
37
|
-
[tool.semantic_release.branches.main]
|
|
38
|
-
match = "(main|master)"
|
|
39
|
-
prerelease_token = "rc"
|
|
40
|
-
prerelease = false
|
|
41
|
-
|
|
42
|
-
[tool.semantic_release.changelog]
|
|
43
|
-
changelog_file = ""
|
|
44
|
-
exclude_commit_patterns = []
|
|
45
|
-
mode = "update"
|
|
46
|
-
insertion_flag = "<!-- version list -->"
|
|
47
|
-
template_dir = "templates"
|
|
48
|
-
|
|
49
|
-
[tool.semantic_release.changelog.default_templates]
|
|
50
|
-
changelog_file = "CHANGELOG.md"
|
|
51
|
-
output_format = "md"
|
|
52
|
-
mask_initial_release = true
|
|
53
|
-
|
|
54
|
-
[tool.semantic_release.changelog.environment]
|
|
55
|
-
block_start_string = "{%"
|
|
56
|
-
block_end_string = "%}"
|
|
57
|
-
variable_start_string = "{{"
|
|
58
|
-
variable_end_string = "}}"
|
|
59
|
-
comment_start_string = "{#"
|
|
60
|
-
comment_end_string = "#}"
|
|
61
|
-
trim_blocks = false
|
|
62
|
-
lstrip_blocks = false
|
|
63
|
-
newline_sequence = "\n"
|
|
64
|
-
keep_trailing_newline = false
|
|
65
|
-
extensions = []
|
|
66
|
-
autoescape = false
|
|
67
|
-
|
|
68
|
-
[tool.semantic_release.commit_author]
|
|
69
|
-
env = "GIT_COMMIT_AUTHOR"
|
|
70
|
-
default = "semantic-release <semantic-release>"
|
|
71
|
-
|
|
72
|
-
[tool.semantic_release.commit_parser_options]
|
|
73
|
-
minor_tags = ["feat"]
|
|
74
|
-
patch_tags = ["fix", "perf"]
|
|
75
|
-
other_allowed_tags = [
|
|
76
|
-
"build",
|
|
77
|
-
"chore",
|
|
78
|
-
"ci",
|
|
79
|
-
"docs",
|
|
80
|
-
"style",
|
|
81
|
-
"refactor",
|
|
82
|
-
"test",
|
|
83
|
-
]
|
|
84
|
-
allowed_tags = [
|
|
85
|
-
"feat",
|
|
86
|
-
"fix",
|
|
87
|
-
"perf",
|
|
88
|
-
"build",
|
|
89
|
-
"chore",
|
|
90
|
-
"ci",
|
|
91
|
-
"docs",
|
|
92
|
-
"style",
|
|
93
|
-
"refactor",
|
|
94
|
-
"test",
|
|
95
|
-
]
|
|
96
|
-
default_bump_level = 0
|
|
97
|
-
parse_squash_commits = true
|
|
98
|
-
ignore_merge_commits = true
|
|
99
|
-
|
|
100
|
-
[tool.semantic_release.remote]
|
|
101
|
-
name = "origin"
|
|
102
|
-
type = "github"
|
|
103
|
-
ignore_token_for_push = false
|
|
104
|
-
insecure = false
|
|
105
|
-
|
|
106
|
-
[tool.semantic_release.publish]
|
|
107
|
-
dist_glob_patterns = ["dist/*"]
|
|
108
|
-
upload_to_vcs_release = true
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import subprocess
|
|
2
|
-
import shlex
|
|
3
|
-
from importlib import metadata
|
|
4
|
-
import os
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
DIR = os.path.dirname(os.path.realpath(__file__))
|
|
8
|
-
|
|
9
|
-
VERSION = metadata.version(__package__ or "git-copilot-commit")
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
def cmd(cmd, kind="") -> str:
|
|
13
|
-
"""
|
|
14
|
-
Get git subprocess output
|
|
15
|
-
"""
|
|
16
|
-
output = "unknown"
|
|
17
|
-
try:
|
|
18
|
-
output = (
|
|
19
|
-
subprocess.check_output(shlex.split(cmd), cwd=DIR, stderr=subprocess.STDOUT)
|
|
20
|
-
.decode()
|
|
21
|
-
.strip()
|
|
22
|
-
)
|
|
23
|
-
except Exception as _:
|
|
24
|
-
...
|
|
25
|
-
return f"{kind}{output}"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
def last_commit_id() -> str:
|
|
29
|
-
return cmd("git describe --always --dirty --abbrev=7")
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
def branch() -> str:
|
|
33
|
-
return cmd("git rev-parse --abbrev-ref HEAD")
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
def get_git_version() -> str:
|
|
37
|
-
return f"{last_commit_id()}-{branch()}"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
__version__ = f"v{VERSION}-{get_git_version()}"
|
|
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
|