|
| 1 | +# Contributing |
| 2 | + |
| 3 | +Source watcher is [Apache 2.0 licensed](LICENSE) and accepts contributions |
| 4 | +via GitHub pull requests. This document outlines some of the conventions on |
| 5 | +to make it easier to get your contribution accepted. |
| 6 | + |
| 7 | +We gratefully welcome improvements to issues and documentation as well as to |
| 8 | +code. |
| 9 | + |
| 10 | +## Certificate of Origin |
| 11 | + |
| 12 | +By contributing to this project you agree to the Developer Certificate of |
| 13 | +Origin (DCO). This document was created by the Linux Kernel community and is a |
| 14 | +simple statement that you, as a contributor, have the legal right to make the |
| 15 | +contribution. |
| 16 | + |
| 17 | +We require all commits to be signed. By signing off with your signature, you |
| 18 | +certify that you wrote the patch or otherwise have the right to contribute the |
| 19 | +material by the rules of the [DCO](DCO): |
| 20 | + |
| 21 | +`Signed-off-by: Jane Doe <[email protected]>` |
| 22 | + |
| 23 | +The signature must contain your real name |
| 24 | +(sorry, no pseudonyms or anonymous contributions) |
| 25 | +If your `user.name` and `user.email` are configured in your Git config, |
| 26 | +you can sign your commit automatically with `git commit -s`. |
| 27 | + |
| 28 | +## Communications |
| 29 | + |
| 30 | +The project uses Slack: To join the conversation, simply join the |
| 31 | +[CNCF](https://slack.cncf.io/) Slack workspace and use the |
| 32 | +[#flux](https://cloud-native.slack.com/messages/flux/) channel. |
| 33 | + |
| 34 | +The developers use a mailing list to discuss development as well. |
| 35 | +Simply subscribe to [flux-dev on cncf.io](https://lists.cncf.io/g/cncf-flux-dev) |
| 36 | +to join the conversation (this will also add an invitation to your |
| 37 | +Google calendar for our [Flux |
| 38 | +meeting](https://docs.google.com/document/d/1l_M0om0qUEN_NNiGgpqJ2tvsF2iioHkaARDeh6b70B0/edit#)). |
| 39 | + |
| 40 | +### How to run the test suite |
| 41 | + |
| 42 | +Prerequisites: |
| 43 | +* go >= 1.13 |
| 44 | +* kubebuilder >= 2.3 |
| 45 | +* kustomize >= 3.1 |
| 46 | + |
| 47 | +You can run the unit tests by simply doing |
| 48 | + |
| 49 | +```bash |
| 50 | +make test |
| 51 | +``` |
| 52 | + |
| 53 | +## Acceptance policy |
| 54 | + |
| 55 | +These things will make a PR more likely to be accepted: |
| 56 | + |
| 57 | +- a well-described requirement |
| 58 | +- tests for new code |
| 59 | +- tests for old code! |
| 60 | +- new code and tests follow the conventions in old code and tests |
| 61 | +- a good commit message (see below) |
| 62 | +- all code must abide [Go Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments) |
| 63 | +- names should abide [What's in a name](https://talks.golang.org/2014/names.slide#1) |
| 64 | +- code must build on both Linux and Darwin, via plain `go build` |
| 65 | +- code should have appropriate test coverage and tests should be written |
| 66 | + to work with `go test` |
| 67 | + |
| 68 | +In general, we will merge a PR once one maintainer has endorsed it. |
| 69 | +For substantial changes, more people may become involved, and you might |
| 70 | +get asked to resubmit the PR or divide the changes into more than one PR. |
| 71 | + |
| 72 | +### Format of the Commit Message |
| 73 | + |
| 74 | +For Kustomize Controller we prefer the following rules for good commit messages: |
| 75 | + |
| 76 | +- Limit the subject to 50 characters and write as the continuation |
| 77 | + of the sentence "If applied, this commit will ..." |
| 78 | +- Explain what and why in the body, if more than a trivial change; |
| 79 | + wrap it at 72 characters. |
| 80 | + |
| 81 | +The [following article](https://chris.beams.io/posts/git-commit/#seven-rules) |
| 82 | +has some more helpful advice on documenting your work. |
0 commit comments