dev --- 3.8.0.A版本, openProject引用 ; formao-live --- 3.7.0.B 版本, formallProject引用
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CONTRIBUTING.md 2.3 KiB

7 年之前
7 年之前
7 年之前
6 年之前
6 年之前
7 年之前
123456789101112131415161718192021222324252627282930313233343536
  1. # 代码贡献指南
  2. 1. 首先非常欢迎和感谢对本项目发起Pull Request的同学。
  3. 1. **特别提示:请务必在develop分支提交PR,master分支目前仅是正式版的代码,即发布正式版本后才会从develop分支进行合并。**
  4. 1. 本项目代码风格为使用2个空格代表一个Tab,因此在提交代码时请注意一下,否则很容易在IDE格式化代码后与原代码产生大量diff,这样会给其他人阅读代码带来极大的困扰。
  5. 1. 为了便于设置,本项目引入editorconfig支持,请使用Eclipse的同学在贡献代码前安装相关插件,而IntelliJ IDEA新版本自带支持,如果没有可自行安装插件。
  6. 1. **提交代码前,请检查代码是否已经格式化,并且保证新增加或者修改的方法都有完整的参数说明,而public方法必须拥有相应的单元测试并通过测试。**
  7. 1. 本项目可以采用两种方式接受代码贡献:
  8. - 第一种就是基于[Git Flow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow)开发流程,因此在发起Pull Request的时候请选择develop分支,详细步骤参考后文,推荐使用此种方式贡献代码。
  9. - (***暂停此种方式,请使用第一种***)另外一种贡献代码的方式就是加入SDK Developers开发组,前提是对自己的代码足够自信就可以申请加入,加入之后可以随时直接提交代码,但要注意对所做的修改或新增的代码进行单元测试,保证提交代码没有明显问题。
  10. ### PR方式贡献代码步骤
  11. * 在 GitHub 上 `fork` 到自己的仓库,如 `my_user/WxJava`,然后 `clone` 到本地,并设置用户信息。
  12. ```bash
  13. $ git clone git@github.com:{your-github-username}/WxJava.git
  14. $ cd WxJava
  15. $ git config user.name "yourname"
  16. $ git config user.email "your email"
  17. ```
  18. * 修改代码后提交,并推送到自己的仓库。
  19. ```bash
  20. $ #do some change on the content
  21. $ git commit -am "Fix issue #1: change something"
  22. $ git push
  23. ```
  24. * 在 GitHub 网站上提交 Pull Request。
  25. * 定期使用项目仓库内容更新自己仓库内容。
  26. ```bash
  27. $ git remote add upstream https://github.com/Wechat-Group/WxJava
  28. $ git fetch upstream
  29. $ git checkout develop
  30. $ git rebase upstream/develop
  31. $ git push -f origin develop
  32. ```