Documentation
¶
Index ¶
- type Cache
- type RepoBranch
- type RepoOwner
- type RepoOwnerInfo
- func (o *RepoOwnerInfo) AllReviewers() sets.String
- func (o *RepoOwnerInfo) Approvers(path string) sets.String
- func (o *RepoOwnerInfo) FindApproverOwnersForFile(path string) string
- func (o *RepoOwnerInfo) FindReviewersOwnersForFile(path string) string
- func (o *RepoOwnerInfo) IsNoParentOwners(path string) bool
- func (o *RepoOwnerInfo) LeafApprovers(path string) sets.String
- func (o *RepoOwnerInfo) LeafReviewers(path string) sets.String
- func (o *RepoOwnerInfo) Reviewers(path string) sets.String
- func (o *RepoOwnerInfo) TopLevelApprovers() sets.String
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func (*Cache) LoadRepoOwners ¶
func (c *Cache) LoadRepoOwners(b RepoBranch) (RepoOwner, error)
func (*Cache) SyncPerDay ¶
type RepoBranch ¶
type RepoOwner ¶
type RepoOwner interface {
FindApproverOwnersForFile(path string) string
FindReviewersOwnersForFile(path string) string
LeafApprovers(path string) sets.String
Approvers(path string) sets.String
LeafReviewers(path string) sets.String
Reviewers(path string) sets.String
IsNoParentOwners(path string) bool
AllReviewers() sets.String
TopLevelApprovers() sets.String
}
RepoOwner is an interface to work with repoowners
type RepoOwnerInfo ¶
type RepoOwnerInfo struct {
// contains filtered or unexported fields
}
func (*RepoOwnerInfo) AllReviewers ¶
func (o *RepoOwnerInfo) AllReviewers() sets.String
AllReviewers gets all reviewers including approvers.
func (*RepoOwnerInfo) Approvers ¶
func (o *RepoOwnerInfo) Approvers(path string) sets.String
Approvers returns ALL of the users who are approvers for the requested file (including approvers in parent dirs' OWNERS). If pkg/OWNERS has user1 and pkg/util/OWNERS has user2 this will return both user1 and user2 for the path pkg/util/sets/file.go
func (*RepoOwnerInfo) FindApproverOwnersForFile ¶
func (o *RepoOwnerInfo) FindApproverOwnersForFile(path string) string
FindApproverOwnersForFile returns the OWNERS file path furthest down the tree for a specified file that contains an approvers section
func (*RepoOwnerInfo) FindReviewersOwnersForFile ¶
func (o *RepoOwnerInfo) FindReviewersOwnersForFile(path string) string
FindReviewersOwnersForFile returns the OWNERS file path furthest down the tree for a specified file that contains a reviewers section
func (*RepoOwnerInfo) IsNoParentOwners ¶
func (o *RepoOwnerInfo) IsNoParentOwners(path string) bool
IsNoParentOwners checks if an OWNERS file path refers to an OWNERS file with NoParentOwners enabled.
func (*RepoOwnerInfo) LeafApprovers ¶
func (o *RepoOwnerInfo) LeafApprovers(path string) sets.String
LeafApprovers returns a set of users who are the closest approvers to the requested file. If pkg/OWNERS has user1 and pkg/util/OWNERS has user2 this will only return user2 for the path pkg/util/sets/file.go
func (*RepoOwnerInfo) LeafReviewers ¶
func (o *RepoOwnerInfo) LeafReviewers(path string) sets.String
LeafReviewers returns a set of users who are the closest reviewers to the requested file. If pkg/OWNERS has user1 and pkg/util/OWNERS has user2 this will only return user2 for the path pkg/util/sets/file.go
func (*RepoOwnerInfo) Reviewers ¶
func (o *RepoOwnerInfo) Reviewers(path string) sets.String
Reviewers returns ALL of the users who are reviewers for the requested file (including reviewers in parent dirs' OWNERS). If pkg/OWNERS has user1 and pkg/util/OWNERS has user2 this will return both user1 and user2 for the path pkg/util/sets/file.go
func (*RepoOwnerInfo) TopLevelApprovers ¶
func (o *RepoOwnerInfo) TopLevelApprovers() sets.String
TopLevelApprovers gets the approvers at directory of '.'.