code_ownership 1.36.0 → 1.36.1
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: 668edc0471999590cd95e9953151e6e30d02bf64b2bb14e544e5f7c56099c998
|
|
4
|
+
data.tar.gz: bbdff6a9af05c8026b33c206d63f083d1c9ed82831bd7b1f3cf3707aa0f54a67
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 54a6b78ddb108894b20ddee99d0a6637770485b27c154b6676021f512d2aae39159d052e8f2c7986b71c824eb9f3f7bc4a3b9d5bc0c9e1848e7bceecee3e7728
|
|
7
|
+
data.tar.gz: b4f39290cfc23f31b73642d3d6a5747ec79efc07210541c4b18c913f448c1df32efe6b4657e91f736055ab30ecf72b4910c22a0266503842aff84ad0e375be62
|
|
@@ -10,8 +10,6 @@ module CodeOwnership
|
|
|
10
10
|
include Mapper
|
|
11
11
|
|
|
12
12
|
CODEOWNERS_DIRECTORY_FILE_NAME = '.codeowner'
|
|
13
|
-
RELATIVE_ROOT = Pathname('.').freeze
|
|
14
|
-
ABSOLUTE_ROOT = Pathname('/').freeze
|
|
15
13
|
|
|
16
14
|
@@directory_cache = T.let({}, T::Hash[String, T.nilable(CodeTeams::Team)]) # rubocop:disable Style/ClassVars
|
|
17
15
|
|
|
@@ -88,11 +86,19 @@ module CodeOwnership
|
|
|
88
86
|
|
|
89
87
|
if File.directory?(file)
|
|
90
88
|
team = get_team_from_codeowners_file_within_directory(file_path)
|
|
89
|
+
return team unless team.nil?
|
|
91
90
|
end
|
|
92
91
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
92
|
+
path_components = file_path.each_filename.to_a
|
|
93
|
+
if file_path.absolute?
|
|
94
|
+
path_components = ['/', *path_components]
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
(path_components.length - 1).downto(0).each do |i|
|
|
98
|
+
team = get_team_from_codeowners_file_within_directory(
|
|
99
|
+
Pathname.new(File.join(*T.unsafe(path_components[0...i])))
|
|
100
|
+
)
|
|
101
|
+
return team unless team.nil?
|
|
96
102
|
end
|
|
97
103
|
|
|
98
104
|
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: 1.36.
|
|
4
|
+
version: 1.36.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Gusto Engineers
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-12-
|
|
11
|
+
date: 2023-12-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: code_teams
|