git-copilot-commit 0.4.5__tar.gz → 0.5.0__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.
Files changed (29) hide show
  1. git_copilot_commit-0.5.0/.github/dependabot.yml +18 -0
  2. {git_copilot_commit-0.4.5 → git_copilot_commit-0.5.0}/.github/workflows/ci.yml +11 -7
  3. {git_copilot_commit-0.4.5 → git_copilot_commit-0.5.0}/PKG-INFO +17 -2
  4. {git_copilot_commit-0.4.5 → git_copilot_commit-0.5.0}/README.md +14 -0
  5. {git_copilot_commit-0.4.5 → git_copilot_commit-0.5.0}/pyproject.toml +10 -2
  6. git_copilot_commit-0.5.0/src/git_copilot_commit/cli.py +1004 -0
  7. {git_copilot_commit-0.4.5 → git_copilot_commit-0.5.0}/src/git_copilot_commit/git.py +144 -21
  8. {git_copilot_commit-0.4.5 → git_copilot_commit-0.5.0}/src/git_copilot_commit/github_copilot.py +282 -42
  9. {git_copilot_commit-0.4.5 → git_copilot_commit-0.5.0}/src/git_copilot_commit/prompts/commit-message-generator-prompt.md +2 -0
  10. git_copilot_commit-0.5.0/src/git_copilot_commit/prompts/split-commit-planner-prompt.md +41 -0
  11. {git_copilot_commit-0.4.5 → git_copilot_commit-0.5.0}/src/git_copilot_commit/settings.py +21 -0
  12. git_copilot_commit-0.5.0/src/git_copilot_commit/split_commits.py +503 -0
  13. git_copilot_commit-0.5.0/tests/conftest.py +31 -0
  14. git_copilot_commit-0.5.0/tests/test_cli.py +801 -0
  15. git_copilot_commit-0.5.0/tests/test_git.py +141 -0
  16. git_copilot_commit-0.5.0/tests/test_github_copilot_utils.py +345 -0
  17. git_copilot_commit-0.5.0/tests/test_settings.py +110 -0
  18. git_copilot_commit-0.5.0/tests/test_split_commits.py +379 -0
  19. git_copilot_commit-0.5.0/uv.lock +331 -0
  20. git_copilot_commit-0.4.5/src/git_copilot_commit/cli.py +0 -306
  21. git_copilot_commit-0.4.5/uv.lock +0 -205
  22. {git_copilot_commit-0.4.5 → git_copilot_commit-0.5.0}/.gitignore +0 -0
  23. {git_copilot_commit-0.4.5 → git_copilot_commit-0.5.0}/.justfile +0 -0
  24. {git_copilot_commit-0.4.5 → git_copilot_commit-0.5.0}/.python-version +0 -0
  25. {git_copilot_commit-0.4.5 → git_copilot_commit-0.5.0}/LICENSE +0 -0
  26. {git_copilot_commit-0.4.5 → git_copilot_commit-0.5.0}/src/git_copilot_commit/__init__.py +0 -0
  27. {git_copilot_commit-0.4.5 → git_copilot_commit-0.5.0}/src/git_copilot_commit/py.typed +0 -0
  28. {git_copilot_commit-0.4.5 → git_copilot_commit-0.5.0}/src/git_copilot_commit/version.py +0 -0
  29. {git_copilot_commit-0.4.5 → git_copilot_commit-0.5.0}/vhs/demo.vhs +0 -0
@@ -0,0 +1,18 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "github-actions"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "weekly"
7
+ groups:
8
+ github-actions:
9
+ patterns:
10
+ - "*"
11
+ - package-ecosystem: "uv"
12
+ directory: "/"
13
+ schedule:
14
+ interval: "weekly"
15
+ groups:
16
+ uv-dependencies:
17
+ patterns:
18
+ - "*"
@@ -12,31 +12,35 @@ jobs:
12
12
  test:
13
13
  runs-on: ubuntu-latest
14
14
  steps:
15
- - uses: actions/checkout@v4
15
+ - uses: actions/checkout@v6
16
16
  with:
17
17
  fetch-depth: 0 # Fetch full history
18
18
  fetch-tags: true # Fetch all tags
19
19
 
20
20
  - name: Install uv
21
- uses: astral-sh/setup-uv@v6
21
+ uses: astral-sh/setup-uv@v7
22
22
 
23
23
  - name: Install the project
24
- run: uv sync --locked --all-extras --dev
24
+ run: uv sync --locked --all-extras --group dev
25
25
 
26
26
  - name: Run linting
27
- run: uvx ruff check
27
+ run: uv run --group dev ruff check
28
28
 
29
29
  - name: Run type checking
30
- run: uvx ty check
30
+ run: uv run --group dev ty check
31
+
32
+ - name: Run tests
33
+ run: uv run --group dev pytest
31
34
 
32
35
  publish:
33
36
  if: github.event_name == 'release' && github.event.action == 'published'
37
+ needs: test
34
38
  runs-on: ubuntu-latest
