Skip to content

Commit

Permalink
[chore] update CONTRIBUTING to match codeowners generation step (#24556)
Browse files Browse the repository at this point in the history
Fixes #23367

This is the last PR to move to a generated CODEOWNERS file managed via
metadata.

---------

Co-authored-by: Juraci Paixão Kröhling <[email protected]>
  • Loading branch information
atoulme and jpkrohling committed Jul 28, 2023
1 parent 3e1037a commit d3086c7
Showing 1 changed file with 29 additions and 3 deletions.
32 changes: 29 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,36 @@ and the rest of contributors.
and in the respective testing harnesses. To align with the test goal of the project, components must be testable within the framework defined within
the folder. If a component can not be properly tested within the existing framework, it must increase the non testable
components number with a comment within the PR explaining as to why it can not be tested.
- Add the sponsor for your component and yourself to a new line for your component in the
[`.github/CODEOWNERS`](./.github/CODEOWNERS) file.
- Create a `metadata.yaml` file with at minimum the required fields defined in [metadata-schema.yaml](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/cmd/mdatagen/metadata-schema.yaml).
Here is a minimal representation:
```
type: <name of your component, such as apache, http, haproxy, postgresql>
status:
class: <class of component, one of cmd, connector, exporter, extension, processor or receiver>
stability:
development: [<pick the signals supported: logs, metrics, traces. For extension, use "extension">]
codeowners:
active: [<github account of the sponsor, such as alice>, <your GitHub account if you are already an OpenTelemetry member>]
```
- Run `make generate-gh-issue-templates` to add your component to the dropdown list in the issue templates.
- Create a `metadata.yaml` file with at minimum the required fields defined in [metadata-schema.yaml](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/cmd/mdatagen/metadata-schema.yaml) and use the [metadata generator](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/cmd/mdatagen/README.md#using-the-metadata-generator) to generate the associated code/documentation.
- For README.md, you can start with the following:
```
# <Title of your component>
<!-- status autogenerated section -->
<!-- end autogenerated section -->
```
- Create a `doc.go` file with a generate pragma. For a `fooreceiver`, the file will look like:
```
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
//go:generate mdatagen metadata.yaml
// Package fooreceiver bars.
package fooreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/fooreceiver"
```
- Type `make update-codeowners`. This will trigger the regeneration of the `.github/CODEOWNERS` file and the [metadata generator](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/cmd/mdatagen/README.md#using-the-metadata-generator) to generate the associated code/documentation.

When submitting a component to the community, consider breaking it down into separate PRs as follows:

Expand Down

0 comments on commit d3086c7

Please sign in to comment.