From 058e3c4b230670a104219edf8539a6d5a19bfa17 Mon Sep 17 00:00:00 2001 From: Nikhita Raghunath Date: Tue, 19 Jan 2021 16:55:30 +0530 Subject: [PATCH] generator: support liaisons in sigs.yaml --- generator/app.go | 26 +++++++++++++++------- generator/committee_readme.tmpl | 3 +++ generator/liaisons.tmpl | 38 +++++++++++++++++++++++++++++++++ generator/sig_readme.tmpl | 3 +++ generator/ug_readme.tmpl | 3 +++ generator/wg_readme.tmpl | 3 +++ 6 files changed, 68 insertions(+), 8 deletions(-) create mode 100644 generator/liaisons.tmpl diff --git a/generator/app.go b/generator/app.go index 8a4d6fd28..3618f4dce 100644 --- a/generator/app.go +++ b/generator/app.go @@ -31,15 +31,17 @@ import ( ) const ( - readmeTemplate = "readme.tmpl" - listTemplate = "list.tmpl" - aliasesTemplate = "aliases.tmpl" - headerTemplate = "header.tmpl" + readmeTemplate = "readme.tmpl" + listTemplate = "list.tmpl" + aliasesTemplate = "aliases.tmpl" + liaisonsTemplate = "liaisons.tmpl" + headerTemplate = "header.tmpl" - sigsYamlFile = "sigs.yaml" - sigListOutput = "sig-list.md" - aliasesOutput = "OWNERS_ALIASES" - indexFilename = "README.md" + sigsYamlFile = "sigs.yaml" + sigListOutput = "sig-list.md" + aliasesOutput = "OWNERS_ALIASES" + indexFilename = "README.md" + liaisonsFilename = "liaisons.md" beginCustomMarkdown = "" endCustomMarkdown = "" @@ -89,6 +91,7 @@ type Contact struct { MailingList string `yaml:"mailing_list,omitempty"` PrivateMailingList string `yaml:"private_mailing_list,omitempty"` GithubTeams []GithubTeam `yaml:"teams,omitempty"` + Liaison Person `yaml:"liaison,omitempty"` } // GithubTeam represents a specific Github Team. @@ -527,5 +530,12 @@ func main() { log.Fatal(err) } + fmt.Println("Generating liaisons.md") + outputPath = filepath.Join(baseGeneratorDir, liaisonsFilename) + err = writeTemplate(filepath.Join(baseGeneratorDir, templateDir, liaisonsTemplate), outputPath, "markdown", ctx) + if err != nil { + log.Fatal(err) + } + fmt.Println("Finished generation!") } diff --git a/generator/committee_readme.tmpl b/generator/committee_readme.tmpl index 68b5b893c..23eb0137c 100644 --- a/generator/committee_readme.tmpl +++ b/generator/committee_readme.tmpl @@ -49,6 +49,9 @@ The [charter]({{.CharterLink}}) defines the scope and governance of the {{.Name} - [@kubernetes/{{.Name}}](https://github.com/orgs/kubernetes/teams/{{.Name}}) {{- if .Description }} - {{.Description}} {{- end}} {{- end }} {{- end }} +{{- if .Contact.Liaison.Name }} +- Steering Committee Liaison: {{.Contact.Liaison.Name}} (**[@{{.Contact.Liaison.GitHub}}](https://github.com/{{.Contact.Liaison.GitHub}})**) +{{- end }} {{- if .Subprojects }} diff --git a/generator/liaisons.tmpl b/generator/liaisons.tmpl new file mode 100644 index 000000000..f4243f9ee --- /dev/null +++ b/generator/liaisons.tmpl @@ -0,0 +1,38 @@ +{{ template "header" }} + +# Liaisons + +Each community group in Kubernetes is assigned a Steering Committee +liaison. Liaisons act as a point of contact from steering, engage with +their respective community groups to ensure they are healthy and +facilitate communication for [annual reports](committee-steering/governance/annual-reports.md). + +Liaisons do not make decisions for the community group or on behalf of +the Steering Committee. + +Liaisons are assigned community groups at random (adjustments can be +made, if needed) with each member having an (almost) equal distribution +of SIGs, WGs and UGs. + +| Community Group | Steering Committee Liaison | +| -------------------------- | -------------------------- | +{{- range .Sigs}} +{{- if .Contact.Liaison.Name }} +| [SIG {{.Name}}]({{.Dir}}/README.md) | {{.Contact.Liaison.Name}} (**[@{{.Contact.Liaison.GitHub}}](https://github.com/{{.Contact.Liaison.GitHub}})**) | +{{- end }} +{{- end -}} +{{- range .WorkingGroups}} +{{- if .Contact.Liaison.Name }} +| [WG {{.Name}}]({{.Dir}}/README.md) | {{.Contact.Liaison.Name}} (**[@{{.Contact.Liaison.GitHub}}](https://github.com/{{.Contact.Liaison.GitHub}})**) | +{{- end -}} +{{- end }} +{{- range .UserGroups}} +{{- if .Contact.Liaison.Name }} +| [UG {{.Name}}]({{.Dir}}/README.md) | {{.Contact.Liaison.Name}} (**[@{{.Contact.Liaison.GitHub}}](https://github.com/{{.Contact.Liaison.GitHub}})**) | +{{- end -}} +{{- end }} +{{- range .Committees}} +{{- if .Contact.Liaison.Name }} +| [Committee {{.Name}}]({{.Dir}}/README.md) | {{.Contact.Liaison.Name}} (**[@{{.Contact.Liaison.GitHub}}](https://github.com/{{.Contact.Liaison.GitHub}})**) | +{{- end -}} +{{- end }} diff --git a/generator/sig_readme.tmpl b/generator/sig_readme.tmpl index 06361e946..58c1b7b35 100644 --- a/generator/sig_readme.tmpl +++ b/generator/sig_readme.tmpl @@ -59,6 +59,9 @@ subprojects, and resolve cross-subproject technical issues and decisions. - [@kubernetes/{{.Name}}](https://github.com/orgs/kubernetes/teams/{{.Name}}) {{- if .Description }} - {{.Description}} {{- end}} {{- end }} {{- end }} +{{- if .Contact.Liaison.Name }} +- Steering Committee Liaison: {{.Contact.Liaison.Name}} (**[@{{.Contact.Liaison.GitHub}}](https://github.com/{{.Contact.Liaison.GitHub}})**) +{{- end }} {{- if .Subprojects }} diff --git a/generator/ug_readme.tmpl b/generator/ug_readme.tmpl index a84aa06a7..d42ea9d75 100644 --- a/generator/ug_readme.tmpl +++ b/generator/ug_readme.tmpl @@ -47,3 +47,6 @@ The [charter]({{.CharterLink}}) defines the scope and governance of the {{.Name} - [@kubernetes/{{.Name}}](https://github.com/orgs/kubernetes/teams/{{.Name}}) {{- if .Description }} - {{.Description}} {{- end}} {{- end }} {{- end }} +{{- if .Contact.Liaison.Name }} +- Steering Committee Liaison: {{.Contact.Liaison.Name}} (**[@{{.Contact.Liaison.GitHub}}](https://github.com/{{.Contact.Liaison.GitHub}})**) +{{- end }} diff --git a/generator/wg_readme.tmpl b/generator/wg_readme.tmpl index a36d16f72..e77be483b 100644 --- a/generator/wg_readme.tmpl +++ b/generator/wg_readme.tmpl @@ -53,3 +53,6 @@ The [charter]({{.CharterLink}}) defines the scope and governance of the {{.Name} - [@kubernetes/{{.Name}}](https://github.com/orgs/kubernetes/teams/{{.Name}}) {{- if .Description }} - {{.Description}} {{- end}} {{- end }} {{- end }} +{{- if .Contact.Liaison.Name }} +- Steering Committee Liaison: {{.Contact.Liaison.Name}} (**[@{{.Contact.Liaison.GitHub}}](https://github.com/{{.Contact.Liaison.GitHub}})**) +{{- end }}