Keir Mierle | 5d1226f | 2019-10-31 12:23:43 -0700 | [diff] [blame] | 1 | # How to Contribute |
| 2 | |
| 3 | We'd love to accept your patches and contributions to Pigweed. There are just a |
| 4 | few small guidelines you need to follow. |
| 5 | |
| 6 | ## Contributor License Agreement |
| 7 | |
| 8 | Contributions to this project must be accompanied by a Contributor License |
| 9 | Agreement. You (or your employer) retain the copyright to your contribution; |
| 10 | this simply gives us permission to use and redistribute your contributions as |
| 11 | part of the project. Head over to <https://cla.developers.google.com/> to see |
| 12 | your current agreements on file or to sign a new one. |
| 13 | |
| 14 | You generally only need to submit a CLA once, so if you've already submitted one |
| 15 | (even if it was for a different project), you probably don't need to do it |
| 16 | again. |
| 17 | |
| 18 | ## Code reviews |
| 19 | |
| 20 | All Pigweed development happens on Gerrit, following the [typical Gerrit |
| 21 | development workflow](http://ceres-solver.org/contributing.html). |
| 22 | |
| 23 | In the future we may support GitHub pull requests, but until that time we will |
| 24 | close GitHub pull requests and ask that the changes be uploaded to Gerrit |
| 25 | instead. |
| 26 | |
| 27 | ## Community Guidelines |
| 28 | |
| 29 | This project follows [Google's Open Source Community |
| 30 | Guidelines](https://opensource.google/conduct/). |
| 31 | |
| 32 | ## Source Code Headers |
| 33 | |
| 34 | Every Pigweed file containing source code must include copyright and license |
| 35 | information. This includes any JS/CSS files that you might be serving out to |
| 36 | browsers. |
| 37 | |
| 38 | Apache header for C and C++ files: |
| 39 | |
| 40 | ```javascript |
| 41 | // Copyright 2019 The Pigweed Authors |
| 42 | // |
| 43 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not |
Wyatt Hepler | 1a96094 | 2019-11-26 14:13:38 -0800 | [diff] [blame] | 44 | // use this file except in compliance with the License. You may obtain a copy of |
| 45 | // the License at |
Keir Mierle | 5d1226f | 2019-10-31 12:23:43 -0700 | [diff] [blame] | 46 | // |
| 47 | // https://www.apache.org/licenses/LICENSE-2.0 |
| 48 | // |
| 49 | // Unless required by applicable law or agreed to in writing, software |
| 50 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 51 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
Wyatt Hepler | 1a96094 | 2019-11-26 14:13:38 -0800 | [diff] [blame] | 52 | // License for the specific language governing permissions and limitations under |
| 53 | // the License. |
Keir Mierle | 5d1226f | 2019-10-31 12:23:43 -0700 | [diff] [blame] | 54 | ``` |
| 55 | |
| 56 | Apache header for Python and GN files: |
| 57 | |
| 58 | ```python |
| 59 | # Copyright 2019 The Pigweed Authors |
| 60 | # |
| 61 | # Licensed under the Apache License, Version 2.0 (the "License"); you may not |
| 62 | # use this file except in compliance with the License. You may obtain a copy of |
| 63 | # the License at |
| 64 | # |
| 65 | # https://www.apache.org/licenses/LICENSE-2.0 |
| 66 | # |
| 67 | # Unless required by applicable law or agreed to in writing, software |
| 68 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 69 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 70 | # License for the specific language governing permissions and limitations under |
| 71 | # the License. |
| 72 | ``` |