|
1 | 1 | # How to contribute
|
2 | 2 |
|
3 |
| -Operator Lifecycle Manager is Apache 2.0 licensed and accepts contributions via GitHub pull requests. This document outlines some of the conventions on commit message formatting, contact points for developers, and other resources to help get contributions into operator-lifecycle-manager. |
| 3 | +Operator Lifecycle Manager (OLM) is an Apache 2.0 licensed project and accepts contributions via GitHub pull requests (PRs). |
4 | 4 |
|
5 |
| -# Email and Chat |
| 5 | +This document outlines some of the conventions on commit message formatting, contact points for developers, and other resources to help get contributions into the OLM project. |
6 | 6 |
|
7 |
| -- Email: [operator-framework][operator_framework] |
| 7 | +## Communication |
| 8 | + |
| 9 | +- Email: [operator-framework@googlegroups.com][operator_framework] |
| 10 | +- Slack: [#olm-dev][olm-dev] |
| 11 | +- Working Group: [olm-wg][olm-wg] |
8 | 12 |
|
9 | 13 | ## Getting started
|
10 | 14 |
|
11 | 15 | - Fork the repository on GitHub
|
12 | 16 | - See the [developer guide](./DEVELOPMENT.md) for build instructions
|
| 17 | +- Read the [code of conduct](https://github.com/operator-framework/operator-lifecycle-manager/blob/master/code-of-conduct.md) |
13 | 18 |
|
14 | 19 | ## Reporting bugs and creating issues
|
15 | 20 |
|
16 |
| -Reporting bugs is one of the best ways to contribute. However, a good bug report has some very specific qualities, so please read over our short document on [reporting bugs](./doc/dev/reporting_bugs.md) before submitting a bug report. This document might contain links to known issues, another good reason to take a look there before reporting a bug. |
| 21 | +Reporting bugs is one of the best ways to contribute. However, a good bug report has some very specific qualities, so please read over our short document on [reporting bugs](./doc/dev/reporting_bugs.md) before submitting a bug report. Before filing a bug report, ensure the bug hasn't already been reported by searching through the OLM project [Issues][issues]. |
| 22 | + |
| 23 | +Any new contribution should be accompanied by a new or existing issue. This issue can help track work, discuss the design and implementation, and help avoid wasted efforts or multiple people working on the same issue, compared to submitting a PR first. Trivial changes, like fixing a typo in the documentation, do not require the creation of a new issue. |
| 24 | + |
| 25 | +Proposing larger changes to the OLM project may require an enhancement be created in the [operator-framework/enhancements](https://github.com/operator-framework/enhancements/) repository. Enhancements are the primary mechanism for proposing new features to the OLM codebase. Any change to OLM's behavior or existing features, APIs, or architectural changes to the testing harness likely require an enhancement. |
17 | 26 |
|
18 | 27 | ## Contribution flow
|
19 | 28 |
|
20 | 29 | This is a rough outline of what a contributor's workflow looks like:
|
21 | 30 |
|
22 |
| -- Create a topic branch from where to base the contribution. This is usually master. |
| 31 | +- Identify or create an issue. |
| 32 | +- Create a topic branch from where to base the contribution. This is usually the master branch. |
23 | 33 | - Make commits of logical units.
|
24 | 34 | - Make sure commit messages are in the proper format (see below).
|
| 35 | +- Ensure all relevant commit messages contain a valid sign-off message (see below). |
25 | 36 | - Push changes in a topic branch to a personal fork of the repository.
|
26 |
| -- Submit a pull request to operator-framework/operator-lifecycle-manager. |
27 |
| -- The PR must receive a LGTM from two maintainers found in the MAINTAINERS file. |
| 37 | +- Submit a pull request to the operator-framework/operator-lifecycle-manager repository. |
| 38 | +- Wait and respond to feedback from the maintainers listed in the OWNERS file. |
28 | 39 |
|
29 | 40 | Thanks for contributing!
|
30 | 41 |
|
| 42 | +### Code Review |
| 43 | + |
| 44 | +Contributing PRs with a reasonable title and description can go a long way with helping ease the burden of the review process. |
| 45 | + |
| 46 | +It can be helpful after submitting a PR to self-review your changes. This allows you to communicate sections that reviewers should spend time combing over, asking for feedback on a particular implementation, or providing justification for a set of changes in-line ahead of time. |
| 47 | + |
| 48 | +When opening PRs that are in a rough draft or WIP state, prefix the PR description with `WIP: ...` or create a draft PR. This can help save reviewer's time by communicating the state of a PR ahead of time. Draft/WIP PRs can be a good way to get early feedback from reviewers on the implementation, focusing less on smaller details, and more on the general approach of changes. |
| 49 | + |
| 50 | +When contributing changes that require a new dependency, check whether it's feasable to directly vendor that code [without introducing a new dependency](https://go-proverbs.github.io/). |
| 51 | + |
| 52 | +Each PR must be labeled with at least one "lgtm" label and at least one "approved" label before it can be merged. Maintainers that have approval permissions are listed in the "approvers" column in the root [OWNERS][owners] file. |
| 53 | + |
31 | 54 | ### Code style
|
32 | 55 |
|
33 |
| -The coding style suggested by the Golang community is used in operator-lifecycle-manager. See the [style doc](https://github.com/golang/go/wiki/CodeReviewComments) for details. |
| 56 | +The coding style suggested by the Golang community is used throughout the OLM project: |
| 57 | + |
| 58 | +- CodeReviewComments <https://github.com/golang/go/wiki/CodeReviewComments> |
| 59 | +- EffectiveGo: <https://golang.org/doc/effective_go> |
| 60 | + |
| 61 | +In addition to the linked style documentation, OLM formats Golang packages using the [`gofmt`][gofmt] and [`goimports`][goimports] tooling. Before submitting a PR, please run `make lint` locally and commit the results. This will help expedite the review process, focusing less on style conflicts, and more on the design and implementation details. |
| 62 | + |
| 63 | +Please follow this style to make the OLM project easier to review, maintain and develop. |
| 64 | + |
| 65 | +### Sign-off ([DCO][DCO]) |
| 66 | + |
| 67 | +A [sign-off][sign-off] is a line towards the end of a commit message that certifies the commit author(s). |
34 | 68 |
|
35 |
| -Please follow this style to make operator-lifecycle-manager easy to review, maintain and develop. |
| 69 | +For more information on the structuring of commit messages, read the information in the [DCO](https://github.com/apps/dco) application that the OLM projects uses. |
36 | 70 |
|
37 | 71 | ## Documentation
|
38 | 72 |
|
39 |
| -If the contribution changes the existing APIs or user interface it must include sufficient documentation to explain the use of the new or updated feature. Likewise the [CHANGELOG][changelog] should be updated with a summary of the change and link to the pull request. |
| 73 | +If the contribution changes the existing APIs or user interface it must include sufficient documentation to explain the use of the new or updated feature. |
40 | 74 |
|
| 75 | +The OLM documentation mainly lives in the [operator-framework/olm-docs][olm-docs] repository. |
41 | 76 |
|
42 | 77 | [operator_framework]: https://groups.google.com/forum/#!forum/operator-framework
|
43 |
| -[changelog]: https://github.com/operator-framework/operator-lifecycle-manager/blob/master/CHANGELOG.md |
| 78 | +[dco]: <https://developercertificate.org/> |
| 79 | +[owners]: <https://github.com/operator-framework/operator-lifecycle-manager/blob/master/OWNERS> |
| 80 | +[issues]: <https://github.com/operator-framework/operator-lifecycle-manager/issues> |
| 81 | +[olm-docs]: <https://github.com/operator-framework/olm-docs> |
| 82 | +[olm-dev]: <https://kubernetes.slack.com/archives/C0181L6JYQ2> |
| 83 | +[olm-wg]: <https://docs.google.com/document/d/1Zuv-BoNFSwj10_zXPfaS9LWUQUCak2c8l48d0-AhpBw/edit?usp=sharing> |
| 84 | +[sign-off]: <https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---signoff> |
| 85 | +[goimports]: <https://pkg.go.dev/golang.org/x/tools/cmd/goimports> |
| 86 | +[gofmt]: <https://pkg.go.dev/cmd/gofmt> |
0 commit comments