From 347f7d07d35979b952d52b1c4b234f3761dab2eb Mon Sep 17 00:00:00 2001 From: Nikhita Raghunath Date: Fri, 15 Mar 2019 16:33:11 +0530 Subject: generator: add support for committees Since committees can have private mailing lists, this commit also adds a new field for specifying private mailing lists in the "Contacts" section. --- generator/app.go | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'generator/app.go') diff --git a/generator/app.go b/generator/app.go index 0b17b100..be33247f 100644 --- a/generator/app.go +++ b/generator/app.go @@ -73,9 +73,10 @@ type Meeting struct { // Contact represents the various contact points for a group. type Contact struct { - Slack string - MailingList string `yaml:"mailing_list"` - GithubTeams []GithubTeams `yaml:"teams"` + Slack string + MailingList string `yaml:"mailing_list"` + PrivateMailingList string `yaml:"private_mailing_list"` + GithubTeams []GithubTeams `yaml:"teams"` } // GithubTeams represents a specific Github Team. @@ -125,6 +126,7 @@ type Context struct { Sigs []Group WorkingGroups []Group UserGroups []Group + Committees []Group } func pathExists(path string) bool { @@ -310,6 +312,10 @@ func main() { return strings.ToLower(ctx.UserGroups[i].Name) <= strings.ToLower(ctx.UserGroups[j].Name) }) + sort.Slice(ctx.Committees, func(i, j int) bool { + return strings.ToLower(ctx.Committees[i].Name) <= strings.ToLower(ctx.Committees[j].Name) + }) + err = createGroupReadme(ctx.Sigs, "sig") if err != nil { log.Fatal(err) @@ -325,6 +331,11 @@ func main() { log.Fatal(err) } + err = createGroupReadme(ctx.Committees, "committee") + if err != nil { + log.Fatal(err) + } + fmt.Println("Generating sig-list.md") outputPath := filepath.Join(baseGeneratorDir, sigListOutput) err = writeTemplate(filepath.Join(baseGeneratorDir, templateDir, listTemplate), outputPath, "markdown", ctx) -- cgit v1.2.3