blob: d0b73b12b8066b6be3779ea834eb4af78206ff4f [file] [log] [blame] [view]
Ben Vanik363fa072019-09-19 10:26:25 -07001# How to Contribute
2
3We'd love to accept your patches and contributions to this project. There are
4just a few small guidelines you need to follow.
5
6## Contributor License Agreement
7
8Contributions to this project must be accompanied by a Contributor License
9Agreement. You (or your employer) retain the copyright to your contribution;
10this simply gives us permission to use and redistribute your contributions as
11part of the project. Head over to <https://cla.developers.google.com/> to see
12your current agreements on file or to sign a new one.
13
14You 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
16again.
17
Ben Vanik850152b2019-09-25 15:53:03 -070018## Changes Accepted
19
20Please file issues before doing substantial work; this will ensure that others
21don't duplicate the work and that there's a chance to discuss any design issues.
22
23Changes only tweaking style are unlikely to be accepted unless they are applied
24consistently across the project. Most of the code style is derived from the
25[Google Style Guides](http://google.github.io/styleguide/) for the appropriate
26language and is generally not something we accept changes on (as clang-format
Geoffrey Martin-Nobled09fe252020-06-26 18:00:03 -070027and clang-tidy handle that for us). The compiler portion of the project follows
28[MLIR style](https://mlir.llvm.org/getting_started/DeveloperGuide/#style-guide).
29Improvements to code structure and clarity are welcome but please file issues to
30track such work first.
Ben Vanik850152b2019-09-25 15:53:03 -070031
Geoffrey Martin-Noble552d3f82021-05-25 17:56:09 -070032## AUTHORS file
33
34If you would like to receive additional recognition for your contribution, you
35may add yourself (or your organization) to the AUTHORS file. This keeps track of
36those who have made significant contributions to the project. Please add the
37entity who owns the copyright for your contribution. The source control history
38remains the most accurate source for individual contributions.
39
Ben Vanik363fa072019-09-19 10:26:25 -070040## Code reviews
41
42All submissions, including submissions by project members, require review. We
Geoffrey Martin-Noblea8004a92019-12-12 14:04:45 -080043use GitHub pull requests (PRs) for this purpose. Consult
Ben Vanik363fa072019-09-19 10:26:25 -070044[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more
45information on using pull requests.
46
Geoffrey Martin-Noble857e1d22020-05-14 10:05:20 -070047## Presubmits
48
49Several of our presubmit builds will only run automatically if you are a project
50collaborator. Otherwise a collaborator must label the PR with "kokoro:run". If
51you are sending code changes to the project, please ask to be added as a
Geoffrey Martin-Nobled09fe252020-06-26 18:00:03 -070052collaborator, so that these can run automatically. It is generally expected that
53PRs will only be merged when all presubmit checks are passing. In some cases,
54pre-existing failures may be ignored.
55
56## Merging
57
58After review and presubmit checks, PRs should be merged with a "squash and
59merge". The squashed commit summary should match the PR title and the commit
60description should match the PR body. Accordingly, please write these as you
61would a helpful commit message. Please also keep PRs small (focused on a single
62issue) to streamline review and ease later culprit-finding. It is assumed that
Geoffrey Martin-Noble37b9a5e2020-07-08 09:26:49 -070063the PR author will merge their change unless they ask someone else to merge it
64for them (e.g. because they don't have write access).
Geoffrey Martin-Noble857e1d22020-05-14 10:05:20 -070065
Geoffrey Martin-Nobled56d8ee2020-04-14 16:13:48 -070066## Peculiarities
67
Geoffrey Martin-Nobled56d8ee2020-04-14 16:13:48 -070068Our documentation on
Scott Todda4ec14b2021-05-04 13:43:09 -070069[repository management](https://github.com/google/iree/blob/main/docs/developers/developing_iree/repository_management.md)
Geoffrey Martin-Nobled56d8ee2020-04-14 16:13:48 -070070has more information on some of the oddities in our repository setup and
Geoffrey Martin-Nobled09fe252020-06-26 18:00:03 -070071workflows. For the most part, these should be transparent to normal developer
Geoffrey Martin-Nobled56d8ee2020-04-14 16:13:48 -070072workflows.
73
Ben Vanik363fa072019-09-19 10:26:25 -070074## Community Guidelines
75
76This project follows
77[Google's Open Source Community Guidelines](https://opensource.google.com/conduct/).