diff options
| author | Nikhita Raghunath <nikitaraghunath@gmail.com> | 2019-09-27 13:02:27 +0530 |
|---|---|---|
| committer | Nikhita Raghunath <nikitaraghunath@gmail.com> | 2019-10-05 09:33:54 +0530 |
| commit | a0055b50634bab7f53b5ff2cb905e5325ed66b3a (patch) | |
| tree | 8f1c1cb472b34f9f5bcffeddbc21a6e90ebcc27b | |
| parent | 395d34e5c841d0e8b4e4bc79c3e32c3498adb25a (diff) | |
generator: don't specify company for emeritus_leads
If we end up specifying the company for emeritus leads, we could end
up stale information. Moreover, we don't gain any specific value
from company info of emeritus leads.
| -rw-r--r-- | generator/app.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/generator/app.go b/generator/app.go index a5f05b1f..5171df2f 100644 --- a/generator/app.go +++ b/generator/app.go @@ -68,7 +68,7 @@ func (x FoldedString) MarshalYAML() (interface{}, error) { type Person struct { GitHub string Name string - Company string + Company string `yaml:"company,omitempty"` } // Meeting represents a regular meeting for a group. @@ -233,12 +233,16 @@ func (c *Context) Validate() []error { for prefix, persons := range group.Leadership.PrefixToPersonMap() { for _, person := range persons { if val, ok := people[person.GitHub]; ok { - if val.Name != person.Name || val.Company != person.Company { + if val.Name != person.Name || (prefix != "emeritus_lead" && val.Company != person.Company) { errors = append(errors, fmt.Errorf("%s: %ss: expected person: %v, got: %v", group.Dir, prefix, val, person)) } - } else { + } else if prefix != "emeritus_lead" { people[person.GitHub] = person } + + if prefix == "emeritus_lead" && person.Company != "" { + errors = append(errors, fmt.Errorf("%s: emeritus leads should not have company specified; company specified for: %s", group.Dir, person.Name)) + } } } if len(group.StakeholderSIGs) != 0 { |
