|
| 1 | +# Contributing |
| 2 | + |
| 3 | +Contributions should be made via pull requests. Pull requests will be reviewed |
| 4 | +by one or more maintainers and merged when acceptable. |
| 5 | + |
| 6 | +This project is in an early state, making the impact of contributions much |
| 7 | +greater than at other stages. In this respect, it is important to consider any |
| 8 | +changes or additions for their future impact more so than their current impact. |
| 9 | + |
| 10 | +## Successful Changes |
| 11 | + |
| 12 | +We ask that before contributing, please make the effort to coordinate with the |
| 13 | +maintainers of the project before submitting large or high impact PRs. This |
| 14 | +will prevent you from doing extra work that may or may not be merged. |
| 15 | + |
| 16 | +PRs that are just submitted without any prior communication will likely be |
| 17 | +summarily closed. |
| 18 | + |
| 19 | +While pull requests are the methodology for submitting changes to code, changes |
| 20 | +are much more likely to be accepted if they are accompanied by additional |
| 21 | +engineering work. While we don't define this explicitly, most of these goals |
| 22 | +are accomplished through communication of the design goals and subsequent |
| 23 | +solutions. Often times, it helps to first state the problem before presenting |
| 24 | +solutions. |
| 25 | + |
| 26 | +Typically, the best methods of accomplishing this are to submit an issue, |
| 27 | +stating the problem. This issue can include a problem statement and a |
| 28 | +checklist with requirements. If solutions are proposed, alternatives should be |
| 29 | +listed and eliminated. Even if the criteria for elimination of a solution is |
| 30 | +frivolous, say so. |
| 31 | + |
| 32 | +Larger changes typically work best with design documents, similar to those found |
| 33 | +in `design/`. These are focused on providing context to the design at the time |
| 34 | +the feature was conceived and can inform future documentation contributions. |
| 35 | + |
| 36 | +## Commit Messages |
| 37 | + |
| 38 | +There are times for one line commit messages and this is not one of them. |
| 39 | +Commit messages should follow best practices, including explaining the context |
| 40 | +of the problem and how it was solved, including in caveats or follow up changes |
| 41 | +required. They should tell the story of the change and provide readers |
| 42 | +understanding of what led to it. |
| 43 | + |
| 44 | +If you're lost about what this even means, please see [How to Write a Git |
| 45 | +Commit Message](http://chris.beams.io/posts/git-commit/) for a start. |
| 46 | + |
| 47 | +In practice, the best approach to maintaining a nice commit message is to |
| 48 | +leverage a `git add -p` and `git commit --amend` to formulate a solid |
| 49 | +changeset. This allows one to piece together a change, as information becomes |
| 50 | +available. |
| 51 | + |
| 52 | +If you squash a series of commits, don't just submit that. Re-write the commit |
| 53 | +message, as if the series of commits was a single stroke of brilliance. |
| 54 | + |
| 55 | +That said, there is no requirement to have a single commit for a PR, as long as |
| 56 | +each commit tells the story. For example, if there is a feature that requires a |
| 57 | +package, it might make sense to have the package in a separate commit then have |
| 58 | +a subsequent commit that uses it. |
| 59 | + |
| 60 | +Remember, you're telling part of the story with the commit message. Don't make |
| 61 | +your chapter weird. |
| 62 | + |
| 63 | +## Sign your work |
| 64 | + |
| 65 | +The sign-off is a simple line at the end of the explanation for the patch. Your |
| 66 | +signature certifies that you wrote the patch or otherwise have the right to pass |
| 67 | +it on as an open-source patch. The rules are pretty simple: if you can certify |
| 68 | +the below (from [developercertificate.org](http://developercertificate.org/)): |
| 69 | + |
| 70 | +``` |
| 71 | +Developer Certificate of Origin |
| 72 | +Version 1.1 |
| 73 | +
|
| 74 | +Copyright (C) 2004, 2006 The Linux Foundation and its contributors. |
| 75 | +660 York Street, Suite 102, |
| 76 | +San Francisco, CA 94110 USA |
| 77 | +
|
| 78 | +Everyone is permitted to copy and distribute verbatim copies of this |
| 79 | +license document, but changing it is not allowed. |
| 80 | +
|
| 81 | +Developer's Certificate of Origin 1.1 |
| 82 | +
|
| 83 | +By making a contribution to this project, I certify that: |
| 84 | +
|
| 85 | +(a) The contribution was created in whole or in part by me and I |
| 86 | + have the right to submit it under the open source license |
| 87 | + indicated in the file; or |
| 88 | +
|
| 89 | +(b) The contribution is based upon previous work that, to the best |
| 90 | + of my knowledge, is covered under an appropriate open source |
| 91 | + license and I have the right under that license to submit that |
| 92 | + work with modifications, whether created in whole or in part |
| 93 | + by me, under the same open source license (unless I am |
| 94 | + permitted to submit under a different license), as indicated |
| 95 | + in the file; or |
| 96 | +
|
| 97 | +(c) The contribution was provided directly to me by some other |
| 98 | + person who certified (a), (b) or (c) and I have not modified |
| 99 | + it. |
| 100 | +
|
| 101 | +(d) I understand and agree that this project and the contribution |
| 102 | + are public and that a record of the contribution (including all |
| 103 | + personal information I submit with it, including my sign-off) is |
| 104 | + maintained indefinitely and may be redistributed consistent with |
| 105 | + this project or the open source license(s) involved. |
| 106 | +``` |
| 107 | + |
| 108 | +Then you just add a line to every git commit message: |
| 109 | + |
| 110 | + Signed-off-by: Joe Smith <joe.smith@email.com> |
| 111 | + |
| 112 | +Use your real name (sorry, no pseudonyms or anonymous contributions.) |
| 113 | + |
| 114 | +If you set your `user.name` and `user.email` git configs, you can sign your |
| 115 | +commit automatically with `git commit -s`. |
| 116 | + |
| 117 | +### Project maintainers |
| 118 | + |
| 119 | +The runV maintainers will be the ones accepting or rejecting any pull request. |
| 120 | +They are listed in the OWNERS files, and there can be one OWNERS file per directory. |
| 121 | + |
| 122 | +The OWNERS files split maintainership into 2 categories: reviewers and approvers. |
| 123 | +All approvers also belong to the reviewers list and there must be at least one |
| 124 | +approval from one member of each list for a pull request to be merged. |
| 125 | + |
| 126 | +Since approvers are also reviewers, they technically can approve a pull request |
| 127 | +without getting another reviewer's approval. However, it is their due diligence |
| 128 | +to rely on reviewers and should use their approval power only in very specific cases. |
0 commit comments