- 暂无
代码贡献请遵循如下工作流:
-
首次,你需要 fork the repository on GitHub, 检出你 fork 的代码至本地,然后 将本地fork同步到上游, 并且确保在每次开始变更前已经同步了最新的上游.
-
为你打算做的改动创建一个分支。如果你的贡献是基于已知的Issue,建议用以下方式命名你的分支:"[feat|fix]--<简短描述>"。 在你本地创建分支:
git checkout -b feat-17-support-statefulset
当你的修改就绪时,就可以提交,如果与issues相关,可以在提交信息中提及Issue ID。
git add . git commit -m "feat: #17 support statefulset ......" git push -u origin feat-17-support-statefulset
注意: 如果在自己分支开发阶段,如有需要合并最新的
master
, 请在本地环境配置git rebase
,从而避免出现无效的提交信息,具体配置指令如下:# branch.autosetuprebase only changes the default pull “mode” for new branches that have an upstream to track. git config branch.autosetuprebase always # use the pull.rebase config option to change the behavior for every git pull (instead of only newly-created branches) git config pull.rebase true
-
如果您提交的代码涉及到数据迁移,请在
internal/migrations
目录下添加迁移脚本,并在migration.go
中注册该脚本type MigrationXXXXX struct { } func (m MigrationXXXXX) GetCreateAt() time.Time{ //时间请设定为提交代码的当前时间,以便于系统自动记录迁移历史 return time.Date(2022, 1, 1, 0, 0, 0, 0, time.Local) } func (m Migration20220101) Upgrade(ormer orm.Ormer) error{ //样例代码如下,err不为nil时,会自动回滚所有操作 /* err := ormer.Raw(xxxx).Exec() return err */ }
//在migrations.go中 func InitMigration() { migrationTypes := MigrationTypes{ //注册 new(MigrationXXXXX), //... } }
-
Create a pull request to the main repository on GitHub.
-
When the reviewer makes some comments, address any feedback that comes and update the pull request.
-
When your contribution is accepted, your pull request will be approved and merged to the main branch.
The workflow for documentation is similar. Please take into account a few things:
- All documentation is written using the Markdown.
- We store the documentation as *.md files in the atomci-docs. The documentation is licensed under the MIT License.
After you make changes, you can use yarn run dev
commands have a preview locally.