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