|
| 1 | +# How to Contribute to Jaeger |
| 2 | + |
| 3 | +We'd love your help! |
| 4 | + |
| 5 | +Jaeger is [Apache 2.0 licensed](LICENSE) and accepts contributions via GitHub |
| 6 | +pull requests. This document outlines some of the conventions on development |
| 7 | +workflow, commit message formatting, contact points and other resources to make |
| 8 | +it easier to get your contribution accepted. |
| 9 | + |
| 10 | +We gratefully welcome improvements to documentation as well as to code. |
| 11 | + |
| 12 | +# Certificate of Origin |
| 13 | + |
| 14 | +By contributing to this project you agree to the [Developer Certificate of |
| 15 | +Origin](https://developercertificate.org/) (DCO). This document was created |
| 16 | +by the Linux Kernel community and is a simple statement that you, as a |
| 17 | +contributor, have the legal right to make the contribution. See the [DCO](DCO) |
| 18 | +file for details. |
| 19 | + |
| 20 | +## Making A Change |
| 21 | + |
| 22 | +*Before making any significant changes, please [open an |
| 23 | +issue](https://github.com/uber/jaeger/issues).* Discussing your proposed |
| 24 | +changes ahead of time will make the contribution process smooth for everyone. |
| 25 | + |
| 26 | +Once we've discussed your changes and you've got your code ready, make sure |
| 27 | +that tests are passing (`make test-ci`) and open your PR. Your |
| 28 | +pull request is most likely to be accepted if: |
| 29 | + |
| 30 | +* It has a [good commit |
| 31 | + message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html). |
| 32 | +* Each commit must be signed by the author ([see below](#sign-your-work)). |
| 33 | + |
| 34 | +## License |
| 35 | + |
| 36 | +By contributing your code, you agree to license your contribution under the terms |
| 37 | +of the [Apache License](LICENSE). |
| 38 | + |
| 39 | +If you are adding a new file it should have a header like below. |
| 40 | + |
| 41 | +``` |
| 42 | +// Copyright (c) 2017 The Jaeger Authors. |
| 43 | +// |
| 44 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 45 | +// you may not use this file except in compliance with the License. |
| 46 | +// You may obtain a copy of the License at |
| 47 | +// |
| 48 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 49 | +// |
| 50 | +// Unless required by applicable law or agreed to in writing, software |
| 51 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 52 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 53 | +// See the License for the specific language governing permissions and |
| 54 | +// limitations under the License. |
| 55 | +``` |
| 56 | + |
| 57 | +## Sign your work |
| 58 | + |
| 59 | +The sign-off is a simple line at the end of the explanation for the |
| 60 | +patch, which certifies that you wrote it or otherwise have the right to |
| 61 | +pass it on as an open-source patch. The rules are pretty simple: if you |
| 62 | +can certify the below (from |
| 63 | +[developercertificate.org](http://developercertificate.org/)): |
| 64 | + |
| 65 | +``` |
| 66 | +Developer Certificate of Origin |
| 67 | +Version 1.1 |
| 68 | +
|
| 69 | +Copyright (C) 2004, 2006 The Linux Foundation and its contributors. |
| 70 | +660 York Street, Suite 102, |
| 71 | +San Francisco, CA 94110 USA |
| 72 | +
|
| 73 | +Everyone is permitted to copy and distribute verbatim copies of this |
| 74 | +license document, but changing it is not allowed. |
| 75 | +
|
| 76 | +
|
| 77 | +Developer's Certificate of Origin 1.1 |
| 78 | +
|
| 79 | +By making a contribution to this project, I certify that: |
| 80 | +
|
| 81 | +(a) The contribution was created in whole or in part by me and I |
| 82 | + have the right to submit it under the open source license |
| 83 | + indicated in the file; or |
| 84 | +
|
| 85 | +(b) The contribution is based upon previous work that, to the best |
| 86 | + of my knowledge, is covered under an appropriate open source |
| 87 | + license and I have the right under that license to submit that |
| 88 | + work with modifications, whether created in whole or in part |
| 89 | + by me, under the same open source license (unless I am |
| 90 | + permitted to submit under a different license), as indicated |
| 91 | + in the file; or |
| 92 | +
|
| 93 | +(c) The contribution was provided directly to me by some other |
| 94 | + person who certified (a), (b) or (c) and I have not modified |
| 95 | + it. |
| 96 | +
|
| 97 | +(d) I understand and agree that this project and the contribution |
| 98 | + are public and that a record of the contribution (including all |
| 99 | + personal information I submit with it, including my sign-off) is |
| 100 | + maintained indefinitely and may be redistributed consistent with |
| 101 | + this project or the open source license(s) involved. |
| 102 | +``` |
| 103 | + |
| 104 | +then you just add a line to every git commit message: |
| 105 | + |
| 106 | + Signed-off-by: Joe Smith <[email protected]> |
| 107 | + |
| 108 | +using your real name (sorry, no pseudonyms or anonymous contributions.) |
| 109 | + |
| 110 | +You can add the sign off when creating the git commit via `git commit -s`. |
| 111 | + |
| 112 | +If you want this to be automatic you can set up some aliases: |
| 113 | + |
| 114 | +``` |
| 115 | +git config --add alias.amend "commit -s --amend" |
| 116 | +git config --add alias.c "commit -s" |
| 117 | +``` |
0 commit comments