Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mdatagen] Add flag to indicate seeking new code owners #9552

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions cmd/mdatagen/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,23 @@ Some info about a component
componentClass: "extension",
distros: []string{"contrib"},
},
{
name: "readme with status with codeowners and seeking new",
markdown: `# Some component

<!-- status autogenerated section -->
<!-- end autogenerated section -->

Some info about a component
`,
outputFile: "readme_with_status_codeowners_and_seeking_new.md",
componentClass: "receiver",
distros: []string{"contrib"},
codeowners: &Codeowners{
Active: []string{"foo"},
SeekingNew: true,
},
},
{
name: "readme with status with codeowners and emeritus",
markdown: `# Some component
Expand Down
2 changes: 2 additions & 0 deletions cmd/mdatagen/statusdata.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ type Codeowners struct {
Active []string `mapstructure:"active"`
// Emeritus codeowners
Emeritus []string `mapstructure:"emeritus"`
// Whether new codeowners are being sought
SeekingNew bool `mapstructure:"seeking_new"`
}

type Status struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/mdatagen/templates/readme.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
{{- if .Status.Codeowners }}
{{- $codeowners := userLinks .Status.Codeowners.Active }}
{{- $emeritus := userLinks .Status.Codeowners.Emeritus }}
| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | {{ stringsJoin $codeowners ", " }} |
| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | {{ stringsJoin $codeowners ", " }} {{ if .Status.Codeowners.SeekingNew }}\| Seeking more code owners! {{ end }}|
{{- if $emeritus }}
| Emeritus | {{ stringsJoin $emeritus ", " }} |
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Some component

<!-- status autogenerated section -->
| Status | |
| ------------- |-----------|
| Stability | [beta]: metrics |
| Distributions | [contrib] |
| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Areceiver%2Ffoo%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Areceiver%2Ffoo) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Areceiver%2Ffoo%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Areceiver%2Ffoo) |
| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@foo](https://www.github.com/foo) \| Seeking more code owners! |
andrzej-stencel marked this conversation as resolved.
Show resolved Hide resolved

[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta
[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib
<!-- end autogenerated section -->

Some info about a component
Loading