|
| 1 | +# Contributing to RuyiSDK |
| 2 | + |
| 3 | +Thank you for your interest in contributing to RuyiSDK! This document provides guidelines and explains the requirements for contributions to this project. |
| 4 | + |
| 5 | +Read in other languages: |
| 6 | + |
| 7 | +* [中文](./CONTRIBUTING.zh.md) |
| 8 | + |
| 9 | +## Code of Conduct |
| 10 | + |
| 11 | +Please be respectful and considerate of others when contributing to RuyiSDK. We aim to foster an open and welcoming environment for all contributors. |
| 12 | + |
| 13 | +Please follow [the RuyiSDK Code of Conduct](https://ruyisdk.org/en/code_of_conduct). |
| 14 | + |
| 15 | +## Developer's Certificate of Origin (DCO) |
| 16 | + |
| 17 | +We require that all contributions to RuyiSDK are covered under the [Developer's Certificate of Origin (DCO)](https://developercertificate.org/). The DCO is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing. |
| 18 | + |
| 19 | +### What is the DCO? |
| 20 | + |
| 21 | +The DCO is a declaration that you make when you sign-off a commit, simple |
| 22 | +enough that the original text is fully reproduced below. |
| 23 | + |
| 24 | +``` |
| 25 | +Developer Certificate of Origin |
| 26 | +Version 1.1 |
| 27 | +
|
| 28 | +Copyright (C) 2004, 2006 The Linux Foundation and its contributors. |
| 29 | +
|
| 30 | +Everyone is permitted to copy and distribute verbatim copies of this |
| 31 | +license document, but changing it is not allowed. |
| 32 | +
|
| 33 | +
|
| 34 | +Developer's Certificate of Origin 1.1 |
| 35 | +
|
| 36 | +By making a contribution to this project, I certify that: |
| 37 | +
|
| 38 | +(a) The contribution was created in whole or in part by me and I |
| 39 | + have the right to submit it under the open source license |
| 40 | + indicated in the file; or |
| 41 | +
|
| 42 | +(b) The contribution is based upon previous work that, to the best |
| 43 | + of my knowledge, is covered under an appropriate open source |
| 44 | + license and I have the right under that license to submit that |
| 45 | + work with modifications, whether created in whole or in part |
| 46 | + by me, under the same open source license (unless I am |
| 47 | + permitted to submit under a different license), as indicated |
| 48 | + in the file; or |
| 49 | +
|
| 50 | +(c) The contribution was provided directly to me by some other |
| 51 | + person who certified (a), (b) or (c) and I have not modified |
| 52 | + it. |
| 53 | +
|
| 54 | +(d) I understand and agree that this project and the contribution |
| 55 | + are public and that a record of the contribution (including all |
| 56 | + personal information I submit with it, including my sign-off) is |
| 57 | + maintained indefinitely and may be redistributed consistent with |
| 58 | + this project or the open source license(s) involved. |
| 59 | +``` |
| 60 | + |
| 61 | +### How to Sign-Off Commits |
| 62 | + |
| 63 | +You need to add a `Signed-off-by` line to each commit message, which certifies that you agree with the DCO: |
| 64 | + |
| 65 | +``` |
| 66 | +Signed-off-by: Your Name <[email protected]> |
| 67 | +``` |
| 68 | + |
| 69 | +You can add this automatically by using the `-s` or `--signoff` flag when committing: |
| 70 | + |
| 71 | +``` |
| 72 | +git commit -s -m "Your commit message" |
| 73 | +``` |
| 74 | + |
| 75 | +Make sure that the name and email in the signature matches your Git configuration. You can set your Git name and email with: |
| 76 | + |
| 77 | +``` |
| 78 | +git config --global user.name "Your Name" |
| 79 | +git config --global user.email "[email protected]" |
| 80 | +``` |
| 81 | + |
| 82 | +### DCO enforcement in CI |
| 83 | + |
| 84 | +All pull requests go through an automated DCO check in our continuous integration (CI) pipeline. This check verifies that all commits in your pull request have a proper DCO sign-off. If any commits are missing the sign-off, the CI check will fail, and your pull request cannot be merged until the issue is fixed. |
| 85 | + |
| 86 | +## Pull Request Process |
| 87 | + |
| 88 | +1. Fork the repository and create your branch from `main`. |
| 89 | +2. Make your changes, ensuring they follow the project's coding style and conventions. |
| 90 | +3. Add tests if applicable. |
| 91 | +4. Ensure your commits are signed-off with the DCO. |
| 92 | +5. Update documentation if necessary. |
| 93 | +6. Submit a pull request to the main repository. |
| 94 | + |
| 95 | +## Reporting Issues |
| 96 | + |
| 97 | +If you find a bug or have a feature request, please create an issue in [the issue tracker](https://github.com/ruyisdk/docs/issues). |
| 98 | + |
| 99 | +## License |
| 100 | + |
| 101 | +By contributing to RuyiSDK, you agree that your contributions will be licensed under the [Apache 2.0 License](./LICENSE). |
0 commit comments