Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 28 additions & 2 deletions generator/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ type Context struct {
WorkingGroups []Group
UserGroups []Group
Committees []Group
GBRep Person `yaml:"gb_rep,omitempty"`
}

func index(groups []Group, predicate func(Group) bool) int {
Expand Down Expand Up @@ -443,7 +444,25 @@ func (c *Context) Validate() []error {
// people with potentially differing info, versus referring to leads by
// github handle within each SIG and then keeping this map alongside the SIGs
// This could break external tooling parsing the file though.
people := make(map[string]Person)
people := map[string]Person{
// This is a singleton role, but we will compare it to other entries
// for consistency in case of dual-role persons holding this role
c.GBRep.GitHub: c.GBRep,
}
// validate GBrep
// TODO: this logic could all be DRY-ed a bit
if c.GBRep.GitHub == "" {
errors = append(errors, fmt.Errorf("GBRep: github is empty but should be set"))
}
if c.GBRep.Company == "" {
errors = append(errors, fmt.Errorf("GBRep: company is empty but should be set"))
}
if c.GBRep.Email == "" {
errors = append(errors, fmt.Errorf("GBRep: email is empty but should be set"))
}
if c.GBRep.Name == "" {
errors = append(errors, fmt.Errorf("GBRep: name is empty but should be set"))
}
reRawGitHubURL := regexp.MustCompile(regexRawGitHubURL)
reGitHubURL := regexp.MustCompile(regexGitHubURL)
for prefix, groups := range c.PrefixToGroupMap() {
Expand All @@ -458,6 +477,11 @@ func (c *Context) Validate() []error {
}
for prefix, persons := range group.Leadership.PrefixToPersonMap() {
for _, person := range persons {
if person.GitHub == "" {
errors = append(errors, fmt.Errorf("%s: %s: github is empty but should be set", group.Dir, prefix))
// without github key we can't check the rest, and this is going to fail validation anyhow
continue
}
if val, ok := people[person.GitHub]; ok {
// non-emeritus must have email and company set
if prefix != "emeritus_lead" {
Expand Down Expand Up @@ -1101,7 +1125,9 @@ func prepForAnnualReportGeneration() error {
}

func generateCNCFMaintainersList(ctx *Context) error {
maintainers := map[string]Person{}
maintainers := map[string]Person{
ctx.GBRep.GitHub: ctx.GBRep,
}
serviceDesk := map[string]bool{}
for _, group := range ctx.Committees {
if group.Name == "Steering" {
Expand Down
5 changes: 5 additions & 0 deletions sigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4199,3 +4199,8 @@ committees:
description: Steering Committee policies, documentation, and funding requests
owners:
- https://raw.githubusercontent.com/kubernetes/steering/master/OWNERS
gb_rep:
github: cblecker
name: Christoph Blecker
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @cblecker

this info matches what we submitted to the CNCF previously

company: Red Hat
email: cblecker@gmail.com