35
39
  steps:
36
- - uses: actions/checkout@v4
40
+ - uses: actions/checkout@v6
37
41
 
38
42
  - name: Install uv
39
- uses: astral-sh/setup-uv@v6
43
+ uses: astral-sh/setup-uv@v7
40
44
 
41
45
  - name: Install the project
42
46
  run: uv sync --locked --all-extras --dev
@@ -1,13 +1,14 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: git-copilot-commit
3
- Version: 0.4.5
4
- Summary: Automatically generate and commit changes using copilot
3
+ Version: 0.5.0
4
+ Summary: Automatically generate and commit changes using GitHub Copilot
5
5
  Author-email: Dheepak Krishnamurthy <1813121+kdheepak@users.noreply.github.com>
6
6
  License-File: LICENSE
7
7
  Requires-Python: >=3.12
8
8
  Requires-Dist: httpx>=0.28.0
9
9
  Requires-Dist: platformdirs>=4.0.0
10
10
  Requires-Dist: rich>=14.0.0
11
+ Requires-Dist: truststore>=0.10.4
11
12
  Requires-Dist: typer>=0.16.0
12
13
  Description-Content-Type: text/markdown
13
14
 
@@ -105,6 +106,8 @@ Usage: git-copilot-commit commit [OPTIONS]
105
106
 
106
107
  Options:
107
108
  -a, --all Stage all files before committing
109
+ --split Split staged hunks into multiple commits. Use
110
+ `--split=N` to prefer up to N commits.
108
111
  -m, --model TEXT Model to use for generating commit message
109
112
  -y, --yes Automatically accept the generated commit message
110
113
  --help Show this message and exit.
@@ -130,6 +133,18 @@ Use a specific model:
130
133
  uvx git-copilot-commit commit --model claude-3.5-sonnet
131
134
  ```
132
135
 
136
+ Split staged hunks into separate commits:
137
+
138
+ ```bash
139
+ uvx git-copilot-commit commit --split
140
+ ```
141
+
142
+ Prefer up to two commits:
143
+
144
+ ```bash
145
+ uvx git-copilot-commit commit --split 2
146
+ ```
147
+
133
148
  ## Commit Message Format
134
149
 
135
150
  Follows [Conventional Commits](https://www.conventionalcommits.org/):
@@ -92,6 +92,8 @@ Usage: git-copilot-commit commit [OPTIONS]
92
92
 
93
93
  Options:
94
94
  -a, --all Stage all files before committing
95
+ --split Split staged hunks into multiple commits. Use
96
+ `--split=N` to prefer up to N commits.
95
97
  -m, --model TEXT Model to use for generating commit message
96
98
  -y, --yes Automatically accept the generated commit message
97
99
  --help Show this message and exit.
@@ -117,6 +119,18 @@ Use a specific model:
117
119
  uvx git-copilot-commit commit --model claude-3.5-sonnet
118
120
  ```
119
121
 
122
+ Split staged hunks into separate commits:
123
+
124
+ ```bash
125
+ uvx git-copilot-commit commit --split
126
+ ```
127
+
128
+ Prefer up to two commits:
129
+
130
+ ```bash
131
+ uvx git-copilot-commit commit --split 2
132
+ ```
133
+
120
134
  ## Commit Message Format
121
135
 
122
136
  Follows [Conventional Commits](https://www.conventionalcommits.org/):
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  name = "git-copilot-commit"
3
3
  dynamic = ["version"]
4
- description = "Automatically generate and commit changes using copilot"
4
+ description = "Automatically generate and commit changes using GitHub Copilot"
5
5
  readme = "README.md"
6
6
  authors = [
7
7
  { name = "Dheepak Krishnamurthy", email = "1813121+kdheepak@users.noreply.github.com" },
@@ -12,10 +12,11 @@ dependencies = [
12
12
  "rich>=14.0.0",
13
13
  "typer>=0.16.0",
14
14
  "platformdirs>=4.0.0",
15
+ "truststore>=0.10.4",
15
16
  ]
16
17
 
17
18
  [project.scripts]
18
- git-copilot-commit = "git_copilot_commit.cli:app"
19
+ git-copilot-commit = "git_copilot_commit.cli:run"
19
20
 
20
21
  [build-system]
21
22
  requires = ["hatchling", "versioningit"]
@@ -41,6 +42,13 @@ dirty = "{base_version}+d{build_date:%Y%m%d}"
41
42
  # Example formatted version: 1.2.3+d20230922
42
43
 
43
44
  distance-dirty = "{next_version}.dev{distance}+{vcs}{rev}.d{build_date:%Y%m%d}"
45
+
46
+ [dependency-groups]
47
+ dev = [
48
+ "pytest>=9.0.2",
49
+ "ruff>=0.13.0",
50
+ "ty>=0.0.1a17",
51
+ ]
44
52
  # Example formatted version: 1.2.4.dev42+ge174a1f.d20230922
45
53
 
46
54
  [tool.versioningit]