Skip to content

Commit

Permalink
sigs,generate: update sig-list generation for wgs
Browse files Browse the repository at this point in the history
Adds generation of section for working groups to sig-list.md .

Signed-off-by: Daniel Hiller <[email protected]>
  • Loading branch information
dhiller committed Nov 7, 2024
1 parent 23d7aff commit 700b3c2
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 22 deletions.
17 changes: 13 additions & 4 deletions generators/cmd/sigs/sig-list.gomd
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
-}}
{{- /* gotype: kubevirt.io/community/generators/cmd/sigs.SigListTemplateData */ -}}
{{ define "group" }}|[{{ .Name }}]({{ .Dir }}/charter.md) |[{{ .Label }}](https://github.com/kubevirt/kubevirt/labels/{{ .Label }})|{{ if .Leadership }}<ol>{{ range $index2, $chair := .Leadership.Chairs }}<li>[{{ $chair.Name }}](https://github.com/{{ $chair.Github }}), {{ $chair.Company }}</li>{{ end }}</ol>{{ end }} |{{ if .Contact }}[Slack]({{ .Contact.Slack}})<br/> [Mailing List]({{ .Contact.MailingList }}){{ end }} |<ul>{{ range $index3, $meeting := .Meetings }}<li>{{ $meeting.Description }}: [ {{ $meeting.Day }} at {{ $meeting.Time }} {{ $meeting.TZ }} ({{ $meeting.Frequency }}) ]({{ $meeting.URL }})</li>{{ end }}</ul> |{{ end }}
{{ define "group" }}|[{{ .Name }}]({{ .Dir }}/charter.md) |{{ if .Label }}[{{ .Label }}](https://github.com/kubevirt/kubevirt/labels/{{ .Label }}){{ end }} | {{ if .Leadership }}<ol>{{ range $index2, $chair := .Leadership.Chairs }}<li>[{{ $chair.Name }}](https://github.com/{{ $chair.Github }}), {{ $chair.Company }}</li>{{ end }}</ol>{{ end }} |{{ if .Contact }}[Slack]({{ .Contact.Slack}})<br/> [Mailing List]({{ .Contact.MailingList }}){{ end }} |<ul>{{ range $index3, $meeting := .Meetings }}<li>{{ $meeting.Description }}: [ {{ $meeting.Day }} at {{ $meeting.Time }} {{ $meeting.TZ }} ({{ $meeting.Frequency }}) ]({{ $meeting.URL }})</li>{{ end }}</ul> |{{ end }}
<!---
This is an autogenerated file!

Expand All @@ -41,7 +41,7 @@ Each group's material is in its subdirectory in this project.
### User Groups

| Name | Label [1] | Chairs [2] | Contact | Meetings |
|------|-----------|---------|---------|----------|
|------|-----------|------------|---------|----------|
{{ range $ug := $.Sigs.Usergroups }}{{ template "group" $ug }}
{{ end }}
{{ end }}
Expand All @@ -50,16 +50,25 @@ Each group's material is in its subdirectory in this project.
### Special Interest Groups

| Name | Label [1] | Chairs [2] | Contact | Meetings |
|------|-----------|---------|---------|----------|
|------|-----------|------------|---------|----------|
{{ range $sig := $.Sigs.Sigs }}{{ template "group" $sig }}
{{ end }}
{{end}}

{{ if $.Sigs.Workinggroups }}
### Working Groups

| Name | Label [1] | Chairs [2] | Contact | Meetings |
|------|-----------|------------|---------|----------|
{{ range $wg := $.Sigs.Workinggroups }}{{ template "group" $wg }}
{{ end }}
{{end}}

{{ if $.Sigs.Committees }}
### Committees

| Name | Label [1] | Chairs [2] | Contact | Meetings |
|------|-----------|---------|---------|----------|
|------|-----------|------------|---------|----------|
{{ range $committee := $.Sigs.Committees }}{{ template "group" $committee }}
{{ end }}
{{end}}
Expand Down
40 changes: 22 additions & 18 deletions pkg/sigs/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,28 @@
package sigs

type Sigs struct {
Sigs []*Group `yaml:"sigs"`
Usergroups []*Group `yaml:"usergroups"`
Committees []*Group `yaml:"committees"`
Sigs []*Group `yaml:"sigs"`
Workinggroups []*Group `yaml:"workinggroups"`
Usergroups []*Group `yaml:"usergroups"`
Committees []*Group `yaml:"committees"`
}

type Group struct {
Dir string
Name string
MissionStatement string `yaml:"mission_statement,omitempty"`
Label string `yaml:",omitempty"`
Leadership *Leadership `yaml:",omitempty"`
Meetings []*Meeting `yaml:",omitempty"`
Contact *Contact `yaml:",omitempty"`
SubProjects []*SubProjects `yaml:",omitempty"`
MissionStatement string `yaml:"mission_statement,omitempty"`
Label string `yaml:",omitempty"`
Leadership *Leadership `yaml:",omitempty"`
Meetings []*Meeting `yaml:",omitempty"`
Contact *Contact `yaml:",omitempty"`
SubProjects []*SubProject `yaml:",omitempty"`
}

type Contact struct {
Slack string `yaml:"slack"`
MailingList string `yaml:"mailing_list"`
Teams []*Team `yaml:"teams"`
Slack string `yaml:"slack"`
MailingList string `yaml:"mailing_list"`
Teams []*Team `yaml:"teams"`
Liaison *OrgMember `yaml:"liaison"`
}

type Team struct {
Expand All @@ -59,16 +61,18 @@ type Meeting struct {
}

type Leadership struct {
Chairs []*Chair
Chairs []*OrgMember
}

type Chair struct {
type OrgMember struct {
Github string
Name string
Company string
Company string `yaml:",omitempty"`
}

type SubProjects struct {
Name string
Owners []string
type SubProject struct {
Name string
Description string `yaml:",omitempty"`
Owners []string
Leads []*OrgMember `yaml:",omitempty"`
}

0 comments on commit 700b3c2

Please sign in to comment.