github.com/coreos/rocket@v1.30.1-0.20200224141603-171c416fac02/CONTRIBUTING.md (about) 1 # How to Contribute 2 3 rkt is [Apache 2.0 licensed](LICENSE) and accepts contributions via 4 GitHub pull requests. This document outlines some of the conventions on 5 development workflow, commit message formatting, contact points and other 6 resources to make it easier to get your contribution accepted. 7 8 ### Certificate of Origin 9 10 By contributing to this project you agree to the Developer Certificate of 11 Origin (DCO). This document was created by the Linux Kernel community and is a 12 simple statement that you, as a contributor, have the legal right to make the 13 contribution. See the [DCO](DCO) file for details. 14 15 ### Email and Chat 16 17 The project has a mailing list and two discussion channels in IRC: 18 - Email: [rkt-dev](https://groups.google.com/forum/#!forum/rkt-dev) 19 - IRC: #[rkt](irc://irc.freenode.org:6667/#rkt) on freenode.org, for general discussion 20 - IRC: #[rkt-dev](irc://irc.freenode.org:6667/#rkt-dev) on freenode.org, for development discussion 21 22 Please avoid emailing maintainers found in the MAINTAINERS file directly. They 23 are very busy and read the mailing lists. 24 25 ### Getting Started 26 27 - Fork the repository on GitHub 28 - Read [`building rkt`](Documentation/hacking.md#building-rkt) for build and [`manually-running-the-tests`](tests/README.md#manually-running-the-tests) for test instructions 29 - Play with the project, submit bugs, submit patches! 30 31 ### Contribution Flow 32 33 This is a rough outline of what a contributor's workflow looks like: 34 35 - Create a topic branch from where you want to base your work (usually master). 36 - Make commits of logical units. 37 - Make sure your commit messages are in the proper format (see below). 38 - Push your changes to a topic branch in your fork of the repository. 39 - Make sure the [tests](tests/README.md#manually-running-the-tests) pass, and add any new tests as appropriate. 40 - Submit a pull request to the original repository. 41 - Submit a comment with the sole content "@reviewer PTAL" (please take a look) in GitHub 42 and replace "@reviewer" with the correct recipient. 43 - When addressing pull request review comments add new commits to the existing pull request or, 44 if the added commits are about the same size as the previous commits, 45 squash them into the existing commits. 46 - Once your PR is labelled as "reviewed/lgtm" squash the addressed commits in one commit. 47 - If your PR addresses multiple subsystems reorganize your PR and create multiple commits per subsystem. 48 - Your contribution is ready to be merged. 49 50 Thanks for your contributions! 51 52 ### Coding Style 53 54 Go style in the rkt project essentially just means following the upstream conventions: 55 - [Effective Go][effectivego] 56 - [CodeReviewComments][codereview] 57 - [Godoc][godoc] 58 59 It's recommended to set a save hook in your editor of choice that runs `goimports` against your code. 60 61 [effectivego]: https://golang.org/doc/effective_go.html 62 [codereview]: https://github.com/golang/go/wiki/CodeReviewComments 63 [godoc]: https://blog.golang.org/godoc-documenting-go-code 64 65 ### Documentation Style 66 67 Project docs should follow the [Documentation style and formatting 68 guide](https://github.com/coreos/docs/tree/master/STYLE.md). Thank you for documenting! 69 70 ### Format of the Commit Message 71 72 We follow a rough convention for commit messages that is designed to answer two 73 questions: what changed and why. The subject line should feature the what and 74 the body of the commit should describe the why. 75 76 ``` 77 scripts: add the test-cluster command 78 79 this uses tmux to setup a test cluster that you can easily kill and 80 start for debugging. 81 82 Fixes #38 83 ``` 84 85 The format can be described more formally as follows: 86 87 ``` 88 <subsystem>: <what changed> 89 <BLANK LINE> 90 <why this change was made> 91 <BLANK LINE> 92 <footer> 93 ``` 94 95 The first line is the subject and should be no longer than 70 characters, the 96 second line is always blank, and other lines should be wrapped at 80 characters. 97 This allows the message to be easier to read on GitHub as well as in various 98 git tools. 99 100 ### Format of the Pull Request 101 102 The pull request title and the first paragraph of the pull request description 103 is being used to generate the changelog of the next release. 104 105 The convention follows the same rules as for commit messages. The PR title reflects the 106 what and the first paragraph of the PR description reflects the why. 107 In most cases one can reuse the commit title as the PR title 108 and the commit messages as the PR description for the PR. 109 110 If your PR includes more commits spanning multiple subsystems one should change the PR title 111 and the first paragraph of the PR description to reflect a summary of all changes involved. 112 113 A large PR must be split into multiple commits, each with clear commit messages. 114 Intermediate commits should compile and pass tests. Exceptions to non-compilable must have a valid reason, i.e. dependency bumps. 115 116 Do not add entries in the changelog yourself. They will be overwritten when creating a new release.