danger-packwerk 0.13.0 → 0.14.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 88dd6cf3e1597ce88a505eaa638404b5ec37733adbfd08c121d2ea1718ff4c80
4
- data.tar.gz: 37c3d43dfba549cab2d536fd38a0ad080968d5277f21ac6a9c7fadb2100dbdec
3
+ metadata.gz: aa564ef118a2a39e97526ac0e2a760d9fb42e721d2f85bd4bde334f0493d1246
4
+ data.tar.gz: 34ae63e01e035b03c2110550facba1dbf62ffd025907c3219319d033665120e8
5
5
  SHA512:
6
- metadata.gz: ee1bb1ca1f19f6a47d3766bd823bf83a7c8d8c5441e703aec6e8404d036cf02be80d00f6ab9feceb03d791d603497216bb9a7834b2454a947b07c6ef89276869
7
- data.tar.gz: 2c0802e7bb7ce6100fcc63d27ded9071fea2e3661cc0cd622188581f4056f44110a61bf1e0936a43ca5baeca33d02d2abe65c4eb35debe9291739d00cd0f8e38
6
+ metadata.gz: 6a724b6f6ffee5964fcd48c1638b10045e609c7ef880299c9a1a5ca5edaee0eee5753fd0d77b650349d1a0936b58a88697adcbb290e967c756aa35229e593d46
7
+ data.tar.gz: cbc524de180c63511901b118e0aeac8db39ba5432977c27529765dc235e10a66005df8949851996d92febf3c7121082a214d5f72bbd1e85ac58b30b90272bdfc
@@ -1,6 +1,7 @@
1
1
  # typed: strict
2
2
 
3
3
  require 'code_ownership'
4
+ require 'packs'
4
5
 
5
6
  module DangerPackwerk
6
7
  module Private
@@ -14,7 +15,8 @@ module DangerPackwerk
14
15
 
15
16
  sig { params(package: ParsePackwerk::Package, org_name: String).returns(OwnershipInformation) }
16
17
  def self.for_package(package, org_name)
17
- team = CodeOwnership.for_package(package)
18
+ pack = Packs.find(package.name)
19
+ team = pack.nil? ? nil : CodeOwnership.for_package(pack)
18
20
 
19
21
  if team.nil?
20
22
  OwnershipInformation.new
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module DangerPackwerk
5
- VERSION = '0.13.0'
5
+ VERSION = '0.14.0'
6
6
  end
