git-copilot-commit 0.2.1__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.
@@ -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"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: git-copilot-commit
3
- Version: 0.2.1
3
+ Version: 0.2.2
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
@@ -120,7 +120,7 @@ def generate_commit_message(
120
120
  client.reset()
121
121
  response = client.ask(prompt, model=model) if model else client.ask(prompt)
122
122
  return response.content
123
- except CopilotAPIError:
123
+ except Exception as _:
124
124
  fallback_prompt_parts = [
125
125
  "`git status`:\n",
126
126
  f"```\n{status.get_porcelain_output()}\n```",
@@ -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"