Skip to content

Commit d46b9e7

Browse files
authored
Merge pull request #8664 from BenTheElder/gb-rep-sigs-yaml
track GB rep in sigs yaml
2 parents 58dc39d + e82c880 commit d46b9e7

File tree

2 files changed

+33
-2
lines changed

2 files changed

+33
-2
lines changed

generator/app.go

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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

356357
func 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

11031127
func 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" {

sigs.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4199,3 +4199,8 @@ committees:
41994199
description: Steering Committee policies, documentation, and funding requests
42004200
owners:
42014201
- https://raw.githubusercontent.com/kubernetes/steering/master/OWNERS
4202+
gb_rep:
4203+
github: cblecker
4204+
name: Christoph Blecker
4205+
company: Red Hat
4206+

0 commit comments

Comments
 (0)