git-gpt 0.0.5 → 0.0.7
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.
- checksums.yaml +4 -4
- data/.ruby-version +1 -0
- data/Gemfile.lock +16 -10
- data/README.md +7 -5
- data/lib/git/gpt/version.rb +1 -1
- data/lib/git/gpt.rb +5 -5
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e896aa146231012d512a5aca32441fdab90c0fcadd29804037d24fd11ab89104
|
4
|
+
data.tar.gz: 77f212531f8f9b1c8196f1187b1184d2df5a45f37d5b467ff049a46b5c8b05e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a91d0ab6547bef99d6ef61d768037d6f2a6a25188eeeb87c7eb4eb38e60fc09b4c7c01183900a956350c8a4eb8134718e091068a942dde1e8d6e7d09251b393b
|
7
|
+
data.tar.gz: 98edb68bca08c62f7d599aee16e84cea10d87e6e2ab72fe16d8bfcbe1c59841f054fc2ca941f371846aa577d7e5df5e5a66ce468926931da0da1ce18e3ca9676
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.3.0
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
git-gpt (0.0.
|
4
|
+
git-gpt (0.0.6)
|
5
5
|
json
|
6
6
|
ruby-openai (~> 4.0)
|
7
7
|
|
@@ -10,16 +10,21 @@ GEM
|
|
10
10
|
specs:
|
11
11
|
ast (2.4.2)
|
12
12
|
diff-lcs (1.5.0)
|
13
|
-
faraday (2.
|
14
|
-
faraday-net_http (>= 2.0, < 3.
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
13
|
+
faraday (2.12.2)
|
14
|
+
faraday-net_http (>= 2.0, < 3.5)
|
15
|
+
json
|
16
|
+
logger
|
17
|
+
faraday-multipart (1.1.0)
|
18
|
+
multipart-post (~> 2.0)
|
19
|
+
faraday-net_http (3.4.0)
|
20
|
+
net-http (>= 0.5.0)
|
19
21
|
json (2.6.3)
|
20
22
|
language_server-protocol (3.17.0.3)
|
21
23
|
lint_roller (1.0.0)
|
22
|
-
|
24
|
+
logger (1.6.5)
|
25
|
+
multipart-post (2.4.1)
|
26
|
+
net-http (0.6.0)
|
27
|
+
uri
|
23
28
|
parallel (1.23.0)
|
24
29
|
parser (3.2.2.1)
|
25
30
|
ast (~> 2.4.1)
|
@@ -55,11 +60,10 @@ GEM
|
|
55
60
|
rubocop-performance (1.18.0)
|
56
61
|
rubocop (>= 1.7.0, < 2.0)
|
57
62
|
rubocop-ast (>= 0.4.0)
|
58
|
-
ruby-openai (4.
|
63
|
+
ruby-openai (4.3.2)
|
59
64
|
faraday (>= 1)
|
60
65
|
faraday-multipart (>= 1)
|
61
66
|
ruby-progressbar (1.13.0)
|
62
|
-
ruby2_keywords (0.0.5)
|
63
67
|
standard (1.29.0)
|
64
68
|
language_server-protocol (~> 3.17.0.2)
|
65
69
|
lint_roller (~> 1.0)
|
@@ -72,9 +76,11 @@ GEM
|
|
72
76
|
lint_roller (~> 1.0)
|
73
77
|
rubocop-performance (~> 1.18.0)
|
74
78
|
unicode-display_width (2.4.2)
|
79
|
+
uri (1.0.2)
|
75
80
|
|
76
81
|
PLATFORMS
|
77
82
|
arm64-darwin-21
|
83
|
+
arm64-darwin-24
|
78
84
|
|
79
85
|
DEPENDENCIES
|
80
86
|
git-gpt!
|
data/README.md
CHANGED
@@ -35,7 +35,11 @@ In the above example, `file1`, `file2`, and `file3` are placeholders for the fil
|
|
35
35
|
|
36
36
|
`git gpt` does not actually commit your code, it simply prints a commit message that you can choose to use or not. If you run it multiple times, you will likely get different results.
|
37
37
|
|
38
|
-
By default it asks ChatGPT to create
|
38
|
+
By default it asks ChatGPT to create longer messages with bullet points for each file with significant changes. I recommend setting `GIT_EDITOR=vim` and pasting your commit messages into the editor. If you like shorter or single line messages, you can adjust your prompt to something like the following (see Advanced Configuration below):
|
39
|
+
|
40
|
+
```
|
41
|
+
Please write a commit message for this change. The commit message should be a single sentence. The commit message should start with a capital letter. The commit message should end with a period. The commit message should be 50 characters or less.
|
42
|
+
```
|
39
43
|
|
40
44
|
## Basic Configuration
|
41
45
|
|
@@ -54,14 +58,12 @@ prompt: >
|
|
54
58
|
You are a software engineer working on a project. You write diligent and detailed commit messages. You are working on a new feature and you are ready to commit your changes.
|
55
59
|
|
56
60
|
The current git status is:
|
57
|
-
|
61
|
+
|
58
62
|
$GIT_STATUS
|
59
|
-
\```
|
60
63
|
|
61
64
|
The current git diff is:
|
62
|
-
|
65
|
+
|
63
66
|
$GIT_DIFF
|
64
|
-
\```
|
65
67
|
|
66
68
|
Please write a commit message for this change. Format the commit message using markdown. You may use bullet points. Please comment specifically on any files with significant changes.
|
67
69
|
```
|
data/lib/git/gpt/version.rb
CHANGED
data/lib/git/gpt.rb
CHANGED
@@ -24,15 +24,15 @@ $GIT_DIFF
|
|
24
24
|
Please write a commit message for this change. Format the commit message using markdown. You may use bullet points. Please comment specifically on any files with significant changes.
|
25
25
|
EOS
|
26
26
|
|
27
|
-
config = {
|
28
|
-
"model" => "gpt-3.5-turbo",
|
29
|
-
"temperature" => 0.7,
|
27
|
+
config = {
|
28
|
+
"model" => "gpt-3.5-turbo",
|
29
|
+
"temperature" => 0.7,
|
30
30
|
"prompt" => prompt,
|
31
31
|
"openai_api_key" => ENV["OPENAI_API_KEY"],
|
32
32
|
"openai_organization_id" => ENV["OPENAI_ORGANIZATION_ID"]
|
33
33
|
}
|
34
34
|
config_filename = find_file(".git-gpt-config.yml")
|
35
|
-
config_file = YAML.load_file(
|
35
|
+
config_file = YAML.load_file(config_filename) if config_filename
|
36
36
|
config.merge!(config_file) if config_file
|
37
37
|
|
38
38
|
if config["openai_api_key"].nil?
|
@@ -66,7 +66,7 @@ EOS
|
|
66
66
|
paths << [path, filename].join(File::SEPARATOR)
|
67
67
|
end
|
68
68
|
paths << [ENV["HOME"], filename].join(File::SEPARATOR) if ENV["HOME"]
|
69
|
-
result = paths.detect { |path| File.
|
69
|
+
result = paths.detect { |path| File.exist?(path) }
|
70
70
|
result
|
71
71
|
end
|
72
72
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-gpt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Petersen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -47,6 +47,7 @@ extensions: []
|
|
47
47
|
extra_rdoc_files: []
|
48
48
|
files:
|
49
49
|
- ".rspec"
|
50
|
+
- ".ruby-version"
|
50
51
|
- ".standard.yml"
|
51
52
|
- CODE_OF_CONDUCT.md
|
52
53
|
- Gemfile
|
@@ -82,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
82
83
|
- !ruby/object:Gem::Version
|
83
84
|
version: '0'
|
84
85
|
requirements: []
|
85
|
-
rubygems_version: 3.3
|
86
|
+
rubygems_version: 3.5.3
|
86
87
|
signing_key:
|
87
88
|
specification_version: 4
|
88
89
|
summary: Use ChatGPT to write your commit messages
|