Documentation
¶
Index ¶
- type Client
- type Config
- type RepoAliases
- type RepoOwners
- func (o *RepoOwners) Approvers(path string) sets.String
- func (o *RepoOwners) FindApproverOwnersForFile(path string) string
- func (o *RepoOwners) FindLabelsForFile(path string) sets.String
- func (o *RepoOwners) FindReviewersOwnersForFile(path string) string
- func (o *RepoOwners) IsNoParentOwners(path string) bool
- func (o *RepoOwners) LeafApprovers(path string) sets.String
- func (o *RepoOwners) LeafReviewers(path string) sets.String
- func (o *RepoOwners) Reviewers(path string) sets.String
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) LoadRepoAliases ¶
func (c *Client) LoadRepoAliases(org, repo, base string) (RepoAliases, error)
LoadRepoAliases returns an up-to-date RepoAliases struct for the specified repo. If the repo does not have an aliases file then an empty alias map is returned with no error. Note: The returned RepoAliases should be treated as read only.
func (*Client) LoadRepoOwners ¶
func (c *Client) LoadRepoOwners(org, repo, base string) (*RepoOwners, error)
LoadRepoOwners returns an up-to-date RepoOwners struct for the specified repo. Note: The returned *RepoOwners should be treated as read only.
type RepoAliases ¶
func (RepoAliases) ExpandAlias ¶
func (a RepoAliases) ExpandAlias(alias string) sets.String
func (RepoAliases) ExpandAliases ¶
func (a RepoAliases) ExpandAliases(logins sets.String) sets.String
type RepoOwners ¶
type RepoOwners struct { RepoAliases // contains filtered or unexported fields }
func (*RepoOwners) Approvers ¶
func (o *RepoOwners) 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 (*RepoOwners) FindApproverOwnersForFile ¶
func (o *RepoOwners) FindApproverOwnersForFile(path string) string
FindApproversOwnersForFile returns the OWNERS file path furthest down the tree for a specified file that contains an approvers section
func (*RepoOwners) FindLabelsForFile ¶
func (o *RepoOwners) FindLabelsForFile(path string) sets.String
FindLabelsForFile returns a set of labels which should be applied to PRs modifying files under the given path.
func (*RepoOwners) FindReviewersOwnersForFile ¶
func (o *RepoOwners) FindReviewersOwnersForFile(path string) string
FindReviewersOwnersForFile returns the OWNERS file path furthest down the tree for a specified file that contains a reviewers section
func (*RepoOwners) IsNoParentOwners ¶
func (o *RepoOwners) IsNoParentOwners(path string) bool
IsNoParentOwners checks if an OWNERS file path refers to an OWNERS file with NoParentOwners enabled.
func (*RepoOwners) LeafApprovers ¶
func (o *RepoOwners) 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 (*RepoOwners) LeafReviewers ¶
func (o *RepoOwners) 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 (*RepoOwners) Reviewers ¶
func (o *RepoOwners) 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