Merge pull request #8377 from BenTheElder/same-email

validate emails ....
This commit is contained in:
Kubernetes Prow Robot 2025-03-17 05:45:49 -07:00 committed by GitHub
commit 19094aa6e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 37 additions and 3 deletions

View File

@ -438,6 +438,11 @@ func (c *Context) Sort() {
// Validate returns a list of errors encountered while validating a Context
func (c *Context) Validate() []error {
errors := []error{}
// github to Person info
// TODO: this would probably be a better config format? to avoid duplicating
// 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)
reRawGitHubURL := regexp.MustCompile(regexRawGitHubURL)
reGitHubURL := regexp.MustCompile(regexGitHubURL)
@ -454,8 +459,24 @@ 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 || (prefix != "emeritus_lead" && val.Company != person.Company) {
errors = append(errors, fmt.Errorf("%s: %ss: expected person: %v, got: %v", group.Dir, prefix, val, person))
// non-emeritus must have email and company set
if prefix != "emeritus_lead" {
// email must be set and consistent
if val.Email == "" {
errors = append(errors, fmt.Errorf("%s: %s: email is empty but should be set", group.Dir, val.GitHub))
} else if val.Email != person.Email {
errors = append(errors, fmt.Errorf("%s: %s email: %q does not match other entries %q", group.Dir, val.GitHub, val.Email, person.Email))
}
// company must be set and consistent
if val.Company == "" {
errors = append(errors, fmt.Errorf("%s: %s: company is empty but should be set", group.Dir, val.Company))
} else if val.Company != person.Company {
errors = append(errors, fmt.Errorf("%s: %s company: %q does not match other entries %q", group.Dir, val.GitHub, val.Company, person.Company))
}
}
// all entries should have github + name, emeritus or not
if val.Name != person.Name {
errors = append(errors, fmt.Errorf("%s: %s: expected person: %v, got: %v", group.Dir, prefix, val, person))
}
} else if prefix != "emeritus_lead" {
people[person.GitHub] = person

View File

@ -295,6 +295,7 @@ sigs:
- github: derekwaynecarr
name: Derek Carr
company: Red Hat
email: decarr@redhat.com
- github: dims
name: Davanum Srinivas
company: Amazon
@ -438,19 +439,23 @@ sigs:
- github: enj
name: Mo Khan
company: Microsoft
email: i@monis.app
- github: mikedanese
name: Mike Danese
company: Google
- github: ritazh
name: Rita Zhang
company: Microsoft
email: ritazh@microsoft.com
tech_leads:
- github: deads2k
name: David Eads
company: Red Hat
email: deads@redhat.com
- github: enj
name: Mo Khan
company: Microsoft
email: i@monis.app
- github: liggitt
name: Jordan Liggitt
company: Google
@ -3380,6 +3385,7 @@ sigs:
- github: marosset
name: Mark Rossetti
company: Microsoft
email: marosset@microsoft.com
tech_leads:
- github: claudiubelu
name: Claudiu Belu
@ -3393,6 +3399,7 @@ sigs:
- github: marosset
name: Mark Rossetti
company: Microsoft
email: marosset@microsoft.com
emeritus_leads:
- github: PatrickLang
name: Patrick Lang
@ -3548,6 +3555,7 @@ workinggroups:
- github: xing-yang
name: Xing Yang
company: VMware
email: xingyang105@gmail.com
- github: yuxiangqian
name: Xiangqian Yu
company: Google
@ -3690,6 +3698,7 @@ workinggroups:
- github: jeremyrickard
name: Jeremy Rickard
company: Microsoft
email: jeremy.r.rickard@gmail.com
- github: liggitt
name: Jordan Liggitt
company: Google
@ -3697,6 +3706,7 @@ workinggroups:
- github: micahhausler
name: Micah Hausler
company: Amazon
email: mhausler@amazon.com
meetings:
- description: Regular WG Meeting
day: Tuesday
@ -3835,6 +3845,7 @@ workinggroups:
- github: pohly
name: Patrick Ohly
company: Intel
email: patrick.ohly@intel.com
meetings: []
contact:
slack: wg-structured-logging
@ -3860,12 +3871,14 @@ committees:
- github: divya-mohan0209
name: Divya Mohan
company: SUSE
email: divya.mohan0209@gmail.com
- github: endocrimes
name: Danielle Lancashire
company: Fermyon
- github: jeremyrickard
name: Jeremy Rickard
company: Microsoft
email: jeremy.r.rickard@gmail.com
- github: stmcginnis
name: Sean McGinnis
company: Lambda, Inc
@ -3993,7 +4006,7 @@ committees:
- github: aojea
name: Antonio Ojea
company: Google
email: antonio.ojea.garcia@gmail.com
email: aojea@google.com
- github: justaugustus
name: Stephen Augustus
company: Bloomberg