Merge pull request #8417 from BenTheElder/wip-maintainers-dump
generate maintainers table for cncf
This commit is contained in:
commit
b3de0387c5
|
@ -1,3 +1,7 @@
|
||||||
|
# this file contains information that we don't want to further surface for
|
||||||
|
# scraping but do generate locally
|
||||||
|
maintainers.txt
|
||||||
|
|
||||||
# OSX leaves these everywhere on SMB shares
|
# OSX leaves these everywhere on SMB shares
|
||||||
._*
|
._*
|
||||||
|
|
||||||
|
|
|
@ -84,6 +84,19 @@ for i in $(ls -1 generator/generated/*.md); do gh issue create --repo kubernetes
|
||||||
You may run into rate limiting issues, which is why this command removes the
|
You may run into rate limiting issues, which is why this command removes the
|
||||||
files after an issue has been successfully created.
|
files after an issue has been successfully created.
|
||||||
|
|
||||||
|
<!--TODO: we probably won't need maintainers.txt longterm-->
|
||||||
|
To generate the maintainers.txt file for updating with the CNCF re:
|
||||||
|
https://github.com/kubernetes/steering/issues/281
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make MAINTAINERS_LIST=true
|
||||||
|
```
|
||||||
|
|
||||||
|
This will generate an untracked (not saved in git) maintainers.txt file with a
|
||||||
|
table in the format requested by the CNCF.
|
||||||
|
Most contributors will never need to do this.
|
||||||
|
For more details see the linked steering issue.
|
||||||
|
<!--END-TODO: we probably won't need maintainers.txt longterm-->
|
||||||
|
|
||||||
## Adding custom content
|
## Adding custom content
|
||||||
|
|
||||||
|
|
|
@ -1100,6 +1100,58 @@ func prepForAnnualReportGeneration() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func generateCNCFMaintainersList(ctx *Context) error {
|
||||||
|
maintainers := map[string]Person{}
|
||||||
|
serviceDesk := map[string]bool{}
|
||||||
|
for _, group := range ctx.Committees {
|
||||||
|
if group.Name == "Steering" {
|
||||||
|
for _, member := range group.Leadership.Chairs {
|
||||||
|
maintainers[member.GitHub] = member
|
||||||
|
serviceDesk[member.GitHub] = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for _, sig := range ctx.Sigs {
|
||||||
|
// these groups retain service desk access in addition to steering
|
||||||
|
// as outlined in https://github.com/kubernetes/steering/issues/281
|
||||||
|
isServiceDesk := sig.Name == "Contributor Experience" || sig.Name == "K8s Infra" || sig.Name == "Release"
|
||||||
|
for _, chair := range sig.Leadership.Chairs {
|
||||||
|
maintainers[chair.GitHub] = chair
|
||||||
|
// only set service desk true as needed, do not override to false
|
||||||
|
// in case of maintainers spanning groups
|
||||||
|
if isServiceDesk {
|
||||||
|
serviceDesk[chair.Name] = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for _, tl := range sig.Leadership.TechnicalLeads {
|
||||||
|
maintainers[tl.GitHub] = tl
|
||||||
|
// only set service desk true as needed, do not override to false
|
||||||
|
// in case of maintainers spanning groups
|
||||||
|
if isServiceDesk {
|
||||||
|
serviceDesk[tl.Name] = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
outputPath := filepath.Join(baseGeneratorDir, "maintainers.txt")
|
||||||
|
f, err := os.Create(outputPath)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
defer f.Close()
|
||||||
|
fmt.Fprintln(f, "name | company | github | email | service-desk?")
|
||||||
|
fmt.Fprintln(f, "===============================================")
|
||||||
|
keys := []string{}
|
||||||
|
for gh := range maintainers {
|
||||||
|
keys = append(keys, gh)
|
||||||
|
}
|
||||||
|
sort.Strings(keys)
|
||||||
|
for _, gh := range keys {
|
||||||
|
m := maintainers[gh]
|
||||||
|
fmt.Fprintf(f, "%s | %s | %s | %s | %t\n", m.Name, m.Company, m.GitHub, m.Email, serviceDesk[m.GitHub])
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
yamlPath := filepath.Join(baseGeneratorDir, sigsYamlFile)
|
yamlPath := filepath.Join(baseGeneratorDir, sigsYamlFile)
|
||||||
var ctx Context
|
var ctx Context
|
||||||
|
@ -1153,6 +1205,11 @@ func main() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if envVal, ok := os.LookupEnv("MAINTAINERS_LIST"); ok && envVal == "true" {
|
||||||
|
fmt.Println("Generating CNCF maintainers list")
|
||||||
|
generateCNCFMaintainersList(&ctx)
|
||||||
|
}
|
||||||
|
|
||||||
fmt.Println("Generating sig-list.md")
|
fmt.Println("Generating sig-list.md")
|
||||||
outputPath := filepath.Join(baseGeneratorDir, sigListOutput)
|
outputPath := filepath.Join(baseGeneratorDir, sigListOutput)
|
||||||
err = writeTemplate(filepath.Join(baseGeneratorDir, templateDir, listTemplate), outputPath, "markdown", ctx)
|
err = writeTemplate(filepath.Join(baseGeneratorDir, templateDir, listTemplate), outputPath, "markdown", ctx)
|
||||||
|
|
Loading…
Reference in New Issue