Class: CodeOwners
@pvm/cowners.CodeOwners
Constructors
constructor
• new CodeOwners(codeOwners
)
Parameters
Name | Type |
---|---|
codeOwners | string |
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
Name | Type |
---|---|
paths | string [] |
Returns
IterableIterator
<OwnersGroup
>
Defined in
packages/pvm-cowners/lib/cowners.ts:172
getGroups
â–¸ getGroups(): OwnersGroup
[]
Returns all OwnersGroups which has been parsed
Returns
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
Name | Type |
---|---|
paths | string [] |
opts | CalcMajorityOpts |
Returns
string
[]
Defined in
packages/pvm-cowners/lib/cowners.ts:185
getOwners
â–¸ getOwners(paths
): string
[]
Get all owners for given paths
Parameters
Name | Type |
---|---|
paths | string [] |
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
Name | Type |
---|---|
paths | string [] |
Returns
Record
<string
, string
[]>