danger-missing_codeowners 1.2.0 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +18 -14
- data/lib/missing_codeowners/gem_version.rb +1 -1
- data/lib/missing_codeowners/plugin.rb +4 -2
- data/spec/fixtures/CODEOWNERS +3 -0
- data/spec/missing_codeowners_spec.rb +2 -14
- metadata +2 -4
- data/spec/fixtures/INVALID_CODEOWNERS +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ee614f9e8f6c289b7703b986ab724fa66bb09823f63f0d2958db26bbf314692
|
4
|
+
data.tar.gz: c519cae4557cad087b86f80f42ab4ffb5eb45fef4716e9c52ac4c113bee083a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25313015ad2565b99b1a91b8d3d62b42f193f0a3e62ceac78188f25569c6df22713c9fe50803bfc0f2c75b5cfc9cbe96a5df9261af1d3132d0a6079380b0d430
|
7
|
+
data.tar.gz: 6adaa343ee28ab37dc60a8855f31572d123ec54392d36e308ea7c46fcbd4a59200c1f7ad18dc0b2b69c83f41bc10138fe052d4894d1b7f9ed7b702c22f3f50c2
|
data/Gemfile.lock
CHANGED
@@ -1,16 +1,17 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
danger-missing_codeowners (1.2.
|
4
|
+
danger-missing_codeowners (1.2.2)
|
5
5
|
danger-plugin-api (~> 1.0)
|
6
6
|
pathspec (~> 1.0.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
addressable (2.8.
|
11
|
+
addressable (2.8.6)
|
12
12
|
public_suffix (>= 2.0.2, < 6.0)
|
13
13
|
ast (2.4.2)
|
14
|
+
base64 (0.2.0)
|
14
15
|
claide (1.1.0)
|
15
16
|
claide-plugins (0.9.2)
|
16
17
|
cork
|
@@ -20,31 +21,31 @@ GEM
|
|
20
21
|
colored2 (3.1.2)
|
21
22
|
cork (0.3.0)
|
22
23
|
colored2 (~> 3.1)
|
23
|
-
danger (9.3
|
24
|
+
danger (9.4.3)
|
24
25
|
claide (~> 1.0)
|
25
26
|
claide-plugins (>= 0.9.2)
|
26
27
|
colored2 (~> 3.1)
|
27
28
|
cork (~> 0.1)
|
28
29
|
faraday (>= 0.9.0, < 3.0)
|
29
30
|
faraday-http-cache (~> 2.0)
|
30
|
-
git (~> 1.13
|
31
|
+
git (~> 1.13)
|
31
32
|
kramdown (~> 2.3)
|
32
33
|
kramdown-parser-gfm (~> 1.0)
|
33
34
|
no_proxy_fix
|
34
|
-
octokit (
|
35
|
+
octokit (>= 4.0)
|
35
36
|
terminal-table (>= 1, < 4)
|
36
37
|
danger-plugin-api (1.0.0)
|
37
38
|
danger (> 2.0)
|
38
39
|
diff-lcs (1.4.4)
|
39
|
-
faraday (2.
|
40
|
-
faraday-net_http (>= 2.0, < 3.
|
41
|
-
|
42
|
-
faraday-http-cache (2.5.0)
|
40
|
+
faraday (2.9.0)
|
41
|
+
faraday-net_http (>= 2.0, < 3.2)
|
42
|
+
faraday-http-cache (2.5.1)
|
43
43
|
faraday (>= 0.8)
|
44
|
-
faraday-net_http (3.0
|
44
|
+
faraday-net_http (3.1.0)
|
45
|
+
net-http
|
45
46
|
ffi (1.15.3)
|
46
47
|
formatador (0.3.0)
|
47
|
-
git (1.
|
48
|
+
git (1.19.1)
|
48
49
|
addressable (~> 2.8)
|
49
50
|
rchardet (~> 1.8)
|
50
51
|
guard (2.18.0)
|
@@ -72,11 +73,14 @@ GEM
|
|
72
73
|
method_source (1.0.0)
|
73
74
|
nap (1.1.0)
|
74
75
|
nenv (0.3.0)
|
76
|
+
net-http (0.4.1)
|
77
|
+
uri
|
75
78
|
no_proxy_fix (0.1.2)
|
76
79
|
notiffany (0.1.3)
|
77
80
|
nenv (~> 0.1)
|
78
81
|
shellany (~> 0.0)
|
79
|
-
octokit (
|
82
|
+
octokit (8.1.0)
|
83
|
+
base64
|
80
84
|
faraday (>= 1, < 3)
|
81
85
|
sawyer (~> 0.9)
|
82
86
|
open4 (1.3.4)
|
@@ -87,7 +91,7 @@ GEM
|
|
87
91
|
pry (0.14.1)
|
88
92
|
coderay (~> 1.1)
|
89
93
|
method_source (~> 1.0)
|
90
|
-
public_suffix (5.0.
|
94
|
+
public_suffix (5.0.4)
|
91
95
|
rainbow (3.0.0)
|
92
96
|
rake (10.5.0)
|
93
97
|
rb-fsevent (0.11.0)
|
@@ -121,7 +125,6 @@ GEM
|
|
121
125
|
rubocop-ast (1.8.0)
|
122
126
|
parser (>= 3.0.1.1)
|
123
127
|
ruby-progressbar (1.11.0)
|
124
|
-
ruby2_keywords (0.0.5)
|
125
128
|
sawyer (0.9.2)
|
126
129
|
addressable (>= 2.3.5)
|
127
130
|
faraday (>= 0.17.3, < 3)
|
@@ -130,6 +133,7 @@ GEM
|
|
130
133
|
unicode-display_width (>= 1.1.1, < 3)
|
131
134
|
thor (1.1.0)
|
132
135
|
unicode-display_width (2.0.0)
|
136
|
+
uri (0.13.0)
|
133
137
|
yard (0.9.26)
|
134
138
|
|
135
139
|
PLATFORMS
|
@@ -116,7 +116,9 @@ module Danger
|
|
116
116
|
end
|
117
117
|
|
118
118
|
def find_codeowners_file
|
119
|
-
|
119
|
+
return "CODEOWNERS" if File.exist?("CODEOWNERS")
|
120
|
+
|
121
|
+
directories = [".gitlab", ".github", "docs"]
|
120
122
|
paths = directories.map { |dir| File.join(dir, "CODEOWNERS") }
|
121
123
|
Dir.glob(paths).first || paths.first
|
122
124
|
end
|
@@ -132,7 +134,7 @@ module Danger
|
|
132
134
|
components = line.split(/\s+(@\S+|\S+@\S+)/).reject { |c| c.strip.empty? }
|
133
135
|
if line.match(/^\s*((?:#.*)|(?:\[.*)|(?:\^.*))?$/)
|
134
136
|
next # Comment, group or empty line
|
135
|
-
elsif components.
|
137
|
+
elsif components.empty?
|
136
138
|
raise "[ERROR] Invalid CODEOWNERS line: '#{line}'"
|
137
139
|
else
|
138
140
|
pattern = components[0]
|
data/spec/fixtures/CODEOWNERS
CHANGED
@@ -50,7 +50,8 @@ module Danger
|
|
50
50
|
"very/nested/lib/source.js",
|
51
51
|
"very/nested/sources/php/source.php",
|
52
52
|
"model/db/",
|
53
|
-
"sources/something.go"
|
53
|
+
"sources/something.go",
|
54
|
+
"empty/owners/foo.py"
|
54
55
|
])
|
55
56
|
|
56
57
|
@my_plugin.verify
|
@@ -185,19 +186,6 @@ module Danger
|
|
185
186
|
expect(@my_plugin.files_missing_codeowners.length).to eq(1)
|
186
187
|
end
|
187
188
|
end
|
188
|
-
|
189
|
-
context "and invalid CODEOWNERS file" do
|
190
|
-
before do
|
191
|
-
allow(@my_plugin).to receive(:find_codeowners_file)
|
192
|
-
.and_return("#{File.dirname(__FILE__)}/fixtures/INVALID_CODEOWNERS")
|
193
|
-
end
|
194
|
-
|
195
|
-
it "raises exception with invalid line" do
|
196
|
-
allow(@my_plugin).to receive(:git_modified_files).and_return(["any_file.yml", "any_file.go"])
|
197
|
-
|
198
|
-
expect { @my_plugin.verify }.to raise_error(RuntimeError)
|
199
|
-
end
|
200
|
-
end
|
201
189
|
end
|
202
190
|
end
|
203
191
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: danger-missing_codeowners
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- andre-alves
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: danger-plugin-api
|
@@ -187,7 +187,6 @@ files:
|
|
187
187
|
- lib/missing_codeowners/gem_version.rb
|
188
188
|
- lib/missing_codeowners/plugin.rb
|
189
189
|
- spec/fixtures/CODEOWNERS
|
190
|
-
- spec/fixtures/INVALID_CODEOWNERS
|
191
190
|
- spec/missing_codeowners_spec.rb
|
192
191
|
- spec/spec_helper.rb
|
193
192
|
homepage: https://github.com/andre-alves/danger-missing_codeowners
|
@@ -215,6 +214,5 @@ specification_version: 4
|
|
215
214
|
summary: A Danger plugin for checking if files have owners.
|
216
215
|
test_files:
|
217
216
|
- spec/fixtures/CODEOWNERS
|
218
|
-
- spec/fixtures/INVALID_CODEOWNERS
|
219
217
|
- spec/missing_codeowners_spec.rb
|
220
218
|
- spec/spec_helper.rb
|