code_ownership 2.0.0.pre.3-arm64-darwin → 2.0.0.pre.4-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 +4 -4
- data/lib/code_ownership/private/team_finder.rb +19 -2
- data/lib/code_ownership/version.rb +1 -1
- 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: eb5319e70d4dd2732244a78c1587b909ae3dde5053d13da4fa4d6038bf85661e
|
4
|
+
data.tar.gz: 7cedaf26c7ada0a54c74c172b57ad4ecd00591e50c1444ca023383a35f66b3bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 273aa0c5ecb9e950cc9fcadf56df4de51fdcce63b194b7c3819c8cbbcea4073f5a766def02d869e31a360edef0db55a0489d8e42af3163cec57090f8ea5a0a25
|
7
|
+
data.tar.gz: b2ccf3320216c0ffd31001b816ae5a5639fffe3743affdd28e7b264f9751afb61814bc8875af726cec26bde10a620e76b413e3fcce7955552c2fa2912af6f213
|
@@ -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)) }
|
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.4
|
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-09-
|
11
|
+
date: 2025-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: code_teams
|