Documentation menu

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.

View source on GitHub

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


The name of the code owner.

owner_type


The type of the owner (USERNAME, TEAM, EMAIL).

owner_value


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.

View source on GitHub

Returns

from_parser

Create a list of CodeOwner objects from a CodeOwnersParser.

View source on GitHub

Parameters

parserrequired

The CodeOwnersParser to use.

file_sourcerequired

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.

View source on GitHub

Returns

get_export

Get an export by name in files container (supports only typescript).

View source on GitHub

Returns

get_function

Get a function by name in files container.

View source on GitHub

Returns

get_global_var

Get a global variable by name in files container.

View source on GitHub

Returns

get_import

Get an import by name in files container.

View source on GitHub

Returns

get_import_statement

Get an import statement by name in files container.

View source on GitHub

Returns

get_symbol

Get a symbol by name in files container.

View source on GitHub

Returns