fast_code_owners 0.0.8-x86_64-linux → 0.0.9-x86_64-linux
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/lib/fast_code_owners/3.2/fast_code_owners.so +0 -0
- data/lib/fast_code_owners/3.4/fast_code_owners.so +0 -0
- data/lib/fast_code_owners/cli.rb +7 -1
- data/lib/fast_code_owners/team_finder.rb +2 -2
- data/lib/fast_code_owners/version.rb +1 -1
- data/lib/fast_code_owners.rb +6 -2
- 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: 4140121aff5f1bf4b0a8216fc216f43a3e2f55e5dc30121ab2a11b614e472362
|
4
|
+
data.tar.gz: 10f3ee81659269704b08dc4656a3e4e64f2581ae83eda574b5aeea5cbbbd3c63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1f97a28f15f61e821f44db5e43356d3939b5684e3f5712e561e1a14ee0bace7edbbbdbf7f337c4d50b4ac4f217db7bbfc93747d42bf13016430ba882a12538e
|
7
|
+
data.tar.gz: 283018c9d9c1af4b8fc3e35fc863ab2aa878cc728da3409590e37060bd7613aa6bd986b967cfe85aed4a08df28b2fb72795a1d4b87b37684181393dd15ec89a2
|
Binary file
|
Binary file
|
data/lib/fast_code_owners/cli.rb
CHANGED
@@ -63,11 +63,17 @@ module FastCodeOwners
|
|
63
63
|
nil
|
64
64
|
end
|
65
65
|
|
66
|
-
FastCodeOwners.validate!(
|
66
|
+
result = FastCodeOwners.validate!(
|
67
67
|
files: files,
|
68
68
|
autocorrect: !options[:skip_autocorrect],
|
69
69
|
stage_changes: !options[:skip_stage]
|
70
70
|
)
|
71
|
+
puts "cli result: #{result}"
|
72
|
+
if result.nil?
|
73
|
+
puts 'No errors found'
|
74
|
+
else
|
75
|
+
puts result
|
76
|
+
end
|
71
77
|
end
|
72
78
|
|
73
79
|
# For now, this just returns team ownership
|
@@ -15,10 +15,10 @@ module FastCodeOwners
|
|
15
15
|
def for_file(file_path)
|
16
16
|
return nil if file_path.start_with?('./')
|
17
17
|
|
18
|
-
|
18
|
+
return FilePathTeamCache.get(file_path) if FilePathTeamCache.cached?(file_path)
|
19
|
+
|
19
20
|
result = T.let(RustCodeOwners.for_file(file_path), T.nilable(T::Hash[Symbol, String]))
|
20
21
|
return if result.nil?
|
21
|
-
puts "ruby result: #{result}"
|
22
22
|
|
23
23
|
if result[:team_name].nil?
|
24
24
|
FilePathTeamCache.set(file_path, nil)
|
data/lib/fast_code_owners.rb
CHANGED
@@ -30,14 +30,18 @@ module FastCodeOwners
|
|
30
30
|
autocorrect: T::Boolean,
|
31
31
|
stage_changes: T::Boolean,
|
32
32
|
files: T.nilable(T::Array[String])
|
33
|
-
).
|
33
|
+
).returns(T.nilable(T::Hash[Symbol, String]))
|
34
34
|
end
|
35
35
|
def validate!(
|
36
36
|
autocorrect: true,
|
37
37
|
stage_changes: true,
|
38
38
|
files: nil
|
39
39
|
)
|
40
|
-
|
40
|
+
if autocorrect
|
41
|
+
::RustCodeOwners.generate_and_validate
|
42
|
+
else
|
43
|
+
::RustCodeOwners.validate
|
44
|
+
end
|
41
45
|
end
|
42
46
|
|
43
47
|
sig { params(file_path: String).returns(T.nilable(CodeTeams::Team)) }
|