code_ownership 2.0.0.pre.3-arm64-darwin → 2.0.0.pre.5-arm64-darwin
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c3fbc55014a8531ff6503c9ad748d5df7cce756c6c9014e5c5006b100fa2fc87
|
|
4
|
+
data.tar.gz: 13cced231fb80d0e92c404b3f9c7eb501c14edd34c950175d3d8a0f4cc30ffd7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 917ebfa866924a141f5e710a0bb7cd7442115f016fa9ec965c6f680e7beada02735133c7a93d258c0d40cb93efafbaa6f96f1910af52f369059249c412b545f7
|
|
7
|
+
data.tar.gz: 7fff5c71dec5dc9331686a3d7a3c7e857adf2f134a3d761f209ad2a0bbffc0aacef86c7e77d4ade1461c36a91b47041b03a371657aa8a1d50790fc5df5f0dee8
|
|
Binary file
|
|
Binary file
|
|
@@ -32,12 +32,29 @@ module CodeOwnership
|
|
|
32
32
|
|
|
33
33
|
sig { params(files: T::Array[String], allow_raise: T::Boolean).returns(T::Hash[String, T.nilable(CodeTeams::Team)]) }
|
|
34
34
|
def teams_for_files(files, allow_raise: false)
|
|
35
|
-
|
|
35
|
+
result = {}
|
|
36
|
+
|
|
37
|
+
# Collect cached results and identify non-cached files
|
|
38
|
+
not_cached_files = []
|
|
39
|
+
files.each do |file_path|
|
|
40
|
+
if FilePathTeamCache.cached?(file_path)
|
|
41
|
+
result[file_path] = FilePathTeamCache.get(file_path)
|
|
42
|
+
else
|
|
43
|
+
not_cached_files << file_path
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
return result if not_cached_files.empty?
|
|
48
|
+
|
|
49
|
+
# Process non-cached files
|
|
50
|
+
::RustCodeOwners.teams_for_files(not_cached_files).each do |path_team|
|
|
36
51
|
file_path, team = path_team
|
|
37
52
|
found_team = team ? find_team!(team[:team_name], allow_raise: allow_raise) : nil
|
|
38
53
|
FilePathTeamCache.set(file_path, found_team)
|
|
39
|
-
|
|
54
|
+
result[file_path] = found_team
|
|
40
55
|
end
|
|
56
|
+
|
|
57
|
+
result
|
|
41
58
|
end
|
|
42
59
|
|
|
43
60
|
sig { params(klass: T.nilable(T.any(T::Class[T.anything], Module))).returns(T.nilable(::CodeTeams::Team)) }
|
data/lib/code_ownership.rb
CHANGED
|
@@ -233,9 +233,9 @@ module CodeOwnership
|
|
|
233
233
|
files: nil
|
|
234
234
|
)
|
|
235
235
|
if autocorrect
|
|
236
|
-
::RustCodeOwners.generate_and_validate(!stage_changes)
|
|
236
|
+
::RustCodeOwners.generate_and_validate(files, !stage_changes)
|
|
237
237
|
else
|
|
238
|
-
::RustCodeOwners.validate
|
|
238
|
+
::RustCodeOwners.validate(files)
|
|
239
239
|
end
|
|
240
240
|
end
|
|
241
241
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: code_ownership
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.0.pre.
|
|
4
|
+
version: 2.0.0.pre.5
|
|
5
5
|
platform: arm64-darwin
|
|
6
6
|
authors:
|
|
7
7
|
- Gusto Engineers
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-
|
|
11
|
+
date: 2025-10-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: code_teams
|