git-copilot-commit 0.2.0__tar.gz → 0.2.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.
- git_copilot_commit-0.2.2/.justfile +59 -0
- {git_copilot_commit-0.2.0 → git_copilot_commit-0.2.2}/PKG-INFO +1 -1
- {git_copilot_commit-0.2.0 → git_copilot_commit-0.2.2}/src/git_copilot_commit/cli.py +3 -1
- git_copilot_commit-0.2.0/.justfile +0 -56
- {git_copilot_commit-0.2.0 → git_copilot_commit-0.2.2}/.github/workflows/ci.yml +0 -0
- {git_copilot_commit-0.2.0 → git_copilot_commit-0.2.2}/.gitignore +0 -0
- {git_copilot_commit-0.2.0 → git_copilot_commit-0.2.2}/.python-version +0 -0
- {git_copilot_commit-0.2.0 → git_copilot_commit-0.2.2}/LICENSE +0 -0
- {git_copilot_commit-0.2.0 → git_copilot_commit-0.2.2}/README.md +0 -0
- {git_copilot_commit-0.2.0 → git_copilot_commit-0.2.2}/pyproject.toml +0 -0
- {git_copilot_commit-0.2.0 → git_copilot_commit-0.2.2}/src/git_copilot_commit/__init__.py +0 -0
- {git_copilot_commit-0.2.0 → git_copilot_commit-0.2.2}/src/git_copilot_commit/git.py +0 -0
- {git_copilot_commit-0.2.0 → git_copilot_commit-0.2.2}/src/git_copilot_commit/prompts/commit-message-generator-prompt.md +0 -0
- {git_copilot_commit-0.2.0 → git_copilot_commit-0.2.2}/src/git_copilot_commit/py.typed +0 -0
- {git_copilot_commit-0.2.0 → git_copilot_commit-0.2.2}/src/git_copilot_commit/settings.py +0 -0
- {git_copilot_commit-0.2.0 → git_copilot_commit-0.2.2}/src/git_copilot_commit/version.py +0 -0
- {git_copilot_commit-0.2.0 → git_copilot_commit-0.2.2}/uv.lock +0 -0
- {git_copilot_commit-0.2.0 → git_copilot_commit-0.2.2}/vhs/demo.vhs +0 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# List available commands
|
|
2
|
+
[private]
|
|
3
|
+
default:
|
|
4
|
+
@just --list
|
|
5
|
+
|
|
6
|
+
# Pass all arguments directly to git-copilot-commit
|
|
7
|
+
commit *args:
|
|
8
|
+
uv run git-copilot-commit commit {{args}}
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# Get the next version based on bump type
|
|
12
|
+
next-version type="patch":
|
|
13
|
+
#!/usr/bin/env bash
|
|
14
|
+
set -euo pipefail
|
|
15
|
+
|
|
16
|
+
latest_tag=$(gh release list --limit 1 --json tagName --jq '.[0].tagName // "v0.0.0"')
|
|
17
|
+
version=${latest_tag#v}
|
|
18
|
+
IFS='.' read -r major minor patch <<< "$version"
|
|
19
|
+
|
|
20
|
+
case "{{type}}" in
|
|
21
|
+
major)
|
|
22
|
+
major=$((major + 1)); minor=0; patch=0 ;;
|
|
23
|
+
minor)
|
|
24
|
+
minor=$((minor + 1)); patch=0 ;;
|
|
25
|
+
patch)
|
|
26
|
+
patch=$((patch + 1)) ;;
|
|
27
|
+
*)
|
|
28
|
+
echo "Error: Invalid bump type '{{type}}'. Use: major, minor, or patch"; exit 1 ;;
|
|
29
|
+
esac
|
|
30
|
+
|
|
31
|
+
echo "v${major}.${minor}.${patch}"
|
|
32
|
+
|
|
33
|
+
# Bump version and tag it
|
|
34
|
+
bump type="patch":
|
|
35
|
+
#!/usr/bin/env bash
|
|
36
|
+
set -euo pipefail
|
|
37
|
+
|
|
38
|
+
new_version=$(just next-version {{type}})
|
|
39
|
+
echo "New version: $new_version"
|
|
40
|
+
|
|
41
|
+
git commit --allow-empty -m "Bump version to $new_version"
|
|
42
|
+
git tag "$new_version"
|
|
43
|
+
|
|
44
|
+
echo "✓ Created commit and tag for $new_version"
|
|
45
|
+
echo " Run: just release version=$new_version"
|
|
46
|
+
|
|
47
|
+
# Push commit, tag, and create GitHub release
|
|
48
|
+
release version:
|
|
49
|
+
#!/usr/bin/env bash
|
|
50
|
+
set -euo pipefail
|
|
51
|
+
|
|
52
|
+
echo "Pushing commit and tag for $version..."
|
|
53
|
+
git push
|
|
54
|
+
git push origin "$version"
|
|
55
|
+
|
|
56
|
+
echo "Creating GitHub release for $version..."
|
|
57
|
+
gh release create "$version" --title "$version" --generate-notes
|
|
58
|
+
|
|
59
|
+
echo "✓ Release $version created and pushed"
|
|
@@ -117,9 +117,10 @@ def generate_commit_message(
|
|
|
117
117
|
prompt = "\n".join(prompt_parts)
|
|
118
118
|
|
|
119
119
|
try:
|
|
120
|
+
client.reset()
|
|
120
121
|
response = client.ask(prompt, model=model) if model else client.ask(prompt)
|
|
121
122
|
return response.content
|
|
122
|
-
except
|
|
123
|
+
except Exception as _:
|
|
123
124
|
fallback_prompt_parts = [
|
|
124
125
|
"`git status`:\n",
|
|
125
126
|
f"```\n{status.get_porcelain_output()}\n```",
|
|
@@ -136,6 +137,7 @@ def generate_commit_message(
|
|
|
136
137
|
|
|
137
138
|
fallback_prompt = "\n".join(fallback_prompt_parts)
|
|
138
139
|
|
|
140
|
+
client.reset()
|
|
139
141
|
response = (
|
|
140
142
|
client.ask(fallback_prompt, model=model)
|
|
141
143
|
if model
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
# List available commands
|
|
2
|
-
[private]
|
|
3
|
-
default:
|
|
4
|
-
@just --list
|
|
5
|
-
|
|
6
|
-
# Pass all arguments directly to git-copilot-commit
|
|
7
|
-
commit *args:
|
|
8
|
-
uv run git-copilot-commit commit {{args}}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
# Bump version based on GitHub tags and create empty commit
|
|
12
|
-
bump type="patch":
|
|
13
|
-
#!/usr/bin/env bash
|
|
14
|
-
set -euo pipefail
|
|
15
|
-
|
|
16
|
-
# Get the latest tag from GitHub
|
|
17
|
-
echo "Fetching latest tag from GitHub..."
|
|
18
|
-
latest_tag=$(gh release list --limit 1 --json tagName --jq '.[0].tagName // "v0.0.0"')
|
|
19
|
-
|
|
20
|
-
# Remove 'v' prefix if present
|
|
21
|
-
version=${latest_tag#v}
|
|
22
|
-
|
|
23
|
-
# Parse version components
|
|
24
|
-
IFS='.' read -r major minor patch <<< "$version"
|
|
25
|
-
|
|
26
|
-
# Bump based on type
|
|
27
|
-
case "{{type}}" in
|
|
28
|
-
major)
|
|
29
|
-
major=$((major + 1))
|
|
30
|
-
minor=0
|
|
31
|
-
patch=0
|
|
32
|
-
;;
|
|
33
|
-
minor)
|
|
34
|
-
minor=$((minor + 1))
|
|
35
|
-
patch=0
|
|
36
|
-
;;
|
|
37
|
-
patch)
|
|
38
|
-
patch=$((patch + 1))
|
|
39
|
-
;;
|
|
40
|
-
*)
|
|
41
|
-
echo "Error: Invalid bump type '{{type}}'. Use: major, minor, or patch"
|
|
42
|
-
exit 1
|
|
43
|
-
;;
|
|
44
|
-
esac
|
|
45
|
-
|
|
46
|
-
# Create new version
|
|
47
|
-
new_version="v${major}.${minor}.${patch}"
|
|
48
|
-
|
|
49
|
-
echo "Current version: $latest_tag"
|
|
50
|
-
echo "New version: $new_version"
|
|
51
|
-
|
|
52
|
-
# Create empty commit
|
|
53
|
-
git commit --allow-empty -m "Bump version to $new_version"
|
|
54
|
-
|
|
55
|
-
echo "✓ Created empty commit for $new_version"
|
|
56
|
-
echo " Next: Create and push tag with: git tag $new_version && git push && git push --tags"
|
|
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
|
|
File without changes
|