conventional-changelog/commitlint

feat: allow initial commit message

已关闭

#3,578 创建于 2023年4月6日

 (1 条评论) (7 个反应) (0 位负责人)TypeScript (896 个派生)batch import
discussionfeaturehelp wanted

仓库指标

星标
 (15,497 个星标)
PR 合并指标
 (平均合并 12小时 56分钟) (30 天内合并 52 个 PR)

描述

Expected Behavior

When creating a new repository, almost all Git tools, in their default configurations, initialize it with a single commit containing the Initial commit message. This is the only exception that doesn't follow the strict conventional commits guidelines.

Current Behavior

When using the commitlint tool (standard configuration) in conjunction with Git Hooks, it checks every commit message to see if it is in the correct conventional commit format. When initializing a new repository manually, the first commit with the message "Initial commit" will fail:

⧗   input: Initial commit
✖   subject may not be empty [subject-empty]
✖   type may not be empty [type-empty]

✖   found 2 problems, 0 warnings
ⓘ   Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint

Affected packages

  • cli
  • core
  • prompt
  • config-angular

Possible Solution

Since Initial commit is the best practice, also in combination with Conventional Commits, I highly suggest updating the default configuration to allow this commit message.

Context

No response

贡献者指南