CodeOwner
CodeOwner is a class that represents a code owner in a codebase. It is used to iterate over all files that are owned by a specific owner.
Attributes
classes
Get a recursive list of all classes in files container.
exports
Get a recursive list of all exports in files container.
files_source
A callable that returns an iterable of all files in the codebase.
functions
Get a recursive list of all functions in files container.
global_vars
Get a recursive list of all global variables in files container.
import_statements
Get a recursive list of all import statements in files container.
imports
Get a recursive list of all imports in files container.
name
str
The name of the code owner.
owner_type
Literal[USERNAME, TEAM, EMAIL]
The type of the owner (USERNAME, TEAM, EMAIL).
owner_value
str
The value of the owner.
symbols
Get a recursive list of all symbols in files container.
Methods
files
Recursively iterate over all files in the codebase that are owned by the current code owner.
Returns
Iterable[TFile]
from_parser
Create a list of CodeOwner objects from a CodeOwnersParser.
Parameters
CodeOwnersParser
The CodeOwnersParser to use.
A callable that returns an iterable of all files in the codebase.
Returns
A list of CodeOwner objects.
get_class
Get a class by name in files container.
Returns
get_export
Get an export by name in files container (supports only typescript).
Returns
get_function
Get a function by name in files container.
Returns
get_global_var
Get a global variable by name in files container.
Returns
get_import
Get an import by name in files container.
Returns
get_import_statement
Get an import statement by name in files container.
Returns
get_symbol
Get a symbol by name in files container.