Documentation
¶
Index ¶
- func ApplyAutomaticReportsDefaults(r *AutomaticReport, allComponents []string)
- func ApplyDefaults(cfg *OperatorConfig)
- func ExpandGroups(cfg map[string]Group, roots ...string) sets.String
- type AutomaticReport
- type BugzillaRelease
- type Component
- type ComponentMap
- type Credentials
- type Group
- type OperatorConfig
- type Transition
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyAutomaticReportsDefaults ¶
func ApplyAutomaticReportsDefaults(r *AutomaticReport, allComponents []string)
func ApplyDefaults ¶
func ApplyDefaults(cfg *OperatorConfig)
Types ¶
type AutomaticReport ¶
type AutomaticReport struct { // slackChannel is where to post the report to. SlackChannel string `yaml:"slackChannel"` // crontab like schedules, e.g.: // // @every 1s // @hourly // 30 * * * * // // Default is: // CRON_TZ=Europe/Prague 30 9 1-7,16-23 * 2-4 // CRON_TZ=America/New_York 30 9 1-7,16-23 * 2-4 When []string `yaml:"when"` // reports are report identifiers, blocker-bugs,closed-bugs by default. Reports []string `yaml:"report"` // components is the list of components this report is created for. If empty, all components from top-level are used. Components []string `yaml:"components"` }
type BugzillaRelease ¶
type Component ¶
type Component struct { // lead should match the bugzilla default assignee the component and will get notifications of new BZs by default. Lead string `yaml:"lead"` // pm should match with the component product manager. use the email he use on slack. ProductManager string `yaml:"pm"` // manager match the engineering manager of a team that own this component. use the email he use on slack Manager string `yaml:"manager"` // developers are not assigned by default, but might be on first comment if autoCommentAssign is true. // This can have group:<group-name> references. Developers []string `yaml:"developers"` // watchers get notified about new bugzillas. If this is empty, the lead is notified. // This can have group:<group-name> references. Watchers []string `yaml:"watchers"` }
type ComponentMap ¶
func (*ComponentMap) List ¶
func (cm *ComponentMap) List() []string
func (*ComponentMap) ManagerFor ¶
func (cm *ComponentMap) ManagerFor(component, fallback string) string
func (*ComponentMap) ProductManagerFor ¶
func (cm *ComponentMap) ProductManagerFor(component, fallback string) string
func (*ComponentMap) UnmarshalYAML ¶
func (cm *ComponentMap) UnmarshalYAML(unmarshal func(interface{}) error) error
type Credentials ¶
type Credentials struct { Username string `yaml:"username"` Password string `yaml:"password"` APIKey string `yaml:"apiKey"` SlackToken string `yaml:"slackToken"` SlackVerificationToken string `yaml:"slackVerificationToken"` BitlyToken string `yaml:"bitlyToken"` }
func (Credentials) DecodedAPIKey ¶
func (b Credentials) DecodedAPIKey() string
DecodedAPIKey return decoded APIKey (in case it was base64 encoded)
func (Credentials) DecodedPassword ¶
func (b Credentials) DecodedPassword() string
DecodedAPIKey return decoded Password (in case it was base64 encoded)
func (Credentials) DecodedSlackToken ¶
func (b Credentials) DecodedSlackToken() string
func (Credentials) DecodedSlackVerificationToken ¶
func (b Credentials) DecodedSlackVerificationToken() string
func (Credentials) DecodedUsername ¶
func (b Credentials) DecodedUsername() string
DecodedAPIKey return decoded Username (in case it was base64 encoded)
type OperatorConfig ¶
type OperatorConfig struct { Credentials Credentials `yaml:"credentials"` StaleBugComment string `yaml:"staleBugComment"` StaleBugCloseComment string `yaml:"staleBugCloseComment"` Release BugzillaRelease `yaml:"release"` // groups are list of emails or references to other groups with the syntax group:<other-group>. Groups map[string]Group `yaml:"groups"` Components ComponentMap `yaml:"components"` // schedules define when reports are created, which contents and sent to which channel. Schedules []AutomaticReport `yaml:"schedules"` // SlackChannel is a channel where the operator will post reports/etc. // Deprecated: SlackChannel is deprecated, use schedules instead. SlackChannel string `yaml:"slackChannel"` SlackAdminChannel string `yaml:"slackAdminChannel"` // if Bugzilla email and Slack differ, these are the slack emails keyed by bugzilla emails. SlackEmails map[string]string `yaml:"slackEmails"` // GithubToken is used to query PR's GithubToken string `yaml:"githubToken"` DisabledControllers []string `yaml:"disabledControllers"` CachePath string `yaml:"cachePath"` }
func (*OperatorConfig) Anonymize ¶
func (c *OperatorConfig) Anonymize() OperatorConfig
Anonymize makes a shallow copy of the config, suitable for dumping in logs (no sensitive data)
type Transition ¶
Click to show internal directories.
Click to hide internal directories.