From 2e1518026be0bccfb2ecf5af2aa4b85317c293c3 Mon Sep 17 00:00:00 2001 From: Aaron Crickenberger Date: Wed, 20 Mar 2019 10:59:17 -0700 Subject: Make subproject contacts optional, nest in display --- generator/app.go | 2 +- generator/sig_readme.tmpl | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'generator') diff --git a/generator/app.go b/generator/app.go index 3756d148..295077b3 100644 --- a/generator/app.go +++ b/generator/app.go @@ -89,7 +89,7 @@ type GithubTeams struct { type Subproject struct { Name string Description string - Contact Contact + Contact *Contact Owners []string Meetings []Meeting } diff --git a/generator/sig_readme.tmpl b/generator/sig_readme.tmpl index 6cc9ba7b..734c1512 100644 --- a/generator/sig_readme.tmpl +++ b/generator/sig_readme.tmpl @@ -68,16 +68,19 @@ The following subprojects are owned by sig-{{.Label}}: {{- range .Owners }} - {{.}} {{- end }} +{{- if .Contact }} + - Contact {{- if .Contact.Slack }} - - Slack: [#{{.Contact.Slack}}](https://kubernetes.slack.com/messages/{{.Contact.Slack}}) + - Slack: [#{{.Contact.Slack}}](https://kubernetes.slack.com/messages/{{.Contact.Slack}}) {{- end }} {{- if .Contact.MailingList }} - - [Mailing List]({{.Contact.MailingList}}) + - [Mailing List]({{.Contact.MailingList}}) {{- end }} {{- if .Contact.GithubTeams }} - - GitHub Teams: + - GitHub Teams: {{- range .Contact.GithubTeams }} - - [@kubernetes/{{.Name}}](https://github.com/orgs/kubernetes/teams/{{.Name}}) {{- if .Description }}({{.Description}}){{- end}} + - [@kubernetes/{{.Name}}](https://github.com/orgs/kubernetes/teams/{{.Name}}) {{- if .Description }}({{.Description}}){{- end}} +{{- end }} {{- end }} {{- end }} {{- if .Meetings }} -- cgit v1.2.3