pr-with-params 1.2.1 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/exe/pr-with-params +5 -6
- data/lib/pr/with/params/options_validator.rb +1 -1
- data/lib/pr/with/params/version.rb +1 -1
- data/lib/pr/with/params.rb +7 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e73e0d7cdcfe3e16d632105a2a54564b94e04b0fe523a7faa3449e11e6ad7edb
|
4
|
+
data.tar.gz: 3260ff8eec71435baf10bbce8ba8633b37077e8d8e26dad28c6ee729a23e6783
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4039bc9e0d935d8355899f6b71c34b958d7900c447e710c6fccfe12dea0e4172279207cd8bd559226da2e4e33c1cd90961f9d1221d21ddc2349a6748aae457e5
|
7
|
+
data.tar.gz: 0ead5bf501b295bf8892600773872c9132a8857de609d78146636de50d4447cdf37e0ad746b0f81d765b4c2b5e859ece057d74d310defb3859decd6c85a2c3ed
|
data/Gemfile.lock
CHANGED
data/exe/pr-with-params
CHANGED
@@ -90,12 +90,11 @@ begin
|
|
90
90
|
`sleep 1`
|
91
91
|
PR::With::Params.open(host: uri_host, path: uri_path, query: options)
|
92
92
|
rescue StandardError => e
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
}.to_json
|
93
|
+
message = "\e[31mERROR\e[0m: An error occurred while building or opening your custom pull request URL"
|
94
|
+
reason = "reason: #{e.message}"
|
95
|
+
backtrace = "backtrace: #{e.backtrace&.last(10)&.join("\n")}"
|
96
|
+
error_message = [message, reason, backtrace, "\n\n"].join("\n")
|
98
97
|
|
99
|
-
warn
|
98
|
+
warn error_message
|
100
99
|
exit 1
|
101
100
|
end
|
@@ -25,7 +25,7 @@ module PR
|
|
25
25
|
end
|
26
26
|
|
27
27
|
class ConventionalCommitValidator
|
28
|
-
CONVENTIONAL_COMMIT_REGEX = /^((build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\(
|
28
|
+
CONVENTIONAL_COMMIT_REGEX = /^((build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\(.*\))?(!)?(: (.*\s*)*))|(^Merge (.*\s*)*)|(^Initial commit$)/.freeze
|
29
29
|
|
30
30
|
def initialize(options)
|
31
31
|
@commit_message = options[:title]
|
data/lib/pr/with/params.rb
CHANGED
@@ -21,15 +21,16 @@ module PR
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def parse_config(file_path, scope)
|
24
|
+
ConfigParser.new(config_file_path: file_path, scope: scope).parse!
|
25
|
+
|
24
26
|
file_path.empty? ? {} : ConfigParser.new(config_file_path: file_path, scope: scope).parse!
|
25
27
|
rescue StandardError => e
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
}.to_json
|
28
|
+
message = "\e[35mWARNING\e[0m: Error parsing config file. Using defaults"
|
29
|
+
reason = "reason: #{e.message}"
|
30
|
+
backtrace = "backtrace: #{e.backtrace&.last(10)&.join("\n")}"
|
31
|
+
error_message = [message, reason, backtrace, "\n\n"].join("\n")
|
31
32
|
|
32
|
-
warn
|
33
|
+
warn error_message
|
33
34
|
|
34
35
|
{}
|
35
36
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pr-with-params
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 2k-joker
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|