Skip to main content

Class: CodeOwners

@pvm/cowners.CodeOwners

Constructors

constructor

• new CodeOwners(codeOwners)

Parameters

NameType
codeOwnersstring

Defined in

packages/pvm-cowners/lib/cowners.ts:162

Properties

groups

• groups: OwnersGroup[]

Defined in

packages/pvm-cowners/lib/cowners.ts:160

Methods

affectedGroups

â–¸ affectedGroups(paths): IterableIterator<OwnersGroup>

Returns OwnersGroups which related to given paths

Parameters

NameType
pathsstring[]

Returns

IterableIterator<OwnersGroup>

Defined in

packages/pvm-cowners/lib/cowners.ts:172


getGroups

â–¸ getGroups(): OwnersGroup[]

Returns all OwnersGroups which has been parsed

Returns

OwnersGroup[]

Defined in

packages/pvm-cowners/lib/cowners.ts:167


getMajority

â–¸ getMajority(paths, opts?): string[]

Get majority of owners required for review merge request. For each mask majority is Math.ceil(owners_for_mask / 2)

Parameters

NameType
pathsstring[]
optsCalcMajorityOpts

Returns

string[]

Defined in

packages/pvm-cowners/lib/cowners.ts:185


getOwners

â–¸ getOwners(paths): string[]

Get all owners for given paths

Parameters

NameType
pathsstring[]

Returns

string[]

Defined in

packages/pvm-cowners/lib/cowners.ts:177


groupOwnersByPattern

â–¸ groupOwnersByPattern(paths): Record<string, string[]>

Get all owners for given paths and group by filename patterns

Parameters

NameType
pathsstring[]

Returns

Record<string, string[]>

Defined in

packages/pvm-cowners/lib/cowners.ts:190