Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileExistChecker ¶
type FileExistChecker struct{}
func NewFileExist ¶
func NewFileExist() *FileExistChecker
func (FileExistChecker) Name ¶
func (FileExistChecker) Name() string
type Input ¶
type Input struct { RepoDir string CodeownerEntries []codeowners.Entry }
type Issue ¶
type Issue struct { Severity SeverityType // enum // default error LineNo uint64 Message string }
type Output ¶
type Output struct {
Issues []Issue
}
func (*Output) ReportIssue ¶
TODO: decide where to put it
type SeverityType ¶
type SeverityType int
const ( Error SeverityType = iota Warning )
func (SeverityType) String ¶
func (s SeverityType) String() string
type ValidOwnerChecker ¶
type ValidOwnerChecker struct {
// contains filtered or unexported fields
}
ValidOwnerChecker validates each owner
func NewValidOwner ¶
func NewValidOwner(cfg ValidOwnerCheckerConfig, ghClient *github.Client) *ValidOwnerChecker
NewValidOwner returns new instance of the ValidOwnerChecker
func (*ValidOwnerChecker) Check ¶
Check check if defined owners are the valid ones. Allowed owner syntax: @username @org/team-name user@example.com source: https://help.github.com/articles/about-code-owners/#codeowners-syntax
Checks: - if owner is one of: github user, org team, email address - if github user then check if have github account - if github user then check if he/she is in organization - if org team then check if exists in organization
func (ValidOwnerChecker) Name ¶
func (ValidOwnerChecker) Name() string
type ValidOwnerCheckerConfig ¶
type ValidOwnerCheckerConfig struct {
OrganizationName string
}
Click to show internal directories.
Click to hide internal directories.