blob: 8762e041f718dbd29ba0c3bf65306987b826bb70 [file] [log] [blame]
<!doctype html>
<html lang="zh-CN" dir="ltr" class="docs-wrapper docs-doc-page docs-version-1.4.0 plugin-docs plugin-id-default docs-doc-id-development/development-specification/commit-message">
<head>
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v2.2.0">
<title data-rh="true">Commit Message 须知 | Apache Linkis</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://linkis.apache.org/zh-CN/docs/1.4.0/development/development-specification/commit-message"><meta data-rh="true" name="docusaurus_locale" content="zh-CN"><meta data-rh="true" name="docsearch:language" content="zh-CN"><meta data-rh="true" name="docusaurus_version" content="1.4.0"><meta data-rh="true" name="docusaurus_tag" content="docs-default-1.4.0"><meta data-rh="true" name="docsearch:version" content="1.4.0"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-1.4.0"><meta data-rh="true" property="og:title" content="Commit Message 须知 | Apache Linkis"><meta data-rh="true" name="description" content="本文引用自 https://dolphinscheduler.apache.org/zh-cn/docs/dev/user_doc/contribute/join/commit-message.html"><meta data-rh="true" property="og:description" content="本文引用自 https://dolphinscheduler.apache.org/zh-cn/docs/dev/user_doc/contribute/join/commit-message.html"><link data-rh="true" rel="icon" href="/zh-CN/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://linkis.apache.org/zh-CN/docs/1.4.0/development/development-specification/commit-message"><link data-rh="true" rel="alternate" href="https://linkis.apache.org/docs/1.4.0/development/development-specification/commit-message" hreflang="en"><link data-rh="true" rel="alternate" href="https://linkis.apache.org/zh-CN/docs/1.4.0/development/development-specification/commit-message" hreflang="zh-CN"><link data-rh="true" rel="alternate" href="https://linkis.apache.org/docs/1.4.0/development/development-specification/commit-message" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://AE29KQB3IA-dsn.algolia.net" crossorigin="anonymous"><link rel="alternate" type="application/rss+xml" href="/zh-CN/blog/rss.xml" title="Apache Linkis RSS Feed">
<link rel="alternate" type="application/atom+xml" href="/zh-CN/blog/atom.xml" title="Apache Linkis Atom Feed">
<link rel="alternate" type="application/json" href="/zh-CN/blog/feed.json" title="Apache Linkis JSON Feed">
<link rel="search" type="application/opensearchdescription+xml" title="Apache Linkis" href="/zh-CN/opensearch.xml"><link rel="stylesheet" href="/zh-CN/assets/css/styles.3e8e01b6.css">
<link rel="preload" href="/zh-CN/assets/js/runtime~main.689457d4.js" as="script">
<link rel="preload" href="/zh-CN/assets/js/main.44233f08.js" as="script">
</head>
<body class="navigation-with-keyboard">
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
<div role="region" aria-label="Skip to main content"><a class="skipToContent_fXgn" href="#docusaurus_skipToContent_fallback">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Toggle navigation bar" aria-expanded="false" class="navbar__toggle clean-btn" type="button"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/zh-CN/"><div class="navbar__logo"><img src="/zh-CN/img/logo.png" alt="Apache Linkis Logo" class="themedImage_ToTc themedImage--light_HNdA"><img src="/zh-CN/img/logo.png" alt="Apache Linkis Logo" class="themedImage_ToTc themedImage--dark_i4oU"></div><b class="navbar__title text--truncate">Apache Linkis</b></a><a class="navbar__item navbar__link" href="/zh-CN/download/main">下载</a><a class="navbar__item navbar__link" href="/zh-CN/community/how-to-subscribe">社区</a><a class="navbar__item navbar__link" href="/zh-CN/blog">博客</a><a class="navbar__item navbar__link" href="/zh-CN/team">团队</a><a class="navbar__item navbar__link" href="/zh-CN/user">用户</a><a href="https://docs.qq.com/doc/DUkdTTGhVSlZ0VXVt" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">FAQ</a><div class="navbar__item dropdown dropdown--hoverable"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">Apache</a><ul class="dropdown__menu"><li><a href="https://www.apache.org/" target="_blank" rel="noopener noreferrer" class="dropdown__link">基金会</a></li><li><a href="https://www.apache.org/licenses/" target="_blank" rel="noopener noreferrer" class="dropdown__link">证书</a></li><li><a href="https://www.apache.org/events/current-event" target="_blank" rel="noopener noreferrer" class="dropdown__link">事件</a></li><li><a href="https://www.apache.org/security/" target="_blank" rel="noopener noreferrer" class="dropdown__link">安全</a></li><li><a href="https://www.apache.org/foundation/sponsorship.html" target="_blank" rel="noopener noreferrer" class="dropdown__link">赞助</a></li><li><a href="https://privacy.apache.org/policies/privacy-policy-public.html" target="_blank" rel="noopener noreferrer" class="dropdown__link">Privacy</a></li><li><a href="https://www.apache.org/foundation/thanks.html" target="_blank" rel="noopener noreferrer" class="dropdown__link">致谢</a></li></ul></div></div><div class="navbar__items navbar__items--right"><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">文档</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/zh-CN/docs/latest/about/introduction">1.7.0</a></li><li><a class="dropdown__link" href="/zh-CN/docs/1.6.0/about/introduction">1.6.0</a></li><li><a class="dropdown__link" href="/zh-CN/docs/1.5.0/about/introduction">1.5.0</a></li><li><a class="dropdown__link" href="/zh-CN/docs/1.4.0/about/introduction">1.4.0</a></li><li><a class="dropdown__link" href="/zh-CN/docs/1.8.0/about/introduction">Next(1.8.0)</a></li><li><a class="dropdown__link" href="/zh-CN/versions">All Version</a></li></ul></div><a href="https://github.com/apache/linkis" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link header-github-link" aria-label="GitHub"></a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link"><svg viewBox="0 0 24 24" width="20" height="20" aria-hidden="true" class="iconLanguage_nlXk"><path fill="currentColor" d="M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"></path></svg>简体中文</a><ul class="dropdown__menu"><li><a href="/docs/1.4.0/development/development-specification/commit-message" target="_self" rel="noopener noreferrer" class="dropdown__link" lang="en">English</a></li><li><a href="/zh-CN/docs/1.4.0/development/development-specification/commit-message" target="_self" rel="noopener noreferrer" class="dropdown__link dropdown__link--active" lang="zh-CN">简体中文</a></li></ul></div><div class="searchBox_ZlJk"><button type="button" class="DocSearch DocSearch-Button" aria-label="搜索"><span class="DocSearch-Button-Container"><svg width="20" height="20" class="DocSearch-Search-Icon" viewBox="0 0 20 20" aria-hidden="true"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">搜索</span></span><span class="DocSearch-Button-Keys"></span></button></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div id="docusaurus_skipToContent_fallback" class="main-wrapper mainWrapper_z2l0 docsWrapper_BCFX"><button aria-label="回到顶部" class="clean-btn theme-back-to-top-button backToTopButton_sjWU" type="button"></button><div class="docPage__5DB"><aside class="theme-doc-sidebar-container docSidebarContainer_b6E3"><div class="sidebar_njMd"><nav class="menu thin-scrollbar menu_SIkG"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh-CN/docs/1.4.0/about/introduction">关于 Linkis</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh-CN/docs/1.4.0/feature/overview">版本特性</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh-CN/docs/1.4.0/quick/live-demo">快速体验</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh-CN/docs/1.4.0/deployment/deploy-quick">部署指南</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh-CN/docs/1.4.0/user-guide/how-to-use">使用指南</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh-CN/docs/1.4.0/engine-usage/overview">引擎使用</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh-CN/docs/1.4.0/auth/ldap">安全认证</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh-CN/docs/1.4.0/api/overview">API</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh-CN/docs/1.4.0/architecture/overview">架构设计</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret menu__link--active" aria-expanded="true" href="/zh-CN/docs/1.4.0/development/directory-structure">开发指南</a></div><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-CN/docs/1.4.0/development/directory-structure">目录结构</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-CN/docs/1.4.0/development/build">后端编译</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-CN/docs/1.4.0/development/build-console">管理台编译</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-CN/docs/1.4.0/development/build-docker">Docker 编译</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-CN/docs/1.4.0/development/debug">调试 Debug 指引</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-CN/docs/1.4.0/development/debug-with-helm-charts">容器化开发调试</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-CN/docs/1.4.0/development/new-engine-conn">如何实现新引擎</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-CN/docs/1.4.0/development/new-microservice">如何实现新的微服务</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-CN/docs/1.4.0/development/swwager">Swagger 注解使用</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-CN/docs/1.4.0/development/config">配置参数介绍</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret menu__link--active" aria-expanded="true" tabindex="0" href="/zh-CN/docs/1.4.0/development/development-specification/overview">开发规范</a></div><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-CN/docs/1.4.0/development/development-specification/overview">总览</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-CN/docs/1.4.0/development/development-specification/license">License 须知</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-CN/docs/1.4.0/development/development-specification/programming-specification">编程规约</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/zh-CN/docs/1.4.0/development/development-specification/commit-message">Commit Message 须知</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-CN/docs/1.4.0/development/development-specification/log">日志规范</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-CN/docs/1.4.0/development/development-specification/exception-catch">异常规范</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-CN/docs/1.4.0/development/development-specification/api">接口规范</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-CN/docs/1.4.0/development/development-specification/concurrent">并发规范</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-CN/docs/1.4.0/development/development-specification/path-usage">路径规范</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-CN/docs/1.4.0/development/development-specification/unit-test">测试规约</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-CN/docs/1.4.0/development/development-specification/version-feature-specifications">版本和新特性规范</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-CN/docs/1.4.0/development/development-specification/release-notes">Release-Notes 编写规范</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-CN/docs/1.4.0/development/development-specification/how-to-write-unit-test-code">如何编写单元测试代码</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-CN/docs/1.4.0/development/development-specification/mapper-xml">Mapper XML 规范</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" tabindex="0" href="/zh-CN/docs/1.4.0/development/table/all">表结构</a></div></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh-CN/docs/1.4.0/tuning-and-troubleshooting/overview">调优排障</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh-CN/docs/1.4.0/upgrade/upgrade-from-0.X-to-1.0-guide">升级指南</a></div></li></ul></nav></div></aside><main class="docMainContainer_gTbr"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_VOVn"><div class="theme-doc-version-banner alert alert--warning margin-bottom--md" role="alert"><div>This is documentation for <!-- -->Apache Linkis<!-- --> <b>1.4.0</b>, 非最新版本。</div><div class="margin-top--md">有关最新文档,请参阅最新稳定版本<b><a href="/zh-CN/docs/latest/development/development-specification/commit-message">latest version</a></b> (<!-- -->1.7.0<!-- -->).</div></div><div class="docItemContainer_Djhp"><article><nav class="theme-doc-breadcrumbs breadcrumbsContainer_Z_bl" aria-label="页面路径"><ul class="breadcrumbs" itemscope="" itemtype="https://schema.org/BreadcrumbList"><li class="breadcrumbs__item"><a aria-label="主页面" class="breadcrumbs__link" href="/zh-CN/"><svg viewBox="0 0 24 24" class="breadcrumbHomeIcon_OVgt"><path d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z" fill="currentColor"></path></svg></a></li><li class="breadcrumbs__item"><span class="breadcrumbs__link">开发指南</span><meta itemprop="position" content="1"></li><li class="breadcrumbs__item"><span class="breadcrumbs__link">开发规范</span><meta itemprop="position" content="2"></li><li itemscope="" itemprop="itemListElement" itemtype="https://schema.org/ListItem" class="breadcrumbs__item breadcrumbs__item--active"><span class="breadcrumbs__link" itemprop="name">Commit Message 须知</span><meta itemprop="position" content="3"></li></ul></nav><span class="theme-doc-version-badge badge badge--secondary">版本:1.4.0</span><div class="tocCollapsible_ETCw theme-doc-toc-mobile tocMobile_ITEo"><button type="button" class="clean-btn tocCollapsibleButton_TO0P">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>Commit Message 须知</h1></header><blockquote><p>本文引用自 <a href="https://dolphinscheduler.apache.org/zh-cn/docs/dev/user_doc/contribute/join/commit-message.html" target="_blank" rel="noopener noreferrer">https://dolphinscheduler.apache.org/zh-cn/docs/dev/user_doc/contribute/join/commit-message.html</a></p></blockquote><h3 class="anchor anchorWithStickyNavbar_LWe7" id="1前言">1.前言<a class="hash-link" href="#1前言" title="Direct link to heading"></a></h3><p> 一个好的 commit message 是能够帮助其他的开发者(或者未来的开发者)快速理解相关变更的上下文,同时也可以帮助项目管理人员确定该提交是否适合包含在发行版中。但当我们在查看了很多开源项目的 commit log 后,发现一个有趣的问题,一部分开发者,代码质量很不错,但是 commit message 记录却比较混乱,当其他贡献者或者学习者在查看代码的时候,并不能通过 commit log 很直观的了解
该提交前后变更的目的,正如 Peter Hutterer 所言:Re-establishing the context of a piece of code is wasteful. We can’t avoid it completely, so our efforts should go to reducing it as much as possible. Commit messages can do exactly that and as a result, a commit message shows whether a developer is a good collaborator. 因此,DolphinScheduler 结合其他社区以及 Apache 官方文档制定了该规约。</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="2commit-message-rip">2.Commit Message RIP<a class="hash-link" href="#2commit-message-rip" title="Direct link to heading"></a></h3><h4 class="anchor anchorWithStickyNavbar_LWe7" id="21-明确修改内容">2.1 明确修改内容<a class="hash-link" href="#21-明确修改内容" title="Direct link to heading"></a></h4><p>commit message 应该明确说明该提交解决了哪些问题(bug 修复、功能增强等),以便于用户开发者更好的跟踪问题,明确版本迭代过程中的优化情况。</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="22-关联相应的pull-request-或者issue">2.2 关联相应的Pull Request 或者Issue<a class="hash-link" href="#22-关联相应的pull-request-或者issue" title="Direct link to heading"></a></h4><p>当我们的改动较大的时候,commit message 最好能够关联 GitHub 上的相关 Issue 或者 Pull Request,这样,我们的开发者在查阅代码的时候能够通过关联信息较为迅速的了解改代码提交的上下文情景,如果当前 commit 针对某个 issue,那么可以在 Footer 部分关闭这个 issue。</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="23-统一的格式">2.3 统一的格式<a class="hash-link" href="#23-统一的格式" title="Direct link to heading"></a></h4><p>格式化后的 CommitMessage 能够帮助我们提供更多的历史信息,方便快速浏览,同时也可以直接从 commit 生成 Change Log。</p><p>Commit message 应该包括三个部分:Header,Body 和 Footer。其中,Header 是必需的,Body 和 Footer 可以省略。</p><h5 class="anchor anchorWithStickyNavbar_LWe7" id="header">header<a class="hash-link" href="#header" title="Direct link to heading"></a></h5><p>Header 部分只有一行,包括三个字段:type(必需)、scope(可选)和 subject(必需)。</p><p>[DS-ISSUE编号][type]<!-- --> subject</p><p>(1) type 用于说明 commit 的类别,只允许使用下面7个标识。</p><ul><li>feat:新功能(feature)</li><li>fix:修补bug</li><li>docs:文档(documentation)</li><li>style: 格式(不影响代码运行的变动)</li><li>refactor:重构(即不是新增功能,也不是修改bug的代码变动)</li><li>test:增加测试</li><li>chore:构建过程或辅助工具的变动</li></ul><p>如果 type 为 feat 和 fix,则该 commit 将肯定出现在 Change log 之中。其他情况(docs、chore、style、refactor、test)建议不放入。</p><p>(2)scope</p><p>scope 用于说明 commit 影响的范围,比如 server、remote 等,如果没有更合适的范围,你可以用 *。</p><p>(3) subject</p><p>subject 是 commit 目的的简短描述,不超过50个字符。</p><h5 class="anchor anchorWithStickyNavbar_LWe7" id="body">Body<a class="hash-link" href="#body" title="Direct link to heading"></a></h5><p>Body 部分是对本次 commit 的详细描述,可以分成多行,换行符将以72个字符换行,避免自动换行影响美观。</p><p>Body 部分需要注意以下几点:</p><ul><li><p>使用动宾结构,注意使用现在时,比如使用 change 而非 changed 或 changes</p></li><li><p>首字母不要大写</p></li><li><p>语句最后不需要 ‘.’ (句号) 结尾</p></li></ul><h5 class="anchor anchorWithStickyNavbar_LWe7" id="footer">Footer<a class="hash-link" href="#footer" title="Direct link to heading"></a></h5><p>Footer只适用于两种情况</p><p>(1) 不兼容变动</p><p>如果当前代码与上一个版本不兼容,则 Footer 部分以 BREAKING CHANGE 开头,后面是对变动的描述、以及变动理由和迁移方法。</p><p>(2) 关闭 Issue</p><p>如果当前 commit 针对某个issue,那么可以在 Footer 部分关闭这个 issue,也可以一次关闭多个 issue 。</p><h5 class="anchor anchorWithStickyNavbar_LWe7" id="举个例子">举个例子<a class="hash-link" href="#举个例子" title="Direct link to heading"></a></h5><p>[Linkis-001][docs-zh]<!-- --> add commit message</p><ul><li>commit message RIP</li><li>build some conventions </li><li>help the commit messages become clean and tidy </li><li>help developers and release managers better track issues
and clarify the optimization in the version iteration</li></ul><p>This closes #001</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="3参考文档">3.参考文档<a class="hash-link" href="#3参考文档" title="Direct link to heading"></a></h3><p><a href="https://dolphinscheduler.apache.org/zh-cn/docs/dev/user_doc/contribute/join/commit-message.html" target="_blank" rel="noopener noreferrer">Dolphinscheduler Commit Message 须知</a></p><p><a href="https://cwiki.apache.org/confluence/display/GEODE/Commit+Message+Format" target="_blank" rel="noopener noreferrer">提交消息格式</a></p><p><a href="http://who-t.blogspot.com/2009/12/on-commit-messages.html" target="_blank" rel="noopener noreferrer">关于提交消息</a></p><p><a href="https://mp.weixin.qq.com/s/LKM4IXAY-7dKhTzGu5-oug" target="_blank" rel="noopener noreferrer">RocketMQ 社区操作约定</a></p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/apache/linkis-website/edit/dev/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.4.0/development/development-specification/commit-message.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_Z9Sw" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>编辑</a></div><div class="col lastUpdated_vwxv"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><a class="pagination-nav__link pagination-nav__link--prev" href="/zh-CN/docs/1.4.0/development/development-specification/programming-specification"><div class="pagination-nav__sublabel">上一篇</div><div class="pagination-nav__label">编程规约</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/zh-CN/docs/1.4.0/development/development-specification/log"><div class="pagination-nav__sublabel">下一篇</div><div class="pagination-nav__label">日志规范</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#1前言" class="table-of-contents__link toc-highlight">1.前言</a></li><li><a href="#2commit-message-rip" class="table-of-contents__link toc-highlight">2.Commit Message RIP</a></li><li><a href="#3参考文档" class="table-of-contents__link toc-highlight">3.参考文档</a></li></ul></div></div></div></div></main></div></div><footer class="footer"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Linkis</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/zh-CN/docs/latest/about/introduction">文档</a></li><li class="footer__item"><a class="footer__link-item" href="/zh-CN/faq/main">FAQ</a></li><li class="footer__item"><a href="https://github.com/apache/linkis/releases" target="_blank" rel="noopener noreferrer" class="footer__link-item">版本</a></li></ul></div><div class="col footer__col"><div class="footer__title">社区</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://github.com/apache/linkis" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub</a></li><li class="footer__item"><a href="https://github.com/apache/linkis/issues" target="_blank" rel="noopener noreferrer" class="footer__link-item">Issue Tracker</a></li><li class="footer__item"><a href="https://github.com/apache/linkis/pulls" target="_blank" rel="noopener noreferrer" class="footer__link-item">Pull Requests</a></li></ul></div><div class="col footer__col"><div class="footer__title">订阅邮件组</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/zh-CN/community/how-to-subscribe">如何订阅</a></li><li class="footer__item"><a href="mailto:dev-subscribe@linkis.apache.org" target="_blank" rel="noopener noreferrer" class="footer__link-item">订阅邮件</a></li><li class="footer__item"><a href="https://lists.apache.org/list.html?dev@linkis.apache.org" target="_blank" rel="noopener noreferrer" class="footer__link-item">邮件归档</a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright"><div style="text-align: left;">
<div>
<p style="font-family: Avenir-Medium;font-size: 14px;color: #999;line-height: 20px;">Apache Linkis is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.</p>
</div>
<div style="border-top: 1px solid #ccc;min-height: 60px;line-height: 20px;text-align: center;font-family: Avenir-Medium;font-size: 14px;color: #999;display: flex;align-items: center;"><span>Copyright © 2019-2020 The Apache Software Foundation. Apache Linkis, Linkis, and its feather logo are trademarks of The Apache Software Foundation.</span></div>
</div></div></div></div></footer></div>
<script src="/zh-CN/assets/js/runtime~main.689457d4.js"></script>
<script src="/zh-CN/assets/js/main.44233f08.js"></script>
</body>
</html>