Ben Vanik | 363fa07 | 2019-09-19 10:26:25 -0700 | [diff] [blame] | 1 | # How to Contribute |
| 2 | |
| 3 | We'd love to accept your patches and contributions to this project. There are |
| 4 | just a 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 | |
Ben Vanik | 850152b | 2019-09-25 15:53:03 -0700 | [diff] [blame] | 18 | ## Changes Accepted |
| 19 | |
| 20 | Please file issues before doing substantial work; this will ensure that others |
| 21 | don't duplicate the work and that there's a chance to discuss any design issues. |
| 22 | |
| 23 | Changes only tweaking style are unlikely to be accepted unless they are applied |
| 24 | consistently across the project. Most of the code style is derived from the |
| 25 | [Google Style Guides](http://google.github.io/styleguide/) for the appropriate |
| 26 | language and is generally not something we accept changes on (as clang-format |
Geoffrey Martin-Noble | d09fe25 | 2020-06-26 18:00:03 -0700 | [diff] [blame] | 27 | and 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). |
| 29 | Improvements to code structure and clarity are welcome but please file issues to |
| 30 | track such work first. |
Ben Vanik | 850152b | 2019-09-25 15:53:03 -0700 | [diff] [blame] | 31 | |
Geoffrey Martin-Noble | 552d3f8 | 2021-05-25 17:56:09 -0700 | [diff] [blame] | 32 | ## AUTHORS file |
| 33 | |
| 34 | If you would like to receive additional recognition for your contribution, you |
| 35 | may add yourself (or your organization) to the AUTHORS file. This keeps track of |
| 36 | those who have made significant contributions to the project. Please add the |
| 37 | entity who owns the copyright for your contribution. The source control history |
| 38 | remains the most accurate source for individual contributions. |
| 39 | |
Ben Vanik | 363fa07 | 2019-09-19 10:26:25 -0700 | [diff] [blame] | 40 | ## Code reviews |
| 41 | |
| 42 | All submissions, including submissions by project members, require review. We |
Geoffrey Martin-Noble | a8004a9 | 2019-12-12 14:04:45 -0800 | [diff] [blame] | 43 | use GitHub pull requests (PRs) for this purpose. Consult |
Ben Vanik | 363fa07 | 2019-09-19 10:26:25 -0700 | [diff] [blame] | 44 | [GitHub Help](https://help.github.com/articles/about-pull-requests/) for more |
| 45 | information on using pull requests. |
| 46 | |
Geoffrey Martin-Noble | 857e1d2 | 2020-05-14 10:05:20 -0700 | [diff] [blame] | 47 | ## Presubmits |
| 48 | |
| 49 | Several of our presubmit builds will only run automatically if you are a project |
| 50 | collaborator. Otherwise a collaborator must label the PR with "kokoro:run". If |
| 51 | you are sending code changes to the project, please ask to be added as a |
Geoffrey Martin-Noble | d09fe25 | 2020-06-26 18:00:03 -0700 | [diff] [blame] | 52 | collaborator, so that these can run automatically. It is generally expected that |
| 53 | PRs will only be merged when all presubmit checks are passing. In some cases, |
| 54 | pre-existing failures may be ignored. |
| 55 | |
| 56 | ## Merging |
| 57 | |
| 58 | After review and presubmit checks, PRs should be merged with a "squash and |
| 59 | merge". The squashed commit summary should match the PR title and the commit |
| 60 | description should match the PR body. Accordingly, please write these as you |
| 61 | would a helpful commit message. Please also keep PRs small (focused on a single |
| 62 | issue) to streamline review and ease later culprit-finding. It is assumed that |
Geoffrey Martin-Noble | 37b9a5e | 2020-07-08 09:26:49 -0700 | [diff] [blame] | 63 | the PR author will merge their change unless they ask someone else to merge it |
| 64 | for them (e.g. because they don't have write access). |
Geoffrey Martin-Noble | 857e1d2 | 2020-05-14 10:05:20 -0700 | [diff] [blame] | 65 | |
Geoffrey Martin-Noble | d56d8ee | 2020-04-14 16:13:48 -0700 | [diff] [blame] | 66 | ## Peculiarities |
| 67 | |
Geoffrey Martin-Noble | d56d8ee | 2020-04-14 16:13:48 -0700 | [diff] [blame] | 68 | Our documentation on |
Scott Todd | a4ec14b | 2021-05-04 13:43:09 -0700 | [diff] [blame] | 69 | [repository management](https://github.com/google/iree/blob/main/docs/developers/developing_iree/repository_management.md) |
Geoffrey Martin-Noble | d56d8ee | 2020-04-14 16:13:48 -0700 | [diff] [blame] | 70 | has more information on some of the oddities in our repository setup and |
Geoffrey Martin-Noble | d09fe25 | 2020-06-26 18:00:03 -0700 | [diff] [blame] | 71 | workflows. For the most part, these should be transparent to normal developer |
Geoffrey Martin-Noble | d56d8ee | 2020-04-14 16:13:48 -0700 | [diff] [blame] | 72 | workflows. |
| 73 | |
Ben Vanik | 363fa07 | 2019-09-19 10:26:25 -0700 | [diff] [blame] | 74 | ## Community Guidelines |
| 75 | |
| 76 | This project follows |
| 77 | [Google's Open Source Community Guidelines](https://opensource.google.com/conduct/). |