Skip to content

Commit 1816b3e

Browse files
committed
Add support for User Groups in sigs.yaml
1 parent 7efa062 commit 1816b3e

File tree

5 files changed

+72
-1
lines changed

5 files changed

+72
-1
lines changed

generator/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ The documentation follows a template and uses the values from [`sigs.yaml`](/sig
1313
- List: [`list.tmpl`](list.tmpl)
1414
- SIG README: [`sig_readme.tmpl`](sig_readme.tmpl)
1515
- WG README: [`wg_readme.tmpl`](wg_readme.tmpl)
16+
- UG README: [`ug_readme.tmpl`](ug_readme.tmpl)
1617

1718
**Time Zone gotcha**:
1819
Time zones make everything complicated.
@@ -28,6 +29,7 @@ accompanying documentation. This takes the format of three types of doc files:
2829
```
2930
sig-<sig-name>/README.md
3031
wg-<working-group-name>/README.md
32+
ug-<user-group-name>/README.md
3133
sig-list.md
3234
```
3335

generator/app.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ func (e *Group) DirName(prefix string) string {
124124
type Context struct {
125125
Sigs []Group
126126
WorkingGroups []Group
127+
UserGroups []Group
127128
}
128129

129130
func pathExists(path string) bool {
@@ -305,6 +306,10 @@ func main() {
305306
return strings.ToLower(ctx.WorkingGroups[i].Name) <= strings.ToLower(ctx.WorkingGroups[j].Name)
306307
})
307308

309+
sort.Slice(ctx.UserGroups, func(i, j int) bool {
310+
return strings.ToLower(ctx.UserGroups[i].Name) <= strings.ToLower(ctx.UserGroups[j].Name)
311+
})
312+
308313
err = createGroupReadme(ctx.Sigs, "sig")
309314
if err != nil {
310315
log.Fatal(err)
@@ -315,6 +320,11 @@ func main() {
315320
log.Fatal(err)
316321
}
317322

323+
err = createGroupReadme(ctx.UserGroups, "ug")
324+
if err != nil {
325+
log.Fatal(err)
326+
}
327+
318328
fmt.Println("Generating sig-list.md")
319329
outputPath := filepath.Join(baseGeneratorDir, sigListOutput)
320330
err = writeTemplate(filepath.Join(baseGeneratorDir, templateDir, listTemplate), outputPath, "markdown", ctx)

generator/list.tmpl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,13 @@ When the need arises, a [new SIG can be created](sig-creation-procedure.md)
3434
{{- range .WorkingGroups}}
3535
|[{{.Name}}]({{.Dir}}/README.md)|{{range .StakeholderSIGs}}* {{.}}<br>{{end }}|{{range .Leadership.Chairs}}* [{{.Name}}](https://github.com/{{.GitHub}}){{if .Company}}, {{.Company}}{{end}}<br>{{end}}|* [Slack](https://kubernetes.slack.com/messages/{{.Contact.Slack}})<br>* [Mailing List]({{.Contact.MailingList}})|{{range .Meetings}}* {{.Description}}: [{{.Day}}s at {{.Time}} {{.TZ}} ({{.Frequency}})]({{.URL}})<br>{{end}}
3636
{{- end }}
37+
{{- /* TODO: remove the below condition when at least one user group has been added */}}
38+
{{ if .UserGroups }}
39+
### Master User Group List
40+
41+
| Name | Organizers | Contact | Meetings |
42+
|------|------------|---------|----------|
43+
{{- range .UserGroups}}
44+
|[{{.Name}}]({{.Dir}}/README.md)|{{range .Leadership.Chairs}}* [{{.Name}}](https://github.com/{{.GitHub}}){{if .Company}}, {{.Company}}{{end}}<br>{{end}}|* [Slack](https://kubernetes.slack.com/messages/{{.Contact.Slack}})<br>* [Mailing List]({{.Contact.MailingList}})|{{range .Meetings}}* {{.Description}}: [{{.Day}}s at {{.Time}} {{.TZ}} ({{.Frequency}})]({{.URL}})<br>{{end}}
45+
{{- end }}
46+
{{ end }}

generator/ug_readme.tmpl

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{{- template "header" }}
2+
# {{.Name}} User Group
3+
4+
{{ .MissionStatement }}
5+
{{- if .CharterLink }}
6+
The [charter]({{.CharterLink}}) defines the scope and governance of the {{.Name}} User Group.
7+
{{ end }}
8+
{{ if .Meetings -}}
9+
## Meetings
10+
{{- range .Meetings }}
11+
* {{.Description}}: [{{.Day}}s at {{.Time}} {{.TZ}}]({{.URL}}) ({{.Frequency}}). [Convert to your timezone](http://www.thetimezoneconverter.com/?t={{.Time}}&tz={{.TZ | tzUrlEncode}}).
12+
{{- if .ArchiveURL }}
13+
* [Meeting notes and Agenda]({{.ArchiveURL}}).
14+
{{- end }}
15+
{{- if .RecordingsURL }}
16+
* [Meeting recordings]({{.RecordingsURL}}).
17+
{{- end }}
18+
{{- end }}
19+
20+
{{- end }}
21+
{{- if .Leadership }}
22+
{{- if .Leadership.Chairs }}
23+
24+
## Organizers
25+
{{ range .Leadership.Chairs }}
26+
* {{.Name}} (**[@{{.GitHub}}](https://github.com/{{.GitHub}})**){{if .Company}}, {{.Company}}{{end}}
27+
{{- end }}
28+
{{- end }}
29+
{{- end }}
30+
31+
## Contact
32+
* [Slack](https://kubernetes.slack.com/messages/{{.Contact.Slack}})
33+
* [Mailing list]({{.Contact.MailingList}})
34+
{{- if .Label }}
35+
* [Open Community Issues/PRs](https://github.com/kubernetes/community/labels/ug%2F{{.Label}})
36+
{{- end }}
37+
38+
{{ if .Contact.GithubTeams }}
39+
## GitHub Teams
40+
41+
The below teams can be mentioned on issues and PRs in order to get attention from the right people.
42+
Note that the links to display team membership will only work if you are a member of the org.
43+
44+
| Team Name | Details | Description |
45+
| --------- |:-------:| ----------- |
46+
{{- range .Contact.GithubTeams }}
47+
| @kubernetes/{{.Name}} | [link](https://github.com/orgs/kubernetes/teams/{{.Name}}) | {{.Description}} |
48+
{{- end }}
49+
{{ end }}

hack/verify-generated-docs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ make 1>/dev/null
3737
mismatches=0
3838
break=$(printf "=%.0s" $(seq 1 68))
3939

40-
for file in $(ls ${CRT_DIR}/sig-*/README.md ${CRT_DIR}/wg-*/README.md ${CRT_DIR}/sig-list.md ${CRT_DIR}/OWNERS_ALIASES); do
40+
for file in $(ls ${CRT_DIR}/sig-*/README.md ${CRT_DIR}/wg-*/README.md ${CRT_DIR}/ug-*/README.md ${CRT_DIR}/sig-list.md ${CRT_DIR}/OWNERS_ALIASES); do
4141
real=${file#$CRT_DIR/}
4242
if ! diff -q ${file} ${WORKING_DIR}/${real} &>/dev/null; then
4343
echo "${file} does not match ${WORKING_DIR}/${real}";

0 commit comments

Comments
 (0)