@@ -351,6 +351,7 @@ type Context struct {
351351 WorkingGroups []Group
352352 UserGroups []Group
353353 Committees []Group
354+ GBRep Person `yaml:"gb_rep,omitempty"`
354355}
355356
356357func index (groups []Group , predicate func (Group ) bool ) int {
@@ -443,7 +444,25 @@ func (c *Context) Validate() []error {
443444 // people with potentially differing info, versus referring to leads by
444445 // github handle within each SIG and then keeping this map alongside the SIGs
445446 // This could break external tooling parsing the file though.
446- people := make (map [string ]Person )
447+ people := map [string ]Person {
448+ // This is a singleton role, but we will compare it to other entries
449+ // for consistency in case of dual-role persons holding this role
450+ c .GBRep .GitHub : c .GBRep ,
451+ }
452+ // validate GBrep
453+ // TODO: this logic could all be DRY-ed a bit
454+ if c .GBRep .GitHub == "" {
455+ errors = append (errors , fmt .Errorf ("GBRep: github is empty but should be set" ))
456+ }
457+ if c .GBRep .Company == "" {
458+ errors = append (errors , fmt .Errorf ("GBRep: company is empty but should be set" ))
459+ }
460+ if c .GBRep .Email == "" {
461+ errors = append (errors , fmt .Errorf ("GBRep: email is empty but should be set" ))
462+ }
463+ if c .GBRep .Name == "" {
464+ errors = append (errors , fmt .Errorf ("GBRep: name is empty but should be set" ))
465+ }
447466 reRawGitHubURL := regexp .MustCompile (regexRawGitHubURL )
448467 reGitHubURL := regexp .MustCompile (regexGitHubURL )
449468 for prefix , groups := range c .PrefixToGroupMap () {
@@ -458,6 +477,11 @@ func (c *Context) Validate() []error {
458477 }
459478 for prefix , persons := range group .Leadership .PrefixToPersonMap () {
460479 for _ , person := range persons {
480+ if person .GitHub == "" {
481+ errors = append (errors , fmt .Errorf ("%s: %s: github is empty but should be set" , group .Dir , prefix ))
482+ // without github key we can't check the rest, and this is going to fail validation anyhow
483+ continue
484+ }
461485 if val , ok := people [person .GitHub ]; ok {
462486 // non-emeritus must have email and company set
463487 if prefix != "emeritus_lead" {
@@ -1101,7 +1125,9 @@ func prepForAnnualReportGeneration() error {
11011125}
11021126
11031127func generateCNCFMaintainersList (ctx * Context ) error {
1104- maintainers := map [string ]Person {}
1128+ maintainers := map [string ]Person {
1129+ ctx .GBRep .GitHub : ctx .GBRep ,
1130+ }
11051131 serviceDesk := map [string ]bool {}
11061132 for _ , group := range ctx .Committees {
11071133 if group .Name == "Steering" {
0 commit comments