Skip to content

PR前要做到的7件事 Checklist Before PR

aboutblank edited this page Mar 26, 2019 · 2 revisions

What should you do before making a pull request?
提pull request之前应该做些什么?

  1. npm run dev [compoent] 确保所修改的组件,所有demo功能正常;
    npm run dev [compoent] to make sure every demo works well;

  2. npm run dev [compoent] 查看配置项面板,确保所修改的组件,配置功能正常;
    npm run dev [compoent] check the config panel to make sure every demo works well;

  3. 确保修复的bug、提交的feature有相应的测试用例,可以验证功能;
    Make sure there are enough test cases to verify the bugfix or feature;

  4. npm run api [compoent] 根据代码注释自动生成的中文文档符合期望,补充对应英文文档;
    npm run api [compoent] it will generate Chinese docs(docs/[components]/index.md), add the English version(docs/[components]/index.en-us.md).

  5. Commit 信息合理合法 参考
    Make commit message be concise and clear. what does the scope mean? 说明代码变动的动机,及与以前行为的比对。 Commit可拆分成多行,首行字数不得超过72字,详细说明不限制,例如

    fix(Table): correct index in expandedRowRender / getExpandedColProps
    
     - the step changed from 2 to 1
    

    注意: ChangeLog是自动生成的,内容取自featfix开头的commit信息首行,一条fix会有一条ChangeLog记录,请务必注意commit信息的简洁

    含义解释:

    feat: 新特性
    fix: 修改问题
    refactor: 代码重构
    docs: 文档修改
    style: 代码格式修改, 注意不是 css 修改
    test: 测试用例修改
    chore: 其他修改, 比如构建流程, 依赖管理,辅助工具
    temp: 暂时性的提交
    revert: 代码回滚

  6. 提交PR。保证触发的Travis构建成功,能看到绿色的通过标示。若明显不是由本次修改引起的失败,可尝试重新构建。
    Make sure it pass the Travis. (Retry may help)

  7. 保证Code coverage 代码覆盖率不降低。
    Make sure code coverage will not decrease. travis and codecoverage travis build rebuild

Clone this wiki locally