diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d7a8a18b6ebdbda013b17679bf031f9739c27b55..e9dd9dc79fd06ebe39989c24506ff9f140f3015c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,5 +1,4 @@ -Contributing to openvela -========================== +# Contributing to openvela \[ English | [简体中文](CONTRIBUTING_zh-cn.md) \] @@ -7,8 +6,7 @@ openvela is developed by an active team of software engineers and researchers. Y openvela mainly follows the Apache License 2.0 license, please refer to the LICENSE file for details. -Sign the CLA ------------------------ +## Sign the CLA In order to participate in community contributions, you need to sign the corresponding Contributor License Agreement (CLA). Here are the specific steps for different platforms: @@ -19,82 +17,46 @@ In order to participate in community contributions, you need to sign the corresp - **GitHub platform**: - After submitting a new Pull Request (PR), the system will prompt you to complete the CLA signing. Please follow the prompts to complete the signing process. -If you have any questions or encounter problems, please feel free to contact us, thank you for your support and contribution to the community! - -Bug reports ------------ +## Bug reports If you think you have found a bug in openvela, first make sure you have tested with the latest version of openvela (your problem may already be fixed). If not, search the issue list to see if there is already a similar problem. -Feature requests ----------------- +## Feature requests Please submit an issue describing the feature you would like to see added, why you need it, and how you expect it to work. -Contributing code and documentation changes -------------------------------------------- +## Contributing code and documentation changes If you want to add new features or fix some bugs to openvela, please check if there are similar issues. If not, please create a new issue to discuss your ideas with others. ### Branch strategy -* **trunk**: The **trunk** branch does not accept pull request -* **dev**: Fork the code from the **dev** branch and push a pull request +- **trunk**: The **trunk** branch does not accept pull request +- **dev**: Fork the code from the **dev** branch and push a pull request ### Tips for code changes -* Following these tips prior to raising a pull request will speed up the review cycle. -* Add integration tests, if applicable -* Lines that are not part of your change should not be edited (e.g. don't format unchanged lines, don't reorder existing imports) -* Add the appropriate license headers to any new files +- Following these tips prior to raising a pull request will speed up the review cycle. +- Add integration tests, if applicable +- Lines that are not part of your change should not be edited (e.g. don't format unchanged lines, don't reorder existing imports) +- Add the appropriate license headers to any new files ### Submitting your changes -* Test your changes - - > Run the test suite to make sure that nothing is broken. - -* Sign the Contributor License Agreement - - > Please make sure you have signed our Contributor License Agreement. We are not asking you to assign copyright to us, but to give us the right to distribute your code without restriction. We ask this of all contributors in order to assure our users of the origin and continuing existence of the code. You only need to sign the CLA once. - -* Rebase your changes - - > Update your local repository with the most recent code from the main openvela repository, and rebase your branch on top of the latest main branch. We prefer your initial changes to be squashed into a single commit. Later, if we ask you to make changes, add them as separate commits. This makes them easier to review. As a final step before merging we will either ask you to squash all commits yourself or we'll do it for you. - -* Submit a pull request - - > Push your local changes to your forked copy of the repository and submit a pull request. In the pull request, choose a title which sums up the changes that you have made, and in the body provide more details about what your changes do. Also mention the number of the issue where discussion has taken place, eg "Closes #123". - - -### How to deal with conflicts - -Normally, you don't need to rebase your pull request unless there is a merge conflict with the master branch. When GitHub prompts that your pull request "cannot be merged automatically", use the following command to rebase your pull request onto the latest master branch: - -1. Rebase to the latest master branch +- Test your changes - ```Bash - git remote add upstream https://github.com/open-vela/[repository].git - git fetch upstream - git rebase upstream/dev - ``` + > Run the test suite to make sure that nothing is broken. -2. Git may show some conflicts when it cannot merge, such as `conflict.cpp`, you need to manually modify the file to resolve the conflict and mark it as resolved after resolution +- Sign the Contributor License Agreement - ```Bash - git add conflict.cpp - ``` + > Please make sure you have signed our Contributor License Agreement. We are not asking you to assign copyright to us, but to give us the right to distribute your code without restriction. We ask this of all contributors in order to assure our users of the origin and continuing existence of the code. You only need to sign the CLA once. -3. You can continue the rebase by the following ways +- Rebase your changes - ```Bash - git rebase --continue - ``` + > Update your local repository with the most recent code from the main openvela repository, and rebase your branch on top of the latest main branch. We prefer your initial changes to be squashed into a single commit. Later, if we ask you to make changes, add them as separate commits. This makes them easier to review. As a final step before merging we will either ask you to squash all commits yourself or we'll do it for you. -4. Push to your fork, and the pull request will be updated +- Submit a pull request - ```Bash - git push --force - ``` \ No newline at end of file + > Push your local changes to your forked copy of the repository and submit a pull request. In the pull request, choose a title which sums up the changes that you have made, and in the body provide more details about what your changes do. Also mention the number of the issue where discussion has taken place, eg "Closes #123". diff --git a/CONTRIBUTING_zh-cn.md b/CONTRIBUTING_zh-cn.md index 03cc25df7c8afd8200403e61b046de66c60f6598..2ab60e0ae760c863bcc6bf987eab2c6a1b7654ba 100644 --- a/CONTRIBUTING_zh-cn.md +++ b/CONTRIBUTING_zh-cn.md @@ -1,5 +1,4 @@ -为 openvela 做出贡献 -==================== +# 为 openvela 做出贡献 \[ [English](CONTRIBUTING.md) | 简体中文 \] @@ -7,8 +6,7 @@ openvela 由一支活跃的软件工程师和研究人员团队开发。欢迎 openvela 主要遵循 Apache License 2.0 许可证,具体请参看 LICENSE 文件。 -签署贡献者许可协议 (CLA) --------- +## 签署贡献者许可协议 (CLA) 为了参与社区贡献,您需要签署相应的“贡献者许可协议”(Contributor License Agreement, CLA)。以下是针对不同平台的具体步骤: @@ -19,83 +17,48 @@ openvela 主要遵循 Apache License 2.0 许可证,具体请参看 LICENSE 文 - **GitHub 平台**: - 在提交新的 Pull Request (PR) 后,系统会提示您完成 CLA 的签署。请根据提示操作以完成签署流程。 -如果您有任何疑问或遇到问题,请随时联系我们,感谢您对社区的支持和贡献! - -错误报告 -------- +## 错误报告 如果您认为在 openvela 中发现了错误,请首先确保您已使用了最新版本的 openvela 进行了测试(您的问题可能已得到修复)。 如果未解决,请搜索问题列表,查看是否已有类似的问题。 -功能请求 -------- +## 功能请求 请提交一个 Issue,描述您希望添加的功能、您需要它的原因以及预期的工作方式。 -贡献代码和文档更改 ----------------- +## 贡献代码和文档更改 如果您想给 openvela 增加新功能或者修复一些错误,先确认是否已有类似的问题。如果没有,您就新建一个问题,和大家讨论您的想法。 ### 分支策略 -* **trunk**:**trunk** 分支不接受 pull request -* **dev**:从 **dev** 分支fork代码,并推送pull request +- **trunk**:**trunk** 分支不接受 pull request +- **dev**:从 **dev** 分支fork代码,并推送pull request ### 提交代码更改提示 在提出拉取请求(pull request)之前遵循这些提示将加快审核周期。 -* 添加适当的单元测试 -* 如果适用,添加集成测试 -* 不属于您更改范围的行不应被编辑(例如,不要格式化未更改的行,不要重新排序现有的导入) -* 在任何新文件中添加适当的许可证标头 +- 添加适当的单元测试 +- 如果适用,添加集成测试 +- 不属于您更改范围的行不应被编辑(例如,不要格式化未更改的行,不要重新排序现有的导入) +- 在任何新文件中添加适当的许可证标头 ### 提交您的更改 -* 测试你的更改 - - 运行测试套件以确保没有出现任何问题。 - -* 签署贡献者许可协议 - - 请确保您已签署我们的贡献者许可协议(CLA)。我们不要求您转让版权,而是确保我们可以无限制地分发您的代码。我们要求所有贡献者签署 CLA,以向用户保证代码的来源和持续存在,您只需签署一次。 - -* 重新设定你的更改 - - 使用主 openvela 存储库中的最新代码更新您的本地存储库,并将您的分支重新定位到最新主分支之上。我们希望您的初始更改被压缩为单个提交。如果我们要求您进行更改,请将它们添加为单独的提交。这有助于审查。作为合并前的最后一步,我们将要求您自己压缩所有提交,或者我们会为您完成。 - -* 提交拉取请求 - - 将本地更改推送到你 fork 的存储库副本并提交拉取请求。在拉取请求中,选择一个简明的标题来总结您的更改,并在正文中提供详细说明。请提及相关问题的编号,例如“关闭 #123”。 - -### 冲突的处理方式 - -通常情况下,除非与主分支存在合并冲突,否则您无需重新定位您的拉取请求。当 GitHub 提示您的拉取请求“无法自动合并”,请使用以下命令将您的拉取请求重新定位到最新的主分支之上: - -1. 重新定位到最新的主分支 +- 测试你的更改 - ```Bash - git remote add upstream https://github.com/open-vela/[repository].git - git fetch upstream - git rebase upstream/dev - ``` + > 运行测试套件以确保没有出现任何问题。 -2. git 可能会在无法合并时显示一些冲突,比如 `conflict.cpp`,需要手动修改文件以解决冲突,解决后将其标记为已解决 +- 签署贡献者许可协议 - ```Bash - git add conflict.cpp - ``` + > 请确保您已签署我们的贡献者许可协议(CLA)。我们不要求您转让版权,而是确保我们可以无限制地分发您的代码。我们要求所有贡献者签署 CLA,以向用户保证代码的来源和持续存在,您只需签署一次。 -3. 你可以通过以下方式继续进行 rebase +- 重新设定你的更改 - ```Bash - git rebase --continue - ``` + > 使用主 openvela 存储库中的最新代码更新您的本地存储库,并将您的分支重新定位到最新主分支之上。我们希望您的初始更改被压缩为单个提交。如果我们要求您进行更改,请将它们添加为单独的提交。这有助于审查。作为合并前的最后一步,我们将要求您自己压缩所有提交,或者我们会为您完成。 -4. 推送到你的 fork,然后 pull request 将会更新 +- 提交拉取请求 - ```Bash - git push --force - ``` \ No newline at end of file + > 将本地更改推送到你 fork 的存储库副本并提交拉取请求。在拉取请求中,选择一个简明的标题来总结您的更改,并在正文中提供详细说明。请提及相关问题的编号,例如“关闭 #123”。