keep-a-changelog
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesekeep-a-changelog
keep-a-changelog
Add a new version entry to , or restructure the entire file, following
the Keep a Changelog format and
Semantic Versioning.
CHANGELOG.mdWorkflow — new version entry
工作流 — 新增版本条目
- Read to identify the last released version and its date.
CHANGELOG.md - Run to list all commits since that tag. If no tag exists for the last version, use
git log --oneline <last-tag>..HEADand filter manually.git log --oneline - Run to get today's release date — never hardcode it.
date +%Y-%m-%d - Determine the new version number (ask the user if not specified):
- MAJOR bump: breaking changes or major redesign.
- MINOR bump: new features, backward-compatible.
- PATCH bump: bug fixes only.
- Group commits into Keep a Changelog sections (see Section rules below).
- Prepend the new version block immediately after the file header (before the previous latest version).
- Do NOT remove or alter any existing version entries.
- 读取以确定上一个已发布版本及其发布日期。
CHANGELOG.md - 执行列出该标签之后的所有提交。如果上一个版本没有对应的标签,使用
git log --oneline <last-tag>..HEAD并手动筛选。git log --oneline - 执行获取今日发布日期 — 不要硬编码日期。
date +%Y-%m-%d - 确定新版本号(如果未指定则询问用户):
- MAJOR版本升级:包含破坏性变更或重大重构。
- MINOR版本升级:新增向后兼容的功能。
- PATCH版本升级:仅包含Bug修复。
- 将提交归类到Keep a Changelog对应的板块中(见下方板块规则)。
- 将新版本块添加到文件头之后的最靠前位置(在上一个最新版本之前)。
- 不要删除或修改任何已有的版本条目。
Workflow — restructure entire CHANGELOG.md
工作流 — 重构整个CHANGELOG.md
- Read the full and note all existing version blocks.
CHANGELOG.md - Rewrite the file preserving all versions and dates but enforcing:
- Correct header and intro paragraph (see File header below).
- Consistent section names and ordering.
- Bullet style: start each item with a capital letter, no trailing period.
- Run and confirm the latest version date is still accurate.
date +%Y-%m-%d
- 读取完整的,记录所有现有的版本块。
CHANGELOG.md - 重写文件,保留所有版本和日期,但需满足以下要求:
- 正确的文件头和介绍段落(见下方文件头)。
- 统一的板块名称和排序。
- 列表项格式:每个条目首字母大写,末尾不加句号。
- 执行,确认最新版本的日期仍然准确。
date +%Y-%m-%d
File header
文件头
markdown
undefinedmarkdown
undefinedChangelog
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
undefinedAll notable changes to this project will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
undefinedVersion block format
版本块格式
markdown
undefinedmarkdown
undefined[X.Y.Z] - YYYY-MM-DD
[X.Y.Z] - YYYY-MM-DD
Added
Added
- ...
- ...
Changed
Changed
- ...
- ...
Fixed
Fixed
- ...
Omit any section that has no entries. Do not add empty sections.- ...
没有内容的板块请省略,不要添加空板块。Section rules
板块规则
Use only these standard Keep a Changelog section names, in this order when
multiple sections are present:
| Section | When to use |
|---|---|
| New features or capabilities |
| Changes to existing behavior |
| Features marked for future removal |
| Features removed in this release |
| Bug fixes |
| Security-related fixes or improvements |
当存在多个板块时,仅使用以下标准Keep a Changelog板块名称,并按照如下顺序排列:
| 板块名 | 适用场景 |
|---|---|
| 新增功能或能力 |
| 对现有行为的修改 |
| 标记为未来会移除的功能 |
| 本版本中移除的功能 |
| Bug修复 |
| 与安全相关的修复或优化 |
Commit → section mapping heuristics
提交信息到板块的映射规则
- /
feat:/add→ Addednew - /
refactor:/change/rename/move/update→ Changedimprove - /
fix:/bug→ Fixedpatch - /
remove:/delete→ Removeddrop - → Deprecated
deprecate: - /
security:/cve→ Securityvuln - /
docs:/chore:/ci:— omit unless user-facing.test:
When a commit message is ambiguous, infer intent from the diff or file name.
- /
feat:/add→ Addednew - /
refactor:/change/rename/move/update→ Changedimprove - /
fix:/bug→ Fixedpatch - /
remove:/delete→ Removeddrop - → Deprecated
deprecate: - /
security:/cve→ Securityvuln - /
docs:/chore:/ci:— 除非是面向用户的变更,否则省略。test:
当提交信息含义不明确时,从diff内容或文件名推断变更意图。
Style rules
格式规则
- Write in English throughout.
- Each bullet: capital letter, present tense, no trailing period.
Example:
Add retry logic for HTTP requests - Keep bullets concise — one line per entry where possible.
- Wrap code identifiers, file paths, and module names in backticks.
- Never guess dates — always use .
date +%Y-%m-%d
- 全程使用英文编写。
- 每个列表项:首字母大写,使用一般现在时,末尾不加句号。示例:
Add retry logic for HTTP requests - 保持列表项简洁 — 尽可能每个条目只占一行。
- 代码标识符、文件路径、模块名称使用反引号包裹。
- 绝对不要猜测日期 — 始终使用获取。
date +%Y-%m-%d