git-copilot-commit 0.1.2__tar.gz → 0.1.4__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,44 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+ release:
9
+ types: [published]
10
+
11
+ jobs:
12
+ test:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+
17
+ - name: Install uv
18
+ uses: astral-sh/setup-uv@v6
19
+
20
+ - name: Install the project
21
+ run: uv sync --locked --all-extras --dev
22
+
23
+ - name: Run linting
24
+ run: uvx ruff check
25
+
26
+ - name: Run type checking
27
+ run: uvx ty check
28
+
29
+ publish:
30
+ if: github.event_name == 'release' && github.event.action == 'published'
31
+ runs-on: ubuntu-latest
32
+ steps:
33
+ - uses: actions/checkout@v4
34
+
35
+ - name: Install uv
36
+ uses: astral-sh/setup-uv@v6
37
+
38
+ - name: Install the project
39
+ run: uv sync --locked --all-extras --dev
40
+
41
+ - name: Build and publish package
42
+ run: |
43
+ uv build
44
+ uv publish --token ${{ secrets.PYPI_TOKEN }}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: git-copilot-commit
3
- Version: 0.1.2
3
+ Version: 0.1.4
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
@@ -45,8 +45,7 @@ pipx install git-copilot-commit
45
45
 
46
46
  ## Prerequisites
47
47
 
48
- 1. **GitHub Copilot Access**: You need an active GitHub Copilot subscription
49
- 2. **Authentication**: Authenticate with GitHub Copilot before first use
48
+ **GitHub Copilot Access**: You need an active GitHub Copilot subscription
50
49
 
51
50
  ## Quick Start
52
51
 
@@ -66,7 +65,7 @@ pipx install git-copilot-commit
66
65
 
67
66
  ## Usage
68
67
 
69
- #### `commit`
68
+ ### `commit`
70
69
 
71
70
  Automatically commit changes in the current git repository:
72
71
 
@@ -88,7 +87,7 @@ git-copilot-commit commit
88
87
  - `(e)dit`: Edit the message in your git-configured editor
89
88
  - `(q)uit`: Cancel the commit
90
89
 
91
- #### `authenticate`
90
+ ### `authenticate`
92
91
 
93
92
  Set up authentication with GitHub Copilot:
94
93
 
@@ -96,7 +95,7 @@ Set up authentication with GitHub Copilot:
96
95
  git-copilot-commit authenticate
97
96
  ```
98
97
 
99
- #### `models`
98
+ ### `models`
100
99
 
101
100
  List available AI models:
102
101
 
@@ -104,7 +103,7 @@ List available AI models:
104
103
  git-copilot-commit models
105
104
  ```
106
105
 
107
- #### `config`
106
+ ### `config`
108
107
 
109
108
  Manage application configuration:
110
109
 
@@ -116,7 +115,7 @@ git-copilot-commit config --show
116
115
  git-copilot-commit config --set-default-model gpt-4o
117
116
  ```
118
117
 
119
- ### Examples
118
+ ## Examples
120
119
 
121
120
  **Commit all changes with staging prompts:**
122
121
 
@@ -175,3 +174,24 @@ The tool follows the [Conventional Commits](https://www.conventionalcommits.org/
175
174
  - `fix(database): handle connection retries properly`
176
175
  - `docs(readme): update installation instructions`
177
176
  - `refactor(utils): simplify date parsing logic`
177
+
178
+ ## Git Configuration
179
+
180
+ For the best experience with git-copilot-commit, consider adding this alias for the commit command:
181
+
182
+ ```bash
183
+ # Add a git alias for quick access
184
+ git config --global alias.ai-commit "!git-copilot-commit commit"
185
+
186
+ # Now you can use:
187
+ git ai-commit
188
+ git ai-commit --model claude-3.5-sonnet
189
+ git ai-commit --all --verbose
190
+ ```
191
+
192
+ You can also configure git to show more context in diffs, which can help when reviewing changes:
193
+
194
+ ```bash
195
+ # Show more context in diffs
196
+ git config --global diff.context 3
197
+ ```
@@ -32,8 +32,7 @@ pipx install git-copilot-commit
32
32
 
33
33
  ## Prerequisites
34
34
 
35
- 1. **GitHub Copilot Access**: You need an active GitHub Copilot subscription
36
- 2. **Authentication**: Authenticate with GitHub Copilot before first use
35
+ **GitHub Copilot Access**: You need an active GitHub Copilot subscription
37
36
 
38
37
  ## Quick Start
39
38
 
@@ -53,7 +52,7 @@ pipx install git-copilot-commit
53
52
 
54
53
  ## Usage
55
54
 
56
- #### `commit`
55
+ ### `commit`
57
56
 
58
57
  Automatically commit changes in the current git repository:
59
58
 
@@ -75,7 +74,7 @@ git-copilot-commit commit
75
74
  - `(e)dit`: Edit the message in your git-configured editor
76
75
  - `(q)uit`: Cancel the commit
77
76
 
78
- #### `authenticate`
77
+ ### `authenticate`
79
78
 
80
79
  Set up authentication with GitHub Copilot:
81
80
 
@@ -83,7 +82,7 @@ Set up authentication with GitHub Copilot:
83
82
  git-copilot-commit authenticate
84
83
  ```
