@@ -461,16 +461,11 @@ func (c *Context) Validate() []error {
461
461
if val , ok := people [person .GitHub ]; ok {
462
462
// non-emeritus must have email and company set
463
463
if prefix != "emeritus_lead" {
464
- // email must be set and consistent
465
- if val .Email == "" {
466
- errors = append (errors , fmt .Errorf ("%s: %s: email is empty but should be set" , group .Dir , val .GitHub ))
467
- } else if val .Email != person .Email {
464
+ // email and company must match across groups
465
+ if val .Email != person .Email {
468
466
errors = append (errors , fmt .Errorf ("%s: %s email: %q does not match other entries %q" , group .Dir , val .GitHub , val .Email , person .Email ))
469
467
}
470
- // company must be set and consistent
471
- if val .Company == "" {
472
- errors = append (errors , fmt .Errorf ("%s: %s: company is empty but should be set" , group .Dir , val .Company ))
473
- } else if val .Company != person .Company {
468
+ if val .Company != person .Company {
474
469
errors = append (errors , fmt .Errorf ("%s: %s company: %q does not match other entries %q" , group .Dir , val .GitHub , val .Company , person .Company ))
475
470
}
476
471
}
@@ -480,6 +475,13 @@ func (c *Context) Validate() []error {
480
475
}
481
476
} else if prefix != "emeritus_lead" {
482
477
people [person .GitHub ] = person
478
+ // email and company must be set for leads
479
+ if person .Email == "" {
480
+ errors = append (errors , fmt .Errorf ("%s: %s: email is empty but should be set" , group .Dir , person .GitHub ))
481
+ }
482
+ if person .Company == "" {
483
+ errors = append (errors , fmt .Errorf ("%s: %s: company is empty but should be set" , group .Dir , person .GitHub ))
484
+ }
483
485
}
484
486
485
487
if prefix == "emeritus_lead" && person .Company != "" {
0 commit comments