commit_ai 0.1.3 → 0.1.4

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: 3bb64bbcabd9361061a9237413b2c37988f36c329e38bf393d7625ebfa3f807e
4
- data.tar.gz: 237c8b7a7c55e220736de318526c09b88be1796b43bf5dad88d5e7c14526171b
3
+ metadata.gz: 4c87ad68cc8d4e50fd42fe7103ccb29775b317ec8bcadd565ae0bfd782803047
4
+ data.tar.gz: 2aad903b0f30d5332854b909409b168f6c3b90223e9c51954e454f69864f9592
5
5
  SHA512:
6
- metadata.gz: 4e6039b3cc10882fa785c1ab18889d214ccff0ed815cf91a52aadee91aca9a95961a4404dd25cfed045b70b4f947b88240f9046493546a6a2a7b03a217978c60
7
- data.tar.gz: 12b1e41db6c9f7b91f4e5dd070135eb04d063ff35b5167883b49ad71673a3c71ed6e6a8555a20a36696127e0352f511e4be9d135873f81d76b3dc72ef8898f21
6
+ metadata.gz: ae68dd9f2e8653787744212093d735099f8b02ed01850f15f76c01749d78bac7b9f9d662e011dd38ab1e732f4f335947edaa62c8f608cbbbbd8d23d5bdfdbf1b
7
+ data.tar.gz: e3ca4b11e589375783c2fc06d6b648d2db313dee57e08b525ca55ccb6e4efd44ca97e3fbbe8ee7ead8c6c526a8ff7f1597bea1233045444777f611a67b63bfa3
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CommitAi
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.4"
5
5
  end
data/lib/commit_ai.rb CHANGED
@@ -63,6 +63,11 @@ class CommitAI
63
63
  system("git add --all")
64
64
  diff = `git diff --staged`
65
65
 
66
+ if diff.empty?
67
+ puts "No changes to commit."
68
+ return
69
+ end
70
+
66
71
  loop do
67
72
  commit_message = generate_commit_message(diff)
68
73
  puts "Generated Commit Message: #{commit_message}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: commit_ai
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ken Vitug