85
84
 
86
- #### `models`
85
+ ### `models`
87
86
 
88
87
  List available AI models:
89
88
 
@@ -91,7 +90,7 @@ List available AI models:
91
90
  git-copilot-commit models
92
91
  ```
93
92
 
94
- #### `config`
93
+ ### `config`
95
94
 
96
95
  Manage application configuration:
97
96
 
@@ -103,7 +102,7 @@ git-copilot-commit config --show
103
102
  git-copilot-commit config --set-default-model gpt-4o
104
103
  ```
105
104
 
106
- ### Examples
105
+ ## Examples
107
106
 
108
107
  **Commit all changes with staging prompts:**
109
108
 
@@ -162,3 +161,24 @@ The tool follows the [Conventional Commits](https://www.conventionalcommits.org/
162
161
  - `fix(database): handle connection retries properly`
163
162
  - `docs(readme): update installation instructions`
164
163
  - `refactor(utils): simplify date parsing logic`
164
+
165
+ ## Git Configuration
166
+
167
+ For the best experience with git-copilot-commit, consider adding this alias for the commit command:
168
+
169
+ ```bash
170
+ # Add a git alias for quick access
171
+ git config --global alias.ai-commit "!git-copilot-commit commit"
172
+
173
+ # Now you can use:
174
+ git ai-commit
175
+ git ai-commit --model claude-3.5-sonnet
176
+ git ai-commit --all --verbose
177
+ ```
178
+
179
+ You can also configure git to show more context in diffs, which can help when reviewing changes:
180
+
181
+ ```bash
182
+ # Show more context in diffs
183
+ git config --global diff.context 3
184
+ ```
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "git-copilot-commit"
3
- version = "0.1.2"
3
+ version = "0.1.4"
4
4
  description = "Automatically generate and commit changes using copilot"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -222,11 +222,15 @@ def commit(
222
222
  console.print(git_status_output.stdout)
223
223
 
224
224
  if status.has_unstaged_changes:
225
- if Confirm.ask("Modified files found. Add all to staging?"):
225
+ if Confirm.ask(
226
+ "Modified files found. Add [bold yellow]all unstaged changes[/] to staging?"
227
+ ):
226
228
  repo.stage_modified()
227
229
  console.print("[green]Staged modified files.[/green]")
228
230
  if status.has_untracked_files:
229
- if Confirm.ask("Untracked files found. Add all to staging?"):
231
+ if Confirm.ask(
232
+ "Untracked files found. Add [bold yellow]all untracked files and unstaged changes[/] to staging?"
233
+ ):
230
234
  repo.stage_files()
231
235
  console.print("[green]Staged untracked files.[/green]")
232
236
 
@@ -1,7 +1,7 @@
1
1
  import subprocess
2
2
  from pathlib import Path
3
3
  from dataclasses import dataclass
4
- from typing import List, Tuple, Optional, Union
4
+ from typing import List, Tuple, Optional
5
5
  from enum import Enum
6
6
 
7
7
 
@@ -78,7 +78,7 @@ wheels = [
78
78
 
79
79
  [[package]]
80
80
  name = "git-copilot-commit"
81
- version = "0.1.2"
81
+ version = "0.1.4"
82
82
  source = { editable = "." }
83
83
  dependencies = [
84
84
  { name = "pycopilot" },