code_ownership 2.1.3-x86_64-linux → 2.1.4-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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d6d518b225ea0abfa79f8c2ea8cd5f595fbc7ed7a35b6e021cd07acabb80b02d
4
- data.tar.gz: 5692269e718082a7b58035bf85c4a14efb7633fc882c1ae9f625b1322eebcc2a
3
+ metadata.gz: 360d54f43286ddf12736da8412d713d8a5c0c5d5cda330243132e598a4159b7c
4
+ data.tar.gz: b900b15601101cba2aef0ac026e9932ac1391a4e86f1c457d698f7c40b02ac56
5
5
  SHA512:
6
- metadata.gz: da62c46b6eabcae8ac8ccab94e44936d04e197bf14a020073da267213e9d8cdf643f2f9471eabf382bccec9d9a902f4f8e8b93e8106e8419a2d7e17dd3532c67
7
- data.tar.gz: e6ac13d85b5677ac0c88548f065c5ce574d935daa56677194a61e5b955638166069a426346703eff8284a6bbf30d4f243b5af482132ff5c99d4403325b878f2a
6
+ metadata.gz: 1b9a71d6c232c271ac1c36938f76ff09b9eaae1f1d27499fbafa542cc20f5f0074b19618c1d557a336880183312986c0fc93b3749d193c33156854c41134fc58
7
+ data.tar.gz: b160ccd8f9ea0f8ae5ef70b205fa6aca55cae7a0bf828653c47d55753df023784e7ec63bc9adccbfef251faf8e6c115afbf407726ccc4a25c32cccab1c7d688a
@@ -12,12 +12,12 @@ module CodeOwnership
12
12
 
13
13
  return FilePathTeamCache.get(file_path) if FilePathTeamCache.cached?(file_path)
14
14
 
15
- result = T.let(RustCodeOwners.for_file(file_path), T.nilable(T::Hash[Symbol, String]))
15
+ result = T.let(RustCodeOwners.for_file(file_path), T.nilable(FileOwnershipDetails))
16
16
 
17
- if result.nil? || result[:team_name].nil?
17
+ if result.nil?
18
18
  FilePathTeamCache.set(file_path, nil)
19
19
  else
20
- FilePathTeamCache.set(file_path, T.let(find_team!(T.must(result[:team_name]), allow_raise: allow_raise), T.nilable(CodeTeams::Team)))
20
+ FilePathTeamCache.set(file_path, T.let(find_team!(result[:team_name], allow_raise: allow_raise), T.nilable(CodeTeams::Team)))
21
21
  end
22
22
 
23
23
  FilePathTeamCache.get(file_path)
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module CodeOwnership
5
- VERSION = '2.1.3'
5
+ VERSION = '2.1.4'
6
6
  end
@@ -28,6 +28,11 @@ module CodeOwnership
28
28
 
29
29
  GlobsToOwningTeamMap = T.type_alias { T::Hash[String, CodeTeams::Team] }
30
30
 
31
+ # The `Team` struct that the Rust extension serializes out of `RustCodeOwners.for_file`.
32
+ FileOwnershipDetails = T.type_alias do
33
+ { team_name: String, team_config_yml: String, reasons: T::Array[String] }
34
+ end
35
+
31
36
  # Returns the version of the code_ownership gem and the codeowners-rs gem.
32
37
  sig { returns(T::Array[String]) }
33
38
  def self.version
@@ -154,7 +159,7 @@ module CodeOwnership
154
159
  # @see #for_file for a simpler ownership lookup that returns just the team
155
160
  # @see CLI#for_file for the command-line interface that uses this method
156
161
  #
157
- sig { params(file: String).returns(T.nilable(T::Hash[Symbol, String])) }
162
+ sig { params(file: String).returns(T.nilable(FileOwnershipDetails)) }
158
163
  def self.for_file_verbose(file)
159
164
  ::RustCodeOwners.for_file(file)
160
165
  end
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.1.3
4
+ version: 2.1.4
5
5
  platform: x86_64-linux
6
6
  authors:
7
7
  - Gusto Engineers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-06-10 00:00:00.000000000 Z
11
+ date: 2026-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: code_teams