Documentation ¶
Index ¶
- Constants
- func RegisterFeature(feat feature) error
- type Features
- type GCSInfo
- type RepoInfo
- func (o *RepoInfo) AddFlags(cmd *cobra.Command)
- func (o *RepoInfo) Assignees(path string) sets.String
- func (o *RepoInfo) EachLoop() error
- func (o *RepoInfo) GitCommand(args []string) ([]byte, error)
- func (o *RepoInfo) Initialize() error
- func (o *RepoInfo) LeafAssignees(path string) sets.String
- func (o *RepoInfo) Name() string
- type TestOptions
Constants ¶
const (
// GCSFeature is how mungers should indicate this is required.
GCSFeature = "google-cloud-storage"
)
const (
// RepoFeatureName is how mungers should indicate this is required
RepoFeatureName = "gitrepos"
)
const (
// TestOptionsFeature is how mungers should indicate this is required.
TestOptionsFeature = "test-options"
)
Variables ¶
This section is empty.
Functions ¶
func RegisterFeature ¶
func RegisterFeature(feat feature) error
RegisterFeature should be called in `init()` by each feature to make itself available by name
Types ¶
type Features ¶
type Features struct { Repos *RepoInfo GCSInfo *GCSInfo TestOptions *TestOptions // contains filtered or unexported fields }
Features are all features the code know about. Care should be taken not to try to use a feature which isn't 'active'
func (*Features) GetActive ¶
func (f *Features) GetActive() []feature
GetActive returns all features requested by a munger
func (*Features) Initialize ¶
Initialize should be called with the set of all features needed by all (active) mungers
type GCSInfo ¶
type GCSInfo struct { BucketName string LogDir string // PullLogDir is the directory of the pr builder jenkins PullLogDir string // PullKey is a string to look for in a job name to figure out if it's // a pull (presubmit) job. PullKey string }
GCSInfo is a struct that handles parameters required by GCS to read log files and determine the status of tests.
func (*GCSInfo) Initialize ¶
Initialize will initialize the feature.
type RepoInfo ¶
type RepoInfo struct {
// contains filtered or unexported fields
}
RepoInfo provides information about users in OWNERS files in a git repo
func (*RepoInfo) Assignees ¶
Assignees returns a set of users who are the closest assginees to the requested file. 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 (*RepoInfo) GitCommand ¶
GitCommand will execute the git command with the `args`
func (*RepoInfo) Initialize ¶
Initialize will initialize the munger
func (*RepoInfo) LeafAssignees ¶
LeafAssignees returns a set of users who are the closest assginees 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
type TestOptions ¶
type TestOptions struct {
RequiredRetestContexts []string
}
TestOptions is a struct that handles parameters required by mungers to find out about specific tests.
func (*TestOptions) AddFlags ¶
func (t *TestOptions) AddFlags(cmd *cobra.Command)
AddFlags will add any request flags to the cobra `cmd`
func (*TestOptions) EachLoop ¶
func (t *TestOptions) EachLoop() error
EachLoop is called at the start of every munge loop
func (*TestOptions) Initialize ¶
func (t *TestOptions) Initialize() error
Initialize will initialize the feature.
func (*TestOptions) Name ¶
func (t *TestOptions) Name() string
Name is just going to return the name mungers use to request this feature