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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a2078d9c3a8dc4b4369906cf4e571f83039e2eaac0777501188abce7073a7f60
4
- data.tar.gz: b317be95bf26241f74339735ca35384fc22538795d183cc1d227c90aeac43b3a
3
+ metadata.gz: e896aa146231012d512a5aca32441fdab90c0fcadd29804037d24fd11ab89104
4
+ data.tar.gz: 77f212531f8f9b1c8196f1187b1184d2df5a45f37d5b467ff049a46b5c8b05e9
5
5
  SHA512:
6
- metadata.gz: d67ad9836c1ea99985e482c5a2df5da873d4e2e32d2c7b691ec0fda75c0d4b21894d376bc4b5ed99ff6e6e9b64b1d1ae5b131a440496283570933217dfdd51a4
7
- data.tar.gz: 7b7651c024ce9dc14412f14701c6bdba8ef917045dcfa3618d31f13eeb77f47728018608e732cb69ad165dead5390558883ad92f14e61c560f3b26b1f7100568
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.3)
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.7.6)
14
- faraday-net_http (>= 2.0, < 3.1)
15
- ruby2_keywords (>= 0.0.4)
16
- faraday-multipart (1.0.4)
17
- multipart-post (~> 2)
18
- faraday-net_http (3.0.2)
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
- multipart-post (2.3.0)
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.1.0)
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 short messages. If you like longer or multiline messages, you can adjust your prompt (see Advanced Configuration below).
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
  ```
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Git
4
4
  module Gpt
5
- VERSION = "0.0.5"
5
+ VERSION = "0.0.7"
6
6
  end
7
7
  end
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(".git-gpt-config.yml") if config_filename
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.exists?(path) }
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.5
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: 2023-06-09 00:00:00.000000000 Z
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.7
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