提交规范

提交规范

注意: 本节主要以内部的最佳实践分享,非强制要求。

Puppet Modules使用git做版本控制工具,因此我们这里不会去重复git文档中的基础知识点。

我们这里主要提及的有以下几点:

  • 每次commit中应该包含哪些代码?

  • commit message的格式应该怎么写?

  • 代码提交是否应该和其他系统关联?

1.提交规范说明

  • 每次提交只包含相关的Puppet代码逻辑和单元测试

  • 第一行是commit的简短描述

  • 在第一行和后面段落之间插入一个空行

  • 提供针对本次commit的详细描述(可选)

  • 本次提交的类型,Type是:(BF|NF|RF|OT|BugFix|NewFeature|ReFactor|Other)

  • 关联JIRA issue,Jira: link链接

  • 每行不能超过72个字符

1.1 Type类型说明

1.2 Label类型说明

1.3 格式样例

commit 7c027d40e2b616ba57f7c69f8162a6311461a566
Author: [removed]
Date:   Fri Aug 28 10:14:28 2015 -0700
    Ensure setuptools is somewhat recent

    Due to bugs in older setuptools version parsing
    we need to set a relatively new version of setuptools
    so that parsing works better (and/or correctly).

    This seems especially important on 2.6 which due to
    a busted setuptools (and associated pkg_resources) seems
    to be matching against incorrect versions.

    Type: BF
    Jira: DEVOPS-453
    Change-Id: Ib859c7df955edef0f38c5673bd21a4767c781e4a

Last updated