# 1.3 协作贡献
# 1.3.1 规范说明
首先,感谢大家对于due (opens new window)的关注和支持。为了加快due (opens new window)社区的建设和完善,这里对于如何提交代码作出以下说明:
- 提交的代码须严格遵守的uber-go-guide (opens new window)和due (opens new window)框架的代码风格和命名规范
- 提交的代码应附带相应的单元测试用例,并保证不低于80%的覆盖率
- 提交代码时请注明该提交属于功能模块还是BUG修复
- 提交的功能模块类型代码如有相关的配置选项请完善etc (opens new window)中示例配置
- 提交的功能模块类型代码须提交对应的使用示例到due-examples (opens new window)中
# 1.3.2 贡献代码
准备工作: 如果你没有github账号, 您需要申请一个github账号, 接下来可以继续下一步.
Fork 代码
- 访问 https://github.com/dobyte/due (opens new window)
- 点击 "Fork" 按钮 (位于页面的右上方)
Clone 代码
git clone https://github.com/<your-github-account>/due
cd due
git remote add upstream 'https://github.com/dobyte/due'
1
2
3
2
3
- 创建 feature 分支
git checkout -b feature/my-feature
1
- 同步代码
git fetch upstream
git rebase upstream/main
1
2
2
- 提交 commit
git add .
git commit
git push origin my-feature
1
2
3
2
3
- 提交 PR
访问 https://github.com/dobyte/due,
点击 "Compare" 比较变更并点击 "Pull request" 提交 PR
1
2
3
2
3
可以使用 github desktop (opens new window) 快速发起 PR
# 1.3.3 贡献者
due (opens new window)社区的贡献者: