Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MapToActorRole ¶
MapToActorRole upgrades currentRole based on the OWNERS role. An approver gets at least write; a reviewer gets at least triage. Never downgrades — if the collaborator API already granted a higher role, it is preserved.
Types ¶
type Role ¶
type Role int
Role is the OWNERS-file role for a resolved user.
func Resolve ¶
Resolve checks whether username appears in the OWNERS file at ownersPath (directly or via aliases in aliasesPath). Returns RoleApprover if the user is an approver, RoleReviewer if only a reviewer, or RoleNone if not listed. Matching is case-insensitive.
A missing OWNERS file returns an error. A missing OWNERS_ALIASES file is not an error — alias resolution is skipped. A malformed OWNERS_ALIASES file is an error: without it, alias keys cannot be told apart from logins.