Skip to content

Commit 705ea74

Browse files
committed
(generator): change generator to allow for subproject leads
Signed-off-by: Nabarun Pal <[email protected]>
1 parent 9cf733b commit 705ea74

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

generator/app.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ type Subproject struct {
230230
Description string `yaml:",omitempty"`
231231
Contact *Contact `yaml:",omitempty"`
232232
Owners []string
233+
Leads []Person `yaml:",omitempty"`
233234
Meetings []Meeting `yaml:",omitempty"`
234235
}
235236

@@ -395,6 +396,9 @@ func (c *Context) Sort() {
395396
return subproject.Contact.GithubTeams[i].Name < subproject.Contact.GithubTeams[j].Name
396397
})
397398
}
399+
sort.Slice(subproject.Leads, func(i, j int) bool {
400+
return subproject.Leads[i].GitHub < subproject.Leads[j].GitHub
401+
})
398402
sort.Strings(subproject.Owners)
399403
sort.Slice(subproject.Meetings, func(i, j int) bool {
400404
return subproject.Meetings[i].Description < subproject.Meetings[j].Description

generator/sig_readme.tmpl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ The following [subprojects][subproject-definition] are owned by sig-{{.Label}}:
8989
### {{.Name}}
9090
{{- if .Description }}
9191
{{ trimSpace .Description }}
92+
{{- end }}
93+
{{- if .Leads }}
94+
- **Leads:**{{ range .Leads }}
95+
- {{.Name}} (**[@{{.GitHub}}](https://github.com/{{.GitHub}})**){{if .Company}}, {{.Company}}{{end}}
96+
{{- end }}
97+
9298
{{- end }}
9399
- **Owners:**
94100
{{- range .Owners }}

0 commit comments

Comments
 (0)