xref: /aosp_15_r20/external/truth/CONTRIBUTING.md (revision b3996a89512f34bffd8f9a69f0bc726f1b19016a)
1*b3996a89SAndroid Build Coastguard Worker# How to contribute
2*b3996a89SAndroid Build Coastguard Worker
3*b3996a89SAndroid Build Coastguard WorkerWe'd love to accept your patches and contributions to this project. There are a
4*b3996a89SAndroid Build Coastguard Workerjust a few small guidelines you need to follow.
5*b3996a89SAndroid Build Coastguard Worker
6*b3996a89SAndroid Build Coastguard Worker## Contributor License Agreement
7*b3996a89SAndroid Build Coastguard Worker
8*b3996a89SAndroid Build Coastguard WorkerContributions to any Google project must be accompanied by a Contributor License
9*b3996a89SAndroid Build Coastguard WorkerAgreement. This is not a copyright **assignment**, it simply gives Google
10*b3996a89SAndroid Build Coastguard Workerpermission to use and redistribute your contributions as part of the project.
11*b3996a89SAndroid Build Coastguard Worker
12*b3996a89SAndroid Build Coastguard WorkerWhen submitting a pull request, if you have not already signed the
13*b3996a89SAndroid Build Coastguard Worker[Contributor License Agreement (CLA)][CLA], then a bot will remind you.
14*b3996a89SAndroid Build Coastguard WorkerCode cannot even be evaluated without this step.
15*b3996a89SAndroid Build Coastguard Worker
16*b3996a89SAndroid Build Coastguard Worker## Submitting a patch
17*b3996a89SAndroid Build Coastguard Worker
18*b3996a89SAndroid Build Coastguard Worker1.  It's generally best to start by opening a new issue describing the bug or
19*b3996a89SAndroid Build Coastguard Worker    feature you're intending to fix. Even if you think it's relatively minor,
20*b3996a89SAndroid Build Coastguard Worker    it's helpful to know what people are working on. Mention in the initial
21*b3996a89SAndroid Build Coastguard Worker    issue that you are planning to work on that bug or feature so that it can be
22*b3996a89SAndroid Build Coastguard Worker    assigned to you.
23*b3996a89SAndroid Build Coastguard Worker
24*b3996a89SAndroid Build Coastguard Worker2.  Follow the normal process of [forking] the project, and setup a new branch
25*b3996a89SAndroid Build Coastguard Worker    to work in. It's important that each group of changes be done in separate
26*b3996a89SAndroid Build Coastguard Worker    branches in order to ensure that a pull request only includes the commits
27*b3996a89SAndroid Build Coastguard Worker    related to that bug or feature.
28*b3996a89SAndroid Build Coastguard Worker
29*b3996a89SAndroid Build Coastguard Worker3.  Any significant changes should almost always be accompanied by tests. The
30*b3996a89SAndroid Build Coastguard Worker    project already has good test coverage, so look at some of the existing
31*b3996a89SAndroid Build Coastguard Worker    tests if you're unsure how to go about it.
32*b3996a89SAndroid Build Coastguard Worker
33*b3996a89SAndroid Build Coastguard Worker4.  All contributions must be licensed Apache 2.0 and all files must have a copy
34*b3996a89SAndroid Build Coastguard Worker    of the boilerplate licence comment (can be copied from an existing file).
35*b3996a89SAndroid Build Coastguard Worker    Files should be formatted according to Google's [java style guide].
36*b3996a89SAndroid Build Coastguard Worker
37*b3996a89SAndroid Build Coastguard Worker5.  Do your best to have [well-formed commit messages] for each change. This
38*b3996a89SAndroid Build Coastguard Worker    provides consistency throughout the project, and ensures that commit
39*b3996a89SAndroid Build Coastguard Worker    messages are able to be formatted properly by various git tools.
40*b3996a89SAndroid Build Coastguard Worker
41*b3996a89SAndroid Build Coastguard Worker6.  Finally, push the commits to your fork and submit a [pull request].
42*b3996a89SAndroid Build Coastguard Worker
43*b3996a89SAndroid Build Coastguard Worker[CLA]: https://cla.developers.google.com
44*b3996a89SAndroid Build Coastguard Worker[forking]: https://help.github.com/articles/fork-a-repo
45*b3996a89SAndroid Build Coastguard Worker[java style guide]: https://google.github.io/styleguide/javaguide.html
46*b3996a89SAndroid Build Coastguard Worker[well-formed commit messages]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
47*b3996a89SAndroid Build Coastguard Worker[pull request]: https://help.github.com/articles/creating-a-pull-request
48