git-gpt 0.0.4 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a6e17d107e9e41f2ee00f0c9011b6e01e9bc08b9363118420e33d6059a70c15f
4
- data.tar.gz: 03c1875348e3e9d754737092ac7d6baaee250d9a024c36207ff5feaf5f9af934
3
+ metadata.gz: b423a415a402ea69f7f3fb3157e49a4b0d489f1c6bc94adb97c5407d58b020a0
4
+ data.tar.gz: 1485c3300db7edd3749950d1be8c25cac24c0285f8273af0a79beb24cc71f2db
5
5
  SHA512:
6
- metadata.gz: 96a4b1c28c6a1cf5134f9d4ed98007ff20bae6fa23b47cb4222954ab20b90b0b93e8900ff73042293ed38f9e80b37a4d9a6682153db62346cdd612504bc91dac
7
- data.tar.gz: 876b48b487e4fc603dc79095d8c6186567cdc758bab8b72c5682d4068b52997849306263c14c7a2e0655f1ef30009ac7a533765a26974665854bc73a32d840a7
6
+ metadata.gz: 3ccea8785a8cb1bfab80f5b82ab7080964cb9d05b13c7c9071fd760acee69bd52a501d5dfcb17e15db0fb0bd5d3a5ba673e5db74b10f8ed29a6c696a9372af12
7
+ data.tar.gz: 8ebf793c15d3ebbe88aec86bfcd1372157ea393e0345306978d9e94ca8fb72ef09455eecf908fe6d54fe6ee59848637a375ea532b1a3cf8608fbd301fd6fe219
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
  ```
@@ -70,7 +72,7 @@ See a real example [here](https://github.com/assaydepot/git-gpt/blob/main/.git-g
70
72
 
71
73
  ## Contributing
72
74
 
73
- Bug reports and pull requests are welcome on GitHub at https://github.com/your-github-username/git-gpt. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
75
+ Bug reports and pull requests are welcome on GitHub at https://github.com/assaydepot/git-gpt. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
74
76
 
75
77
  ## License
76
78
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Git
4
4
  module Gpt
5
- VERSION = "0.0.4"
5
+ VERSION = "0.0.6"
6
6
  end
7
7
  end
data/lib/git/gpt.rb CHANGED
@@ -10,21 +10,19 @@ module Git
10
10
  class Error < StandardError; end
11
11
  class CLI
12
12
  def run(argv=nil)
13
- prompt =<<-EOS
14
- 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.
13
+ prompt =<<EOS
14
+ 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.
15
15
 
16
- The current git status is:
17
- ```
18
- $GIT_STATUS
19
- ```
16
+ The current git status is:
20
17
 
21
- The current git diff is:
22
- ```
23
- $GIT_DIFF
24
- ```
18
+ $GIT_STATUS
25
19
 
26
- 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.
27
- EOS
20
+ The current git diff is:
21
+
22
+ $GIT_DIFF
23
+
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
+ EOS
28
26
 
29
27
  config = {
30
28
  "model" => "gpt-3.5-turbo",
@@ -68,7 +66,7 @@ module Git
68
66
  paths << [path, filename].join(File::SEPARATOR)
69
67
  end
70
68
  paths << [ENV["HOME"], filename].join(File::SEPARATOR) if ENV["HOME"]
71
- result = paths.detect { |path| File.exists?(path) }
69
+ result = paths.detect { |path| File.exist?(path) }
72
70
  result
73
71
  end
74
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
4
+ version: 0.0.6
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-08 00:00:00.000000000 Z
11
+ date: 2025-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -82,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0'
84
84
  requirements: []
85
- rubygems_version: 3.3.7
85
+ rubygems_version: 3.5.3
86
86
  signing_key:
87
87
  specification_version: 4
88
88
  summary: Use ChatGPT to write your commit messages