conventional_commits 0.2.14 → 0.2.16
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/Gemfile.lock +1 -1
- data/lib/cli/branch_name_cli.rb +6 -2
- data/lib/commit/commit_message_generator.rb +2 -3
- data/lib/conventional_commits/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 711e55d8a2646d8d36c9c12f738e2fb8ac0d40897550f1c418bc63717da9fce7
|
4
|
+
data.tar.gz: 2e146ec8502c0c2761a278ed1e676913b5388e6f9fc81350d9ee8c0b711c2f47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ccc53136675957cbbabe277ae0865a169bbc536edd3babe9a0a66bebfc093a45bfd5786ec65942deedd5dda6f6f00de4600fc865298ff4d41e4ec4dd2363707
|
7
|
+
data.tar.gz: 85a0a331109ee21bf30f2d60e659c8d52f857f8c204b1910a371a306332d06f175523b2f37b2001b24321876e5ae8d2f22899dd5f80bae0c98f1606bab94545d
|
data/Gemfile.lock
CHANGED
data/lib/cli/branch_name_cli.rb
CHANGED
@@ -30,8 +30,12 @@ module ConventionalCommits
|
|
30
30
|
cfg_path = options["cfg_path"] || Configuration::DEFAULT_CONFIGURATION_PATH
|
31
31
|
|
32
32
|
generator = ConventionalCommits::CommitMessageGenerator.new
|
33
|
-
|
34
|
-
|
33
|
+
unless generator.should_try_to_parse_msg_from_file(source:)
|
34
|
+
puts "Generating message"
|
35
|
+
name = generator.prepare_message_template_for_type(type: source, cfg_path:, msg_file_path: msg_path)
|
36
|
+
File.write_to_file(msg_path, name)
|
37
|
+
end
|
38
|
+
|
35
39
|
rescue StandardError => e
|
36
40
|
raise Thor::Error, e.message
|
37
41
|
end
|
@@ -39,13 +39,12 @@ module ConventionalCommits
|
|
39
39
|
data = File.read_file(msg_file_path).to_s
|
40
40
|
prepare_template_message(custom_body: data, cfg_path:)
|
41
41
|
end
|
42
|
-
|
43
|
-
private
|
44
|
-
|
45
42
|
def should_try_to_parse_msg_from_file(source: "")
|
46
43
|
skippable_sources.include?(source)
|
47
44
|
end
|
48
45
|
|
46
|
+
private
|
47
|
+
|
49
48
|
def skippable_sources
|
50
49
|
%w[message merge squash]
|
51
50
|
end
|