@@ -0,0 +1,525 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `code_ownership` gem.
5
+ # Please instead update this file by running `bin/tapioca gem code_ownership`.
6
+
7
+ # source://code_ownership//lib/code_ownership/cli.rb#7
8
+ module CodeOwnership
9
+ extend ::CodeOwnership
10
+
11
+ requires_ancestor { Kernel }
12
+
13
+ # Given a backtrace from either `Exception#backtrace` or `caller`, find the
14
+ # first line that corresponds to a file with assigned ownership
15
+ #
16
+ # source://code_ownership//lib/code_ownership.rb#95
17
+ sig do
18
+ params(
19
+ backtrace: T.nilable(T::Array[::String]),
20
+ excluded_teams: T::Array[::CodeTeams::Team]
21
+ ).returns(T.nilable(::CodeTeams::Team))
22
+ end
23
+ def for_backtrace(backtrace, excluded_teams: T.unsafe(nil)); end
24
+
25
+ # source://code_ownership//lib/code_ownership.rb#127
26
+ sig { params(klass: T.nilable(T.any(::Class, ::Module))).returns(T.nilable(::CodeTeams::Team)) }
27
+ def for_class(klass); end
28
+
29
+ # source://code_ownership//lib/code_ownership.rb#21
30
+ sig { params(file: ::String).returns(T.nilable(::CodeTeams::Team)) }
31
+ def for_file(file); end
32
+
33
+ # source://code_ownership//lib/code_ownership.rb#144
34
+ sig { params(package: ::Packs::Pack).returns(T.nilable(::CodeTeams::Team)) }
35
+ def for_package(package); end
36
+
37
+ # source://code_ownership//lib/code_ownership.rb#39
38
+ sig { params(team: T.any(::CodeTeams::Team, ::String)).returns(::String) }
39
+ def for_team(team); end
40
+
41
+ # source://code_ownership//lib/code_ownership.rb#83
42
+ sig { params(files: T::Array[::String], autocorrect: T::Boolean, stage_changes: T::Boolean).void }
43
+ def validate!(files: T.unsafe(nil), autocorrect: T.unsafe(nil), stage_changes: T.unsafe(nil)); end
44
+
45
+ class << self
46
+ # Generally, you should not ever need to do this, because once your ruby process loads, cached content should not change.
47
+ # Namely, the set of files, packages, and directories which are tracked for ownership should not change.
48
+ # The primary reason this is helpful is for clients of CodeOwnership who want to test their code, and each test context
49
+ # has different ownership and tracked files.
50
+ #
51
+ # source://code_ownership//lib/code_ownership.rb#153
52
+ sig { void }
53
+ def bust_caches!; end
54
+
55
+ # source://code_ownership//lib/code_ownership.rb#72
56
+ sig { params(filename: ::String).void }
57
+ def remove_file_annotation!(filename); end
58
+ end
59
+ end
60
+
61
+ # source://code_ownership//lib/code_ownership/cli.rb#8
62
+ class CodeOwnership::Cli
63
+ class << self
64
+ # For now, this just returns team ownership
65
+ # Later, this could also return code ownership errors about that file.
66
+ #
67
+ # source://code_ownership//lib/code_ownership/cli.rb#76
68
+ def for_file(argv); end
69
+
70
+ # source://code_ownership//lib/code_ownership/cli.rb#123
71
+ def for_team(argv); end
72
+
73
+ # source://code_ownership//lib/code_ownership/cli.rb#9
74
+ def run!(argv); end
75
+
76
+ private
77
+
78
+ # source://code_ownership//lib/code_ownership/cli.rb#33
79
+ def validate!(argv); end
80
+ end
81
+ end
82
+
83
+ # source://code_ownership//lib/code_ownership.rb#68
84
+ class CodeOwnership::InvalidCodeOwnershipConfigurationError < ::StandardError; end
85
+
86
+ # source://code_ownership//lib/code_ownership/private/configuration.rb#4
87
+ module CodeOwnership::Private
88
+ class << self
89
+ # source://code_ownership//lib/code_ownership/private.rb#30
90
+ sig { void }
91
+ def bust_caches!; end
92
+
93
+ # source://code_ownership//lib/code_ownership/private.rb#24
94
+ sig { returns(::CodeOwnership::Private::Configuration) }
95
+ def configuration; end
96
+
97
+ # source://code_ownership//lib/code_ownership/private.rb#69
98
+ sig { returns(::CodeOwnership::Private::OwnershipMappers::FileAnnotations) }
99
+ def file_annotations_mapper; end
100
+
101
+ # source://code_ownership//lib/code_ownership/private.rb#106
102
+ sig { params(files: T::Array[::String]).returns(T::Hash[::String, T::Array[::String]]) }
103
+ def files_by_mapper(files); end
104
+
105
+ # source://code_ownership//lib/code_ownership/private.rb#96
106
+ sig { params(team_name: ::String, location_of_reference: ::String).returns(::CodeTeams::Team) }
107
+ def find_team!(team_name, location_of_reference); end
108
+
109
+ # source://code_ownership//lib/code_ownership/private.rb#59
110
+ sig { returns(T::Array[::CodeOwnership::Private::OwnershipMappers::Interface]) }
111
+ def mappers; end
112
+
113
+ # Returns a string version of the relative path to a Rails constant,
114
+ # or nil if it can't find something
115
+ #
116
+ # source://code_ownership//lib/code_ownership/private.rb#77
117
+ sig { params(klass: T.nilable(T.any(::Class, ::Module))).returns(T.nilable(::String)) }
118
+ def path_from_klass(klass); end
119
+
120
+ # The output of this function is string pathnames relative to the root.
121
+ #
122
+ # source://code_ownership//lib/code_ownership/private.rb#90
123
+ sig { returns(T::Array[::String]) }
124
+ def tracked_files; end
125
+
126
+ # source://code_ownership//lib/code_ownership/private.rb#37
127
+ sig { params(files: T::Array[::String], autocorrect: T::Boolean, stage_changes: T::Boolean).void }
128
+ def validate!(files:, autocorrect: T.unsafe(nil), stage_changes: T.unsafe(nil)); end
129
+ end
130
+ end
131
+
132
+ # source://code_ownership//lib/code_ownership/private/configuration.rb#5
133
+ class CodeOwnership::Private::Configuration < ::T::Struct
134
+ const :owned_globs, T::Array[::String]
135
+ const :unowned_globs, T::Array[::String]
136
+ const :js_package_paths, T::Array[::String]
137
+ const :skip_codeowners_validation, T::Boolean
138
+
139
+ class << self
140
+ # source://code_ownership//lib/code_ownership/private/configuration.rb#15
141
+ sig { returns(::CodeOwnership::Private::Configuration) }
142
+ def fetch; end
143
+
144
+ # source://sorbet-runtime/0.5.10588/lib/types/struct.rb#13
145
+ def inherited(s); end
146
+
147
+ # source://code_ownership//lib/code_ownership/private/configuration.rb#27
148
+ sig { params(config_hash: T::Hash[T.untyped, T.untyped]).returns(T::Array[::String]) }
149
+ def js_package_paths(config_hash); end
150
+ end
151
+ end
152
+
153
+ # source://code_ownership//lib/code_ownership/private/configuration.rb#7
154
+ CodeOwnership::Private::Configuration::DEFAULT_JS_PACKAGE_PATHS = T.let(T.unsafe(nil), Array)
155
+
156
+ # source://code_ownership//lib/code_ownership/private/ownership_mappers/interface.rb#7
157
+ module CodeOwnership::Private::OwnershipMappers; end
158
+
159
+ # Calculate, cache, and return a mapping of file names (relative to the root
160
+ # of the repository) to team name.
161
+ #
162
+ # Example:
163
+ #
164
+ # {
165
+ # 'app/models/company.rb' => Team.find('Setup & Onboarding'),
166
+ # ...
167
+ # }
168
+ #
169
+ # source://code_ownership//lib/code_ownership/private/ownership_mappers/file_annotations.rb#17
170
+ class CodeOwnership::Private::OwnershipMappers::FileAnnotations
171
+ include ::CodeOwnership::Private::OwnershipMappers::Interface
172
+
173
+ # source://code_ownership//lib/code_ownership/private/ownership_mappers/file_annotations.rb#113
174
+ sig { override.void }
175
+ def bust_caches!; end
176
+
177
+ # source://code_ownership//lib/code_ownership/private/ownership_mappers/file_annotations.rb#102
178
+ sig { override.returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
179
+ def codeowners_lines_to_owners; end
180
+
181
+ # source://code_ownership//lib/code_ownership/private/ownership_mappers/file_annotations.rb#108
182
+ sig { override.returns(::String) }
183
+ def description; end
184
+
185
+ # source://code_ownership//lib/code_ownership/private/ownership_mappers/file_annotations.rb#50
186
+ sig { params(filename: ::String).returns(T.nilable(::CodeTeams::Team)) }
187
+ def file_annotation_based_owner(filename); end
188
+
189
+ # source://code_ownership//lib/code_ownership/private/ownership_mappers/file_annotations.rb#29
190
+ sig { override.params(file: ::String).returns(T.nilable(::CodeTeams::Team)) }
191
+ def map_file_to_owner(file); end
192
+
193
+ # source://code_ownership//lib/code_ownership/private/ownership_mappers/file_annotations.rb#38
194
+ sig { override.params(files: T::Array[::String]).returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
195
+ def map_files_to_owners(files); end
196
+
197
+ # source://code_ownership//lib/code_ownership/private/ownership_mappers/file_annotations.rb#86
198
+ sig { params(filename: ::String).void }
199
+ def remove_file_annotation!(filename); end
200
+ end
201
+
202
+ # source://code_ownership//lib/code_ownership/private/ownership_mappers/file_annotations.rb#23
203
+ CodeOwnership::Private::OwnershipMappers::FileAnnotations::TEAM_PATTERN = T.let(T.unsafe(nil), Regexp)
204
+
205
+ # @abstract Subclasses must implement the `abstract` methods below.
206
+ #
207
+ # source://code_ownership//lib/code_ownership/private/ownership_mappers/interface.rb#8
208
+ module CodeOwnership::Private::OwnershipMappers::Interface
209
+ interface!
210
+
211
+ # @abstract
212
+ #
213
+ # source://code_ownership//lib/code_ownership/private/ownership_mappers/interface.rb#45
214
+ sig { abstract.void }
215
+ def bust_caches!; end
216
+
217
+ # @abstract
218
+ #
219
+ # source://code_ownership//lib/code_ownership/private/ownership_mappers/interface.rb#37
220
+ sig { abstract.returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
221
+ def codeowners_lines_to_owners; end
222
+
223
+ # @abstract
224
+ #
225
+ # source://code_ownership//lib/code_ownership/private/ownership_mappers/interface.rb#41
226
+ sig { abstract.returns(::String) }
227
+ def description; end
228
+
229
+ # This should be fast when run with ONE file
230
+ #
231
+ # @abstract
232
+ #
233
+ # source://code_ownership//lib/code_ownership/private/ownership_mappers/interface.rb#21
234
+ sig { abstract.params(file: ::String).returns(T.nilable(::CodeTeams::Team)) }
235
+ def map_file_to_owner(file); end
236
+
237
+ # This should be fast when run with MANY files
238
+ #
239
+ # @abstract
240
+ #
241
+ # source://code_ownership//lib/code_ownership/private/ownership_mappers/interface.rb#31
242
+ sig { abstract.params(files: T::Array[::String]).returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
243
+ def map_files_to_owners(files); end
244
+ end
245
+
246
+ # source://code_ownership//lib/code_ownership/private/ownership_mappers/js_package_ownership.rb#8
247
+ class CodeOwnership::Private::OwnershipMappers::JsPackageOwnership
248
+ include ::CodeOwnership::Private::OwnershipMappers::Interface
249
+
250
+ # source://code_ownership//lib/code_ownership/private/ownership_mappers/js_package_ownership.rb#80
251
+ sig { override.void }
252
+ def bust_caches!; end
253
+
254
+ # Package ownership ignores the passed in files when generating code owners lines.
255
+ # This is because Package ownership knows that the fastest way to find code owners for package based ownership
256
+ # is to simply iterate over the packages and grab the owner, rather than iterating over each file just to get what package it is in
257
+ # In theory this means that we may generate code owners lines that cover files that are not in the passed in argument,
258
+ # but in practice this is not of consequence because in reality we never really want to generate code owners for only a
259
+ # subset of files, but rather we want code ownership for all files.
260
+ #
261
+ # source://code_ownership//lib/code_ownership/private/ownership_mappers/js_package_ownership.rb#54
262
+ sig { override.returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
263
+ def codeowners_lines_to_owners; end
264
+
265
+ # source://code_ownership//lib/code_ownership/private/ownership_mappers/js_package_ownership.rb#64
266
+ sig { override.returns(::String) }
267
+ def description; end
268
+
269
+ # source://code_ownership//lib/code_ownership/private/ownership_mappers/js_package_ownership.rb#18
270
+ sig { override.params(file: ::String).returns(T.nilable(::CodeTeams::Team)) }
271
+ def map_file_to_owner(file); end
272
+
273
+ # source://code_ownership//lib/code_ownership/private/ownership_mappers/js_package_ownership.rb#31
274
+ sig { override.params(files: T::Array[::String]).returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
275
+ def map_files_to_owners(files); end
276
+
277
+ # source://code_ownership//lib/code_ownership/private/ownership_mappers/js_package_ownership.rb#69
278
+ sig { params(package: ::CodeOwnership::Private::ParseJsPackages::Package).returns(T.nilable(::CodeTeams::Team)) }
279
+ def owner_for_package(package); end
280
+
281
+ private
282
+
283
+ # takes a file and finds the relevant `package.json` file by walking up the directory
284
+ # structure. Example, given `packages/a/b/c.rb`, this looks for `packages/a/b/package.json`, `packages/a/package.json`,
285
+ # `packages/package.json`, and `package.json` in that order, stopping at the first file to actually exist.
286
+ # We do additional caching so that we don't have to check for file existence every time
287
+ #
288
+ # source://code_ownership//lib/code_ownership/private/ownership_mappers/js_package_ownership.rb#91
289
+ sig { params(file: ::String).returns(T.nilable(::CodeOwnership::Private::ParseJsPackages::Package)) }
290
+ def map_file_to_relevant_package(file); end
291
+ end
292
+
293
+ # source://code_ownership//lib/code_ownership/private/ownership_mappers/package_ownership.rb#8
294
+ class CodeOwnership::Private::OwnershipMappers::PackageOwnership
295
+ include ::CodeOwnership::Private::OwnershipMappers::Interface
296
+
297
+ # source://code_ownership//lib/code_ownership/private/ownership_mappers/package_ownership.rb#80
298
+ sig { override.void }
299
+ def bust_caches!; end
300
+
301
+ # Package ownership ignores the passed in files when generating code owners lines.
302
+ # This is because Package ownership knows that the fastest way to find code owners for package based ownership
303
+ # is to simply iterate over the packages and grab the owner, rather than iterating over each file just to get what package it is in
304
+ # In theory this means that we may generate code owners lines that cover files that are not in the passed in argument,
305
+ # but in practice this is not of consequence because in reality we never really want to generate code owners for only a
306
+ # subset of files, but rather we want code ownership for all files.
307
+ #
308
+ # source://code_ownership//lib/code_ownership/private/ownership_mappers/package_ownership.rb#54
309
+ sig { override.returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
310
+ def codeowners_lines_to_owners; end
311
+
312
+ # source://code_ownership//lib/code_ownership/private/ownership_mappers/package_ownership.rb#64
313
+ sig { override.returns(::String) }
314
+ def description; end
315
+
316
+ # source://code_ownership//lib/code_ownership/private/ownership_mappers/package_ownership.rb#18
317
+ sig { override.params(file: ::String).returns(T.nilable(::CodeTeams::Team)) }
318
+ def map_file_to_owner(file); end
319
+
320
+ # source://code_ownership//lib/code_ownership/private/ownership_mappers/package_ownership.rb#31
321
+ sig { override.params(files: T::Array[::String]).returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
322
+ def map_files_to_owners(files); end
323
+
324
+ # source://code_ownership//lib/code_ownership/private/ownership_mappers/package_ownership.rb#69
325
+ sig { params(package: ::Packs::Pack).returns(T.nilable(::CodeTeams::Team)) }
326
+ def owner_for_package(package); end
327
+ end
328
+
329
+ # source://code_ownership//lib/code_ownership/private/ownership_mappers/team_globs.rb#8
330
+ class CodeOwnership::Private::OwnershipMappers::TeamGlobs
331
+ include ::CodeOwnership::Private::OwnershipMappers::Interface
332
+
333
+ # source://code_ownership//lib/code_ownership/private/ownership_mappers/team_globs.rb#56
334
+ sig { override.void }
335
+ def bust_caches!; end
336
+
337
+ # source://code_ownership//lib/code_ownership/private/ownership_mappers/team_globs.rb#45
338
+ sig { override.returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
339
+ def codeowners_lines_to_owners; end
340
+
341
+ # source://code_ownership//lib/code_ownership/private/ownership_mappers/team_globs.rb#62
342
+ sig { override.returns(::String) }
343
+ def description; end
344
+
345
+ # source://code_ownership//lib/code_ownership/private/ownership_mappers/team_globs.rb#38
346
+ sig { override.params(file: ::String).returns(T.nilable(::CodeTeams::Team)) }
347
+ def map_file_to_owner(file); end
348
+
349
+ # source://code_ownership//lib/code_ownership/private/ownership_mappers/team_globs.rb#22
350
+ sig { override.params(files: T::Array[::String]).returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
351
+ def map_files_to_owners(files); end
352
+ end
353
+
354
+ # Modeled off of ParsePackwerk
355
+ #
356
+ # source://code_ownership//lib/code_ownership/private/parse_js_packages.rb#8
357
+ module CodeOwnership::Private::ParseJsPackages
358
+ class << self
359
+ # source://code_ownership//lib/code_ownership/private/parse_js_packages.rb#57
360
+ sig { returns(T::Array[::CodeOwnership::Private::ParseJsPackages::Package]) }
361
+ def all; end
362
+ end
363
+ end
364
+
365
+ # source://code_ownership//lib/code_ownership/private/parse_js_packages.rb#13
366
+ CodeOwnership::Private::ParseJsPackages::METADATA = T.let(T.unsafe(nil), String)
367
+
368
+ # source://code_ownership//lib/code_ownership/private/parse_js_packages.rb#12
369
+ CodeOwnership::Private::ParseJsPackages::PACKAGE_JSON_NAME = T.let(T.unsafe(nil), String)
370
+
371
+ # source://code_ownership//lib/code_ownership/private/parse_js_packages.rb#15
372
+ class CodeOwnership::Private::ParseJsPackages::Package < ::T::Struct
373
+ const :name, ::String
374
+ const :metadata, T::Hash[::String, T.untyped]
375
+
376
+ # source://code_ownership//lib/code_ownership/private/parse_js_packages.rb#48
377
+ sig { returns(::Pathname) }
378
+ def directory; end
379
+
380
+ class << self
381
+ # source://code_ownership//lib/code_ownership/private/parse_js_packages.rb#22
382
+ sig { params(pathname: ::Pathname).returns(::CodeOwnership::Private::ParseJsPackages::Package) }
383
+ def from(pathname); end
384
+
385
+ # source://sorbet-runtime/0.5.10588/lib/types/struct.rb#13
386
+ def inherited(s); end
387
+ end
388
+ end
389
+
390
+ # source://code_ownership//lib/code_ownership/private/parse_js_packages.rb#11
391
+ CodeOwnership::Private::ParseJsPackages::ROOT_PACKAGE_NAME = T.let(T.unsafe(nil), String)
392
+
393
+ # source://code_ownership//lib/code_ownership/private/team_plugins/ownership.rb#5
394
+ module CodeOwnership::Private::TeamPlugins; end
395
+
396
+ # source://code_ownership//lib/code_ownership/private/team_plugins/github.rb#6
397
+ class CodeOwnership::Private::TeamPlugins::Github < ::CodeTeams::Plugin
398
+ # source://code_ownership//lib/code_ownership/private/team_plugins/github.rb#13
399
+ sig { returns(::CodeOwnership::Private::TeamPlugins::Github::GithubStruct) }
400
+ def github; end
401
+ end
402
+
403
+ # source://code_ownership//lib/code_ownership/private/team_plugins/github.rb#10
404
+ class CodeOwnership::Private::TeamPlugins::Github::GithubStruct < ::Struct
405
+ # Returns the value of attribute do_not_add_to_codeowners_file
406
+ #
407
+ # @return [Object] the current value of do_not_add_to_codeowners_file
408
+ def do_not_add_to_codeowners_file; end
409
+
410
+ # Sets the attribute do_not_add_to_codeowners_file
411
+ #
412
+ # @param value [Object] the value to set the attribute do_not_add_to_codeowners_file to.
413
+ # @return [Object] the newly set value
414
+ #
415
+ # source://code_ownership//lib/code_ownership/private/team_plugins/github.rb#10
416
+ def do_not_add_to_codeowners_file=(_); end
417
+
418
+ # Returns the value of attribute team
419
+ #
420
+ # @return [Object] the current value of team
421
+ def team; end
422
+
423
+ # Sets the attribute team
424
+ #
425
+ # @param value [Object] the value to set the attribute team to.
426
+ # @return [Object] the newly set value
427
+ #
428
+ # source://code_ownership//lib/code_ownership/private/team_plugins/github.rb#10
429
+ def team=(_); end
430
+
431
+ class << self
432
+ def [](*_arg0); end
433
+ def inspect; end
434
+ def members; end
435
+ def new(*_arg0); end
436
+ end
437
+ end
438
+
439
+ # source://code_ownership//lib/code_ownership/private/team_plugins/ownership.rb#6
440
+ class CodeOwnership::Private::TeamPlugins::Ownership < ::CodeTeams::Plugin
441
+ # source://code_ownership//lib/code_ownership/private/team_plugins/ownership.rb#11
442
+ sig { returns(T::Array[::String]) }
443
+ def owned_globs; end
444
+ end
445
+
446
+ # source://code_ownership//lib/code_ownership/private/validations/interface.rb#5
447
+ module CodeOwnership::Private::Validations; end
448
+
449
+ # source://code_ownership//lib/code_ownership/private/validations/files_have_owners.rb#6
450
+ class CodeOwnership::Private::Validations::FilesHaveOwners
451
+ include ::CodeOwnership::Private::Validations::Interface
452
+
453
+ # source://code_ownership//lib/code_ownership/private/validations/files_have_owners.rb#12
454
+ sig do
455
+ override
456
+ .params(
457
+ files: T::Array[::String],
458
+ autocorrect: T::Boolean,
459
+ stage_changes: T::Boolean
460
+ ).returns(T::Array[::String])
461
+ end
462
+ def validation_errors(files:, autocorrect: T.unsafe(nil), stage_changes: T.unsafe(nil)); end
463
+ end
464
+
465
+ # source://code_ownership//lib/code_ownership/private/validations/files_have_unique_owners.rb#6
466
+ class CodeOwnership::Private::Validations::FilesHaveUniqueOwners
467
+ include ::CodeOwnership::Private::Validations::Interface
468
+
469
+ # source://code_ownership//lib/code_ownership/private/validations/files_have_unique_owners.rb#12
470
+ sig do
471
+ override
472
+ .params(
473
+ files: T::Array[::String],
474
+ autocorrect: T::Boolean,
475
+ stage_changes: T::Boolean
476
+ ).returns(T::Array[::String])
477
+ end
478
+ def validation_errors(files:, autocorrect: T.unsafe(nil), stage_changes: T.unsafe(nil)); end
479
+ end
480
+
481
+ # source://code_ownership//lib/code_ownership/private/validations/github_codeowners_up_to_date.rb#6
482
+ class CodeOwnership::Private::Validations::GithubCodeownersUpToDate
483
+ include ::CodeOwnership::Private::Validations::Interface
484
+
485
+ # source://code_ownership//lib/code_ownership/private/validations/github_codeowners_up_to_date.rb#12
486
+ sig do
487
+ override
488
+ .params(
489
+ files: T::Array[::String],
490
+ autocorrect: T::Boolean,
491
+ stage_changes: T::Boolean
492
+ ).returns(T::Array[::String])
493
+ end
494
+ def validation_errors(files:, autocorrect: T.unsafe(nil), stage_changes: T.unsafe(nil)); end
495
+
496
+ private
497
+
498
+ # Generate the contents of a CODEOWNERS file that GitHub can use to
499
+ # automatically assign reviewers
500
+ # https://help.github.com/articles/about-codeowners/
501
+ #
502
+ # source://code_ownership//lib/code_ownership/private/validations/github_codeowners_up_to_date.rb#100
503
+ sig { returns(T::Array[::String]) }
504
+ def codeowners_file_lines; end
505
+ end
506
+
507
+ # @abstract Subclasses must implement the `abstract` methods below.
508
+ #
509
+ # source://code_ownership//lib/code_ownership/private/validations/interface.rb#6
510
+ module CodeOwnership::Private::Validations::Interface
511
+ interface!
512
+
513
+ # @abstract
514
+ #
515
+ # source://code_ownership//lib/code_ownership/private/validations/interface.rb#13
516
+ sig do
517
+ abstract
518
+ .params(
519
+ files: T::Array[::String],
520
+ autocorrect: T::Boolean,
521
+ stage_changes: T::Boolean
522
+ ).returns(T::Array[::String])
523
+ end
524
+ def validation_errors(files:, autocorrect: T.unsafe(nil), stage_changes: T.unsafe(nil)); end
525
+ end
@@ -0,0 +1,111 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `packs` gem.
5
+ # Please instead update this file by running `bin/tapioca gem packs`.
6
+
7
+ # source://packs//lib/packs/pack.rb#3
8
+ module Packs
9
+ class << self
10
+ # source://packs//lib/packs.rb#16
11
+ sig { returns(T::Array[::Packs::Pack]) }
12
+ def all; end
13
+
14
+ # source://packs//lib/packs.rb#34
15
+ sig { void }
16
+ def bust_cache!; end
17
+
18
+ # source://packs//lib/packs.rb#41
19
+ sig { returns(::Packs::Private::Configuration) }
20
+ def config; end
21
+
22
+ # @yield [config]
23
+ #
24
+ # source://packs//lib/packs.rb#47
25
+ sig { params(blk: T.proc.params(arg0: ::Packs::Private::Configuration).void).void }
26
+ def configure(&blk); end
27
+
28
+ # source://packs//lib/packs.rb#21
29
+ sig { params(name: ::String).returns(T.nilable(::Packs::Pack)) }
30
+ def find(name); end
31
+
32
+ # source://packs//lib/packs.rb#26
33
+ sig { params(file_path: T.any(::Pathname, ::String)).returns(T.nilable(::Packs::Pack)) }
34
+ def for_file(file_path); end
35
+
36
+ private
37
+
38
+ # source://packs//lib/packs.rb#73
39
+ sig { returns(T::Array[::Pathname]) }
40
+ def package_glob_patterns; end
41
+
42
+ # source://packs//lib/packs.rb#59
43
+ sig { returns(T::Hash[::String, ::Packs::Pack]) }
44
+ def packs_by_name; end
45
+ end
46
+ end
47
+
48
+ # source://packs//lib/packs.rb#10
49
+ Packs::PACKAGE_FILE = T.let(T.unsafe(nil), String)
50
+
51
+ # source://packs//lib/packs/pack.rb#4
52
+ class Packs::Pack < ::T::Struct
53
+ const :name, ::String
54
+ const :path, ::Pathname
55
+ const :relative_path, ::Pathname
56
+ const :raw_hash, T::Hash[T.untyped, T.untyped]
57
+
58
+ # source://packs//lib/packs/pack.rb#34
59
+ sig { returns(::String) }
60
+ def last_name; end
61
+
62
+ # source://packs//lib/packs/pack.rb#39
63
+ sig { returns(T::Hash[T.untyped, T.untyped]) }
64
+ def metadata; end
65
+
66
+ # source://packs//lib/packs/pack.rb#28
67
+ sig { params(relative: T::Boolean).returns(::Pathname) }
68
+ def yml(relative: T.unsafe(nil)); end
69
+
70
+ class << self
71
+ # source://packs//lib/packs/pack.rb#13
72
+ sig { params(package_yml_absolute_path: ::Pathname).returns(::Packs::Pack) }
73
+ def from(package_yml_absolute_path); end
74
+
75
+ # source://sorbet-runtime/0.5.10588/lib/types/struct.rb#13
76
+ def inherited(s); end
77
+ end
78
+ end
79
+
80
+ # source://packs//lib/packs/private/configuration.rb#4
81
+ module Packs::Private
82
+ class << self
83
+ # source://packs//lib/packs/private.rb#10
84
+ sig { returns(::Pathname) }
85
+ def root; end
86
+ end
87
+ end
88
+
89
+ # source://packs//lib/packs/private/configuration.rb#5
90
+ class Packs::Private::Configuration < ::T::Struct
91
+ prop :pack_paths, T::Array[::String]
92
+
93
+ class << self
94
+ # source://packs//lib/packs/private/configuration.rb#17
95
+ sig { returns(::Packs::Private::Configuration) }
96
+ def fetch; end
97
+
98
+ # source://sorbet-runtime/0.5.10588/lib/types/struct.rb#13
99
+ def inherited(s); end
100
+
101
+ # source://packs//lib/packs/private/configuration.rb#26
102
+ sig { params(config_hash: T::Hash[T.untyped, T.untyped]).returns(T::Array[::String]) }
103
+ def pack_paths(config_hash); end
104
+ end
105
+ end
106
+
107
+ # source://packs//lib/packs/private/configuration.rb#7
108
+ Packs::Private::Configuration::CONFIGURATION_PATHNAME = T.let(T.unsafe(nil), Pathname)
109
+
110
+ # source://packs//lib/packs/private/configuration.rb#9
111
+ Packs::Private::Configuration::DEFAULT_PACK_PATHS = T.let(T.unsafe(nil), Array)
@@ -11,7 +11,7 @@ module ParsePackwerk
11
11
  sig { returns(T::Array[::ParsePackwerk::Package]) }
12
12
  def all; end
13
13
 
14
- # source://parse_packwerk//lib/parse_packwerk.rb#112
14
+ # source://parse_packwerk//lib/parse_packwerk.rb#110
15
15
  sig { void }
16
16
  def bust_cache!; end
17
17
 
@@ -36,7 +36,7 @@ module ParsePackwerk
36
36
  # We memoize packages_by_name for fast lookup.
37
37
  # Since Graph is an immutable value object, we can create indexes and general caching mechanisms safely.
38
38
  #
39
- # source://parse_packwerk//lib/parse_packwerk.rb#100
39
+ # source://parse_packwerk//lib/parse_packwerk.rb#98
40
40
  sig { returns(T::Hash[::String, ::ParsePackwerk::Package]) }
41
41
  def packages_by_name; end
42
42
  end
@@ -120,38 +120,39 @@ ParsePackwerk::PUBLIC_PATH = T.let(T.unsafe(nil), String)
120
120
  # source://parse_packwerk//lib/parse_packwerk/package.rb#4
121
121
  class ParsePackwerk::Package < ::T::Struct
122
122
  const :name, ::String
123
- const :enforce_dependencies, T::Boolean
124
- const :enforce_privacy, T::Boolean
123
+ const :enforce_dependencies, T.any(::String, T::Boolean)
124
+ const :enforce_privacy, T.any(::String, T::Boolean)
125
125
  const :public_path, ::String, default: T.unsafe(nil)
126
126
  const :metadata, T::Hash[T.untyped, T.untyped]
127
127
  const :dependencies, T::Array[::String]
128
+ const :config, T::Hash[T.untyped, T.untyped]
128
129
 
129
- # source://parse_packwerk//lib/parse_packwerk/package.rb#35
130
+ # source://parse_packwerk//lib/parse_packwerk/package.rb#37
130
131
  sig { returns(::Pathname) }
131
132
  def directory; end
132
133
 
133
- # source://parse_packwerk//lib/parse_packwerk/package.rb#45
134
- sig { returns(T::Boolean) }
134
+ # source://parse_packwerk//lib/parse_packwerk/package.rb#47
135
+ sig { returns(T.any(::String, T::Boolean)) }
135
136
  def enforces_dependencies?; end
136
137
 
137
- # source://parse_packwerk//lib/parse_packwerk/package.rb#50
138
- sig { returns(T::Boolean) }
138
+ # source://parse_packwerk//lib/parse_packwerk/package.rb#52
139
+ sig { returns(T.any(::String, T::Boolean)) }
139
140
  def enforces_privacy?; end
140
141
 
141
- # source://parse_packwerk//lib/parse_packwerk/package.rb#40
142
+ # source://parse_packwerk//lib/parse_packwerk/package.rb#42
142
143
  sig { returns(::Pathname) }
143
144
  def public_directory; end
144
145
 
145
- # source://parse_packwerk//lib/parse_packwerk/package.rb#55
146
+ # source://parse_packwerk//lib/parse_packwerk/package.rb#57
146
147
  sig { returns(T::Array[::ParsePackwerk::Violation]) }
147
148
  def violations; end
148
149
 
149
- # source://parse_packwerk//lib/parse_packwerk/package.rb#30
150
+ # source://parse_packwerk//lib/parse_packwerk/package.rb#32
150
151
  sig { returns(::Pathname) }
151
152
  def yml; end
152
153
 
153
154
  class << self
154
- # source://parse_packwerk//lib/parse_packwerk/package.rb#15
155
+ # source://parse_packwerk//lib/parse_packwerk/package.rb#16
155
156
  sig { params(pathname: ::Pathname).returns(::ParsePackwerk::Package) }
156
157
  def from(pathname); end
157
158
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: danger-packwerk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gusto Engineers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-20 00:00:00.000000000 Z
11
+ date: 2022-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: code_ownership
@@ -223,7 +223,7 @@ files:
223
223
  - sorbet/rbi/gems/builder@3.2.4.rbi
224
224
  - sorbet/rbi/gems/claide-plugins@0.9.2.rbi
225
225
  - sorbet/rbi/gems/claide@1.1.0.rbi
226
- - sorbet/rbi/gems/code_ownership@1.29.1.rbi
226
+ - sorbet/rbi/gems/code_ownership@1.29.2.rbi
227
227
  - sorbet/rbi/gems/code_teams@1.0.0.rbi
228
228
  - sorbet/rbi/gems/coderay@1.1.3.rbi
229
229
  - sorbet/rbi/gems/colored2@3.1.2.rbi
@@ -260,9 +260,10 @@ files:
260
260
  - sorbet/rbi/gems/nokogiri@1.13.8.rbi
261
261
  - sorbet/rbi/gems/octokit@5.6.1.rbi
262
262
  - sorbet/rbi/gems/open4@1.3.4.rbi
263
+ - sorbet/rbi/gems/packs@0.0.5.rbi
263
264
  - sorbet/rbi/gems/packwerk@2.2.1-e998ef65194de398f0baaf03a0ba33390b30351e.rbi
264
265
  - sorbet/rbi/gems/parallel@1.22.1.rbi
265
- - sorbet/rbi/gems/parse_packwerk@0.16.0.rbi
266
+ - sorbet/rbi/gems/parse_packwerk@0.18.0.rbi
266
267
  - sorbet/rbi/gems/parser@3.1.2.1.rbi
267
268
  - sorbet/rbi/gems/pry@0.14.1.rbi
268
269
  - sorbet/rbi/gems/public_suffix@5.0.0.rbi
@@ -1,336 +0,0 @@
1
- # typed: true
2
-
3
- # DO NOT EDIT MANUALLY
4
- # This is an autogenerated file for types exported from the `code_ownership` gem.
5
- # Please instead update this file by running `bin/tapioca gem code_ownership`.
6
-
7
- module CodeOwnership
8
- extend ::CodeOwnership
9
-
10
- requires_ancestor { Kernel }
11
-
12
- sig do
13
- params(
14
- backtrace: T.nilable(T::Array[::String]),
15
- excluded_teams: T::Array[::CodeTeams::Team]
16
- ).returns(T.nilable(::CodeTeams::Team))
17
- end
18
- def for_backtrace(backtrace, excluded_teams: T.unsafe(nil)); end
19
-
20
- sig { params(klass: T.nilable(T.any(::Class, ::Module))).returns(T.nilable(::CodeTeams::Team)) }
21
- def for_class(klass); end
22
-
23
- sig { params(file: ::String).returns(T.nilable(::CodeTeams::Team)) }
24
- def for_file(file); end
25
-
26
- sig { params(package: ::ParsePackwerk::Package).returns(T.nilable(::CodeTeams::Team)) }
27
- def for_package(package); end
28
-
29
- sig { params(team: T.any(::CodeTeams::Team, ::String)).returns(::String) }
30
- def for_team(team); end
31
-
32
- sig { params(files: T::Array[::String], autocorrect: T::Boolean, stage_changes: T::Boolean).void }
33
- def validate!(files: T.unsafe(nil), autocorrect: T.unsafe(nil), stage_changes: T.unsafe(nil)); end
34
-
35
- class << self
36
- sig { void }
37
- def bust_caches!; end
38
-
39
- sig { params(filename: ::String).void }
40
- def remove_file_annotation!(filename); end
41
- end
42
- end
43
-
44
- class CodeOwnership::Cli
45
- class << self
46
- def for_file(argv); end
47
- def for_team(argv); end
48
- def run!(argv); end
49
-
50
- private
51
-
52
- def validate!(argv); end
53
- end
54
- end
55
-
56
- class CodeOwnership::InvalidCodeOwnershipConfigurationError < ::StandardError; end
57
-
58
- module CodeOwnership::Private
59
- class << self
60
- sig { void }
61
- def bust_caches!; end
62
-
63
- sig { returns(::CodeOwnership::Private::Configuration) }
64
- def configuration; end
65
-
66
- sig { returns(::CodeOwnership::Private::OwnershipMappers::FileAnnotations) }
67
- def file_annotations_mapper; end
68
-
69
- sig { params(files: T::Array[::String]).returns(T::Hash[::String, T::Array[::String]]) }
70
- def files_by_mapper(files); end
71
-
72
- sig { params(team_name: ::String, location_of_reference: ::String).returns(::CodeTeams::Team) }
73
- def find_team!(team_name, location_of_reference); end
74
-
75
- sig { returns(T::Array[::CodeOwnership::Private::OwnershipMappers::Interface]) }
76
- def mappers; end
77
-
78
- sig { params(klass: T.nilable(T.any(::Class, ::Module))).returns(T.nilable(::String)) }
79
- def path_from_klass(klass); end
80
-
81
- sig { returns(T::Array[::String]) }
82
- def tracked_files; end
83
-
84
- sig { params(files: T::Array[::String], autocorrect: T::Boolean, stage_changes: T::Boolean).void }
85
- def validate!(files:, autocorrect: T.unsafe(nil), stage_changes: T.unsafe(nil)); end
86
- end
87
- end
88
-
89
- class CodeOwnership::Private::Configuration < ::T::Struct
90
- const :js_package_paths, T::Array[::String]
91
- const :owned_globs, T::Array[::String]
92
- const :skip_codeowners_validation, T::Boolean
93
- const :unowned_globs, T::Array[::String]
94
-
95
- class << self
96
- sig { returns(::CodeOwnership::Private::Configuration) }
97
- def fetch; end
98
-
99
- def inherited(s); end
100
-
101
- sig { params(config_hash: T::Hash[T.untyped, T.untyped]).returns(T::Array[::String]) }
102
- def js_package_paths(config_hash); end
103
- end
104
- end
105
-
106
- CodeOwnership::Private::Configuration::DEFAULT_JS_PACKAGE_PATHS = T.let(T.unsafe(nil), Array)
107
- module CodeOwnership::Private::OwnershipMappers; end
108
-
109
- class CodeOwnership::Private::OwnershipMappers::FileAnnotations
110
- include ::CodeOwnership::Private::OwnershipMappers::Interface
111
-
112
- sig { override.void }
113
- def bust_caches!; end
114
-
115
- sig { override.returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
116
- def codeowners_lines_to_owners; end
117
-
118
- sig { override.returns(::String) }
119
- def description; end
120
-
121
- sig { params(filename: ::String).returns(T.nilable(::CodeTeams::Team)) }
122
- def file_annotation_based_owner(filename); end
123
-
124
- sig { override.params(file: ::String).returns(T.nilable(::CodeTeams::Team)) }
125
- def map_file_to_owner(file); end
126
-
127
- sig { override.params(files: T::Array[::String]).returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
128
- def map_files_to_owners(files); end
129
-
130
- sig { params(filename: ::String).void }
131
- def remove_file_annotation!(filename); end
132
- end
133
-
134
- CodeOwnership::Private::OwnershipMappers::FileAnnotations::TEAM_PATTERN = T.let(T.unsafe(nil), Regexp)
135
-
136
- module CodeOwnership::Private::OwnershipMappers::Interface
137
- interface!
138
-
139
- sig { abstract.void }
140
- def bust_caches!; end
141
-
142
- sig { abstract.returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
143
- def codeowners_lines_to_owners; end
144
-
145
- sig { abstract.returns(::String) }
146
- def description; end
147
-
148
- sig { abstract.params(file: ::String).returns(T.nilable(::CodeTeams::Team)) }
149
- def map_file_to_owner(file); end
150
-
151
- sig { abstract.params(files: T::Array[::String]).returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
152
- def map_files_to_owners(files); end
153
- end
154
-
155
- class CodeOwnership::Private::OwnershipMappers::JsPackageOwnership
156
- include ::CodeOwnership::Private::OwnershipMappers::Interface
157
-
158
- sig { override.void }
159
- def bust_caches!; end
160
-
161
- sig { override.returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
162
- def codeowners_lines_to_owners; end
163
-
164
- sig { override.returns(::String) }
165
- def description; end
166
-
167
- sig { override.params(file: ::String).returns(T.nilable(::CodeTeams::Team)) }
168
- def map_file_to_owner(file); end
169
-
170
- sig { override.params(files: T::Array[::String]).returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
171
- def map_files_to_owners(files); end
172
-
173
- sig { params(package: ::CodeOwnership::Private::ParseJsPackages::Package).returns(T.nilable(::CodeTeams::Team)) }
174
- def owner_for_package(package); end
175
-
176
- private
177
-
178
- sig { params(file: ::String).returns(T.nilable(::CodeOwnership::Private::ParseJsPackages::Package)) }
179
- def map_file_to_relevant_package(file); end
180
- end
181
-
182
- class CodeOwnership::Private::OwnershipMappers::PackageOwnership
183
- include ::CodeOwnership::Private::OwnershipMappers::Interface
184
-
185
- sig { override.void }
186
- def bust_caches!; end
187
-
188
- sig { override.returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
189
- def codeowners_lines_to_owners; end
190
-
191
- sig { override.returns(::String) }
192
- def description; end
193
-
194
- sig { override.params(file: ::String).returns(T.nilable(::CodeTeams::Team)) }
195
- def map_file_to_owner(file); end
196
-
197
- sig { override.params(files: T::Array[::String]).returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
198
- def map_files_to_owners(files); end
199
-
200
- sig { params(package: ::ParsePackwerk::Package).returns(T.nilable(::CodeTeams::Team)) }
201
- def owner_for_package(package); end
202
- end
203
-
204
- class CodeOwnership::Private::OwnershipMappers::TeamGlobs
205
- include ::CodeOwnership::Private::OwnershipMappers::Interface
206
-
207
- sig { override.void }
208
- def bust_caches!; end
209
-
210
- sig { override.returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
211
- def codeowners_lines_to_owners; end
212
-
213
- sig { override.returns(::String) }
214
- def description; end
215
-
216
- sig { override.params(file: ::String).returns(T.nilable(::CodeTeams::Team)) }
217
- def map_file_to_owner(file); end
218
-
219
- sig { override.params(files: T::Array[::String]).returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
220
- def map_files_to_owners(files); end
221
- end
222
-
223
- module CodeOwnership::Private::ParseJsPackages
224
- class << self
225
- sig { returns(T::Array[::CodeOwnership::Private::ParseJsPackages::Package]) }
226
- def all; end
227
- end
228
- end
229
-
230
- CodeOwnership::Private::ParseJsPackages::METADATA = T.let(T.unsafe(nil), String)
231
- CodeOwnership::Private::ParseJsPackages::PACKAGE_JSON_NAME = T.let(T.unsafe(nil), String)
232
-
233
- class CodeOwnership::Private::ParseJsPackages::Package < ::T::Struct
234
- const :metadata, T::Hash[::String, T.untyped]
235
- const :name, ::String
236
-
237
- sig { returns(::Pathname) }
238
- def directory; end
239
-
240
- class << self
241
- sig { params(pathname: ::Pathname).returns(::CodeOwnership::Private::ParseJsPackages::Package) }
242
- def from(pathname); end
243
-
244
- def inherited(s); end
245
- end
246
- end
247
-
248
- CodeOwnership::Private::ParseJsPackages::ROOT_PACKAGE_NAME = T.let(T.unsafe(nil), String)
249
- module CodeOwnership::Private::TeamPlugins; end
250
-
251
- class CodeOwnership::Private::TeamPlugins::Github < ::CodeTeams::Plugin
252
- sig { returns(::CodeOwnership::Private::TeamPlugins::Github::GithubStruct) }
253
- def github; end
254
- end
255
-
256
- class CodeOwnership::Private::TeamPlugins::Github::GithubStruct < ::Struct
257
- def do_not_add_to_codeowners_file; end
258
- def do_not_add_to_codeowners_file=(_); end
259
- def team; end
260
- def team=(_); end
261
-
262
- class << self
263
- def [](*_arg0); end
264
- def inspect; end
265
- def members; end
266
- def new(*_arg0); end
267
- end
268
- end
269
-
270
- class CodeOwnership::Private::TeamPlugins::Ownership < ::CodeTeams::Plugin
271
- sig { returns(T::Array[::String]) }
272
- def owned_globs; end
273
- end
274
-
275
- module CodeOwnership::Private::Validations; end
276
-
277
- class CodeOwnership::Private::Validations::FilesHaveOwners
278
- include ::CodeOwnership::Private::Validations::Interface
279
-
280
- sig do
281
- override
282
- .params(
283
- files: T::Array[::String],
284
- autocorrect: T::Boolean,
285
- stage_changes: T::Boolean
286
- ).returns(T::Array[::String])
287
- end
288
- def validation_errors(files:, autocorrect: T.unsafe(nil), stage_changes: T.unsafe(nil)); end
289
- end
290
-
291
- class CodeOwnership::Private::Validations::FilesHaveUniqueOwners
292
- include ::CodeOwnership::Private::Validations::Interface
293
-
294
- sig do
295
- override
296
- .params(
297
- files: T::Array[::String],
298
- autocorrect: T::Boolean,
299
- stage_changes: T::Boolean
300
- ).returns(T::Array[::String])
301
- end
302
- def validation_errors(files:, autocorrect: T.unsafe(nil), stage_changes: T.unsafe(nil)); end
303
- end
304
-
305
- class CodeOwnership::Private::Validations::GithubCodeownersUpToDate
306
- include ::CodeOwnership::Private::Validations::Interface
307
-
308
- sig do
309
- override
310
- .params(
311
- files: T::Array[::String],
312
- autocorrect: T::Boolean,
313
- stage_changes: T::Boolean
314
- ).returns(T::Array[::String])
315
- end
316
- def validation_errors(files:, autocorrect: T.unsafe(nil), stage_changes: T.unsafe(nil)); end
317
-
318
- private
319
-
320
- sig { returns(T::Array[::String]) }
321
- def codeowners_file_lines; end
322
- end
323
-
324
- module CodeOwnership::Private::Validations::Interface
325
- interface!
326
-
327
- sig do
328
- abstract
329
- .params(
330
- files: T::Array[::String],
331
- autocorrect: T::Boolean,
332
- stage_changes: T::Boolean
333
- ).returns(T::Array[::String])
334
- end
335
- def validation_errors(files:, autocorrect: T.unsafe(nil), stage_changes: T.unsafe(nil)); end
336
- end