pack_stats 0.0.3 → 0.0.5
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/README.md +6 -16
- data/lib/pack_stats/gauge_metric.rb +13 -1
- data/lib/pack_stats.rb +17 -4
- metadata +2 -13
- data/sorbet/config +0 -4
- data/sorbet/rbi/gems/ast@2.4.2.rbi +0 -584
- data/sorbet/rbi/gems/code_ownership@1.29.2.rbi +0 -525
- data/sorbet/rbi/gems/code_teams@1.0.0.rbi +0 -120
- data/sorbet/rbi/gems/dogapi@1.45.0.rbi +0 -551
- data/sorbet/rbi/gems/manual.rbi +0 -4
- data/sorbet/rbi/gems/packs@0.0.5.rbi +0 -111
- data/sorbet/rbi/gems/parse_packwerk@0.16.0.rbi +0 -224
- data/sorbet/rbi/gems/rspec@3.10.0.rbi +0 -13
- data/sorbet/rbi/gems/rubocop-packs@0.0.30.rbi +0 -272
- data/sorbet/rbi/todo.rbi +0 -5
@@ -1,525 +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
|
-
# 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 :js_package_paths, T::Array[::String]
|
135
|
-
const :owned_globs, T::Array[::String]
|
136
|
-
const :skip_codeowners_validation, T::Boolean
|
137
|
-
const :unowned_globs, T::Array[::String]
|
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.9924/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 :metadata, T::Hash[::String, T.untyped]
|
374
|
-
const :name, ::String
|
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.9924/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
|
@@ -1,120 +0,0 @@
|
|
1
|
-
# typed: true
|
2
|
-
|
3
|
-
# DO NOT EDIT MANUALLY
|
4
|
-
# This is an autogenerated file for types exported from the `code_teams` gem.
|
5
|
-
# Please instead update this file by running `bin/tapioca gem code_teams`.
|
6
|
-
|
7
|
-
module CodeTeams
|
8
|
-
class << self
|
9
|
-
sig { returns(T::Array[::CodeTeams::Team]) }
|
10
|
-
def all; end
|
11
|
-
|
12
|
-
sig { void }
|
13
|
-
def bust_caches!; end
|
14
|
-
|
15
|
-
sig { params(name: ::String).returns(T.nilable(::CodeTeams::Team)) }
|
16
|
-
def find(name); end
|
17
|
-
|
18
|
-
sig { params(dir: ::String).returns(T::Array[::CodeTeams::Team]) }
|
19
|
-
def for_directory(dir); end
|
20
|
-
|
21
|
-
sig { params(string: ::String).returns(::String) }
|
22
|
-
def tag_value_for(string); end
|
23
|
-
|
24
|
-
sig { params(teams: T::Array[::CodeTeams::Team]).returns(T::Array[::String]) }
|
25
|
-
def validation_errors(teams); end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
class CodeTeams::IncorrectPublicApiUsageError < ::StandardError; end
|
30
|
-
|
31
|
-
class CodeTeams::Plugin
|
32
|
-
abstract!
|
33
|
-
|
34
|
-
sig { params(team: ::CodeTeams::Team).void }
|
35
|
-
def initialize(team); end
|
36
|
-
|
37
|
-
class << self
|
38
|
-
sig { returns(T::Array[T.class_of(CodeTeams::Plugin)]) }
|
39
|
-
def all_plugins; end
|
40
|
-
|
41
|
-
sig { params(team: ::CodeTeams::Team).returns(T.attached_class) }
|
42
|
-
def for(team); end
|
43
|
-
|
44
|
-
sig { params(base: T.untyped).void }
|
45
|
-
def inherited(base); end
|
46
|
-
|
47
|
-
sig { params(team: ::CodeTeams::Team, key: ::String).returns(::String) }
|
48
|
-
def missing_key_error_message(team, key); end
|
49
|
-
|
50
|
-
sig { params(teams: T::Array[::CodeTeams::Team]).returns(T::Array[::String]) }
|
51
|
-
def validation_errors(teams); end
|
52
|
-
|
53
|
-
private
|
54
|
-
|
55
|
-
sig { params(team: ::CodeTeams::Team).returns(T.attached_class) }
|
56
|
-
def register_team(team); end
|
57
|
-
|
58
|
-
sig { returns(T::Hash[T.nilable(::String), T::Hash[::Class, ::CodeTeams::Plugin]]) }
|
59
|
-
def registry; end
|
60
|
-
end
|
61
|
-
end
|
62
|
-
|
63
|
-
module CodeTeams::Plugins; end
|
64
|
-
|
65
|
-
class CodeTeams::Plugins::Identity < ::CodeTeams::Plugin
|
66
|
-
sig { returns(::CodeTeams::Plugins::Identity::IdentityStruct) }
|
67
|
-
def identity; end
|
68
|
-
|
69
|
-
class << self
|
70
|
-
sig { override.params(teams: T::Array[::CodeTeams::Team]).returns(T::Array[::String]) }
|
71
|
-
def validation_errors(teams); end
|
72
|
-
end
|
73
|
-
end
|
74
|
-
|
75
|
-
class CodeTeams::Plugins::Identity::IdentityStruct < ::Struct
|
76
|
-
def name; end
|
77
|
-
def name=(_); end
|
78
|
-
|
79
|
-
class << self
|
80
|
-
def [](*_arg0); end
|
81
|
-
def inspect; end
|
82
|
-
def members; end
|
83
|
-
def new(*_arg0); end
|
84
|
-
end
|
85
|
-
end
|
86
|
-
|
87
|
-
class CodeTeams::Team
|
88
|
-
sig { params(config_yml: T.nilable(::String), raw_hash: T::Hash[T.untyped, T.untyped]).void }
|
89
|
-
def initialize(config_yml:, raw_hash:); end
|
90
|
-
|
91
|
-
sig { params(other: ::Object).returns(T::Boolean) }
|
92
|
-
def ==(other); end
|
93
|
-
|
94
|
-
sig { returns(T.nilable(::String)) }
|
95
|
-
def config_yml; end
|
96
|
-
|
97
|
-
def eql?(*args, &blk); end
|
98
|
-
|
99
|
-
sig { returns(::Integer) }
|
100
|
-
def hash; end
|
101
|
-
|
102
|
-
sig { returns(::String) }
|
103
|
-
def name; end
|
104
|
-
|
105
|
-
sig { returns(T::Hash[T.untyped, T.untyped]) }
|
106
|
-
def raw_hash; end
|
107
|
-
|
108
|
-
sig { returns(::String) }
|
109
|
-
def to_tag; end
|
110
|
-
|
111
|
-
class << self
|
112
|
-
sig { params(raw_hash: T::Hash[T.untyped, T.untyped]).returns(::CodeTeams::Team) }
|
113
|
-
def from_hash(raw_hash); end
|
114
|
-
|
115
|
-
sig { params(config_yml: ::String).returns(::CodeTeams::Team) }
|
116
|
-
def from_yml(config_yml); end
|
117
|
-
end
|
118
|
-
end
|
119
|
-
|
120
|
-
CodeTeams::UNKNOWN_TEAM_STRING = T.let(T.unsafe(nil), String)
|