(generator): change generator to allow for subproject leads

Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
This commit is contained in:
Nabarun Pal 2023-08-10 17:12:01 +05:30
parent 9cf733b121
commit 705ea74ef1
No known key found for this signature in database
GPG Key ID: E71158161DF2A2CB
2 changed files with 10 additions and 0 deletions

View File

@ -230,6 +230,7 @@ type Subproject struct {
Description string `yaml:",omitempty"`
Contact *Contact `yaml:",omitempty"`
Owners []string
Leads []Person `yaml:",omitempty"`
Meetings []Meeting `yaml:",omitempty"`
}
@ -395,6 +396,9 @@ func (c *Context) Sort() {
return subproject.Contact.GithubTeams[i].Name < subproject.Contact.GithubTeams[j].Name
})
}
sort.Slice(subproject.Leads, func(i, j int) bool {
return subproject.Leads[i].GitHub < subproject.Leads[j].GitHub
})
sort.Strings(subproject.Owners)
sort.Slice(subproject.Meetings, func(i, j int) bool {
return subproject.Meetings[i].Description < subproject.Meetings[j].Description

View File

@ -89,6 +89,12 @@ The following [subprojects][subproject-definition] are owned by sig-{{.Label}}:
### {{.Name}}
{{- if .Description }}
{{ trimSpace .Description }}
{{- end }}
{{- if .Leads }}
- **Leads:**{{ range .Leads }}
- {{.Name}} (**[@{{.GitHub}}](https://github.com/{{.GitHub}})**){{if .Company}}, {{.Company}}{{end}}
{{- end }}
{{- end }}
- **Owners:**
{{- range .Owners }}