1*60b67249SAndroid Build Coastguard Worker# Contributing 2*60b67249SAndroid Build Coastguard Worker 3*60b67249SAndroid Build Coastguard WorkerWe'd love to accept your patches and contributions to this project. There are 4*60b67249SAndroid Build Coastguard Workerjust a few small guidelines you need to follow. 5*60b67249SAndroid Build Coastguard Worker 6*60b67249SAndroid Build Coastguard Worker## Contributor License Agreement 7*60b67249SAndroid Build Coastguard Worker 8*60b67249SAndroid Build Coastguard WorkerContributions to this project must be accompanied by a Contributor License 9*60b67249SAndroid Build Coastguard WorkerAgreement. You (or your employer) retain the copyright to your contribution; 10*60b67249SAndroid Build Coastguard Workerthis simply gives us permission to use and redistribute your contributions as 11*60b67249SAndroid Build Coastguard Workerpart of the project. Head over to <https://cla.developers.google.com/> to see 12*60b67249SAndroid Build Coastguard Workeryour current agreements on file or to sign a new one. 13*60b67249SAndroid Build Coastguard Worker 14*60b67249SAndroid Build Coastguard WorkerYou generally only need to submit a CLA once, so if you've already submitted one 15*60b67249SAndroid Build Coastguard Worker(even if it was for a different project), you probably don't need to do it 16*60b67249SAndroid Build Coastguard Workeragain. 17*60b67249SAndroid Build Coastguard Worker 18*60b67249SAndroid Build Coastguard Worker## Code Reviews 19*60b67249SAndroid Build Coastguard Worker 20*60b67249SAndroid Build Coastguard WorkerAll submissions, including submissions by project members, require review. We 21*60b67249SAndroid Build Coastguard Workeruse Gerrit for this purpose, we do not currently support GitHub pull requests. 22*60b67249SAndroid Build Coastguard Worker 23*60b67249SAndroid Build Coastguard WorkerSee the 24*60b67249SAndroid Build Coastguard Worker[Gerrit walkthrough](https://gerrit-review.googlesource.com/Documentation/intro-gerrit-walkthrough.html), 25*60b67249SAndroid Build Coastguard Worker[Gerrit user guide](https://gerrit-review.googlesource.com/Documentation/intro-user.html) 26*60b67249SAndroid Build Coastguard Workerand other 27*60b67249SAndroid Build Coastguard Worker[Gerrit documentation](https://gerrit-review.googlesource.com/Documentation/index.html) 28*60b67249SAndroid Build Coastguard Workerfor more information. GitHub users may find the 29*60b67249SAndroid Build Coastguard Worker[walkthrough for GitHub users](https://gerrit-review.googlesource.com/Documentation/intro-gerrit-walkthrough-github.html) 30*60b67249SAndroid Build Coastguard Workerhelpful. 31*60b67249SAndroid Build Coastguard Worker 32*60b67249SAndroid Build Coastguard Worker### Gerrit Commit Hook 33*60b67249SAndroid Build Coastguard Worker 34*60b67249SAndroid Build Coastguard WorkerSet up the 35*60b67249SAndroid Build Coastguard Worker[Gerrit commit hook](https://gerrit-review.googlesource.com/tools/hooks/commit-msg) 36*60b67249SAndroid Build Coastguard Workerto automatically add a `Change-Id` tag to each commit. On Linux you can run: 37*60b67249SAndroid Build Coastguard Worker 38*60b67249SAndroid Build Coastguard Worker```bash 39*60b67249SAndroid Build Coastguard Worker$ f=`git rev-parse --git-dir`/hooks/commit-msg ; mkdir -p $(dirname $f) ; curl -Lo $f https://gerrit-review.googlesource.com/tools/hooks/commit-msg ; chmod +x $f 40*60b67249SAndroid Build Coastguard Worker``` 41*60b67249SAndroid Build Coastguard Worker 42*60b67249SAndroid Build Coastguard Worker## Community Guidelines 43*60b67249SAndroid Build Coastguard Worker 44*60b67249SAndroid Build Coastguard WorkerThis project follows 45*60b67249SAndroid Build Coastguard Worker[Google's Open Source Community Guidelines](https://opensource.google/conduct/). 46*60b67249SAndroid Build Coastguard Worker 47*60b67249SAndroid Build Coastguard Worker## Source Code Headers 48*60b67249SAndroid Build Coastguard Worker 49*60b67249SAndroid Build Coastguard WorkerEvery file containing source code must include copyright and license 50*60b67249SAndroid Build Coastguard Workerinformation. 51*60b67249SAndroid Build Coastguard Worker 52*60b67249SAndroid Build Coastguard WorkerApache header for C and C++ files: 53*60b67249SAndroid Build Coastguard Worker 54*60b67249SAndroid Build Coastguard Worker```javascript 55*60b67249SAndroid Build Coastguard Worker// Copyright 2020 Google LLC 56*60b67249SAndroid Build Coastguard Worker// 57*60b67249SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License"); you may not 58*60b67249SAndroid Build Coastguard Worker// use this file except in compliance with the License. You may obtain a copy of 59*60b67249SAndroid Build Coastguard Worker// the License at 60*60b67249SAndroid Build Coastguard Worker// 61*60b67249SAndroid Build Coastguard Worker// https://www.apache.org/licenses/LICENSE-2.0 62*60b67249SAndroid Build Coastguard Worker// 63*60b67249SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software 64*60b67249SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 65*60b67249SAndroid Build Coastguard Worker// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 66*60b67249SAndroid Build Coastguard Worker// License for the specific language governing permissions and limitations under 67*60b67249SAndroid Build Coastguard Worker// the License. 68*60b67249SAndroid Build Coastguard Worker``` 69*60b67249SAndroid Build Coastguard Worker 70*60b67249SAndroid Build Coastguard WorkerApache header for Python and GN files: 71*60b67249SAndroid Build Coastguard Worker 72*60b67249SAndroid Build Coastguard Worker```python 73*60b67249SAndroid Build Coastguard Worker# Copyright 2020 Google LLC 74*60b67249SAndroid Build Coastguard Worker# 75*60b67249SAndroid Build Coastguard Worker# Licensed under the Apache License, Version 2.0 (the "License"); you may not 76*60b67249SAndroid Build Coastguard Worker# use this file except in compliance with the License. You may obtain a copy of 77*60b67249SAndroid Build Coastguard Worker# the License at 78*60b67249SAndroid Build Coastguard Worker# 79*60b67249SAndroid Build Coastguard Worker# https://www.apache.org/licenses/LICENSE-2.0 80*60b67249SAndroid Build Coastguard Worker# 81*60b67249SAndroid Build Coastguard Worker# Unless required by applicable law or agreed to in writing, software 82*60b67249SAndroid Build Coastguard Worker# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 83*60b67249SAndroid Build Coastguard Worker# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 84*60b67249SAndroid Build Coastguard Worker# License for the specific language governing permissions and limitations under 85*60b67249SAndroid Build Coastguard Worker# the License. 86*60b67249SAndroid Build Coastguard Worker``` 87