generator: support liaisons in sigs.yaml

This commit is contained in:
Nikhita Raghunath 2021-01-19 16:55:30 +05:30
parent 1af0c6550e
commit 058e3c4b23
6 changed files with 68 additions and 8 deletions

View File

@ -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 = "<!-- BEGIN CUSTOM CONTENT -->"
endCustomMarkdown = "<!-- END CUSTOM CONTENT -->"
@ -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!")
}

View File

@ -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 }}

38
generator/liaisons.tmpl Normal file
View File

@ -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 }}

View File

@ -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 }}

View File

@ -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 }}

View File

@ -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 }}