changelog-manager
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseChangelog Manager
变更日志管理器
Quick Start
快速开始
Create or update a changelog:
bash
undefined创建或更新变更日志:
bash
undefinedReview recent commits
Review recent commits
git log --oneline --since="2024-01-01"
git log --oneline --since="2024-01-01"
Check current version
Check current version
cat package.json | grep version
undefinedcat package.json | grep version
undefinedInstructions
操作步骤
Step 1: Review Changes
步骤1:梳理变更内容
Gather changes since last release:
bash
undefined收集上次版本发布后的所有变更:
bash
undefinedGet commits since last tag
Get commits since last tag
git log $(git describe --tags --abbrev=0)..HEAD --oneline
git log $(git describe --tags --abbrev=0)..HEAD --oneline
Or since specific date
Or since specific date
git log --since="2024-01-01" --pretty=format:"%s"
undefinedgit log --since="2024-01-01" --pretty=format:"%s"
undefinedStep 2: Categorize Changes
步骤2:对变更进行分类
Group by type following Keep a Changelog:
| Category | Description | Examples |
|---|---|---|
| Added | New features | New API endpoint, new command |
| Changed | Changes to existing | Updated algorithm, changed default |
| Deprecated | Soon-to-be removed | Old API marked deprecated |
| Removed | Removed features | Deleted unused function |
| Fixed | Bug fixes | Fixed crash, corrected calculation |
| Security | Security fixes | Patched vulnerability |
按照Keep a Changelog的要求按类型分组:
| 分类 | 描述 | 示例 |
|---|---|---|
| Added(新增) | 新功能 | 新API端点、新命令 |
| Changed(变更) | 对现有功能的修改 | 算法更新、默认值调整 |
| Deprecated(弃用) | 即将移除的功能 | 标记为弃用的旧API |
| Removed(移除) | 已移除的功能 | 删除未使用的函数 |
| Fixed(修复) | 漏洞修复 | 修复崩溃问题、修正计算逻辑 |
| Security(安全) | 安全修复 | 修补漏洞 |
Step 3: Format Entry
步骤3:格式化条目
Follow Keep a Changelog format:
markdown
undefined遵循Keep a Changelog格式:
markdown
undefined[Version] - YYYY-MM-DD
[Version] - YYYY-MM-DD
Added
Added
- New feature description
- Another new feature
- New feature description
- Another new feature
Changed
Changed
- Modified behavior description
- Modified behavior description
Fixed
Fixed
- Bug fix description
undefined- Bug fix description
undefinedStep 4: Update CHANGELOG.md
步骤4:更新CHANGELOG.md
Add new entry at the top (after "Unreleased"):
markdown
undefined在顶部(“Unreleased”部分之后)添加新条目:
markdown
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.
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.
[Unreleased]
[Unreleased]
[2.1.0] - 2024-01-15
[2.1.0] - 2024-01-15
Added
Added
- User authentication with JWT tokens
- Rate limiting for API endpoints
- User authentication with JWT tokens
- Rate limiting for API endpoints
Changed
Changed
- Updated database schema for better performance
- Improved error messages
- Updated database schema for better performance
- Improved error messages
Fixed
Fixed
- Fixed memory leak in background worker
- Corrected timezone handling in reports
- Fixed memory leak in background worker
- Corrected timezone handling in reports
[2.0.0] - 2023-12-01
[2.0.0] - 2023-12-01
Added
Added
- Complete API rewrite
- GraphQL support
- Complete API rewrite
- GraphQL support
Changed
Changed
- BREAKING: New authentication system
- BREAKING: New authentication system
Removed
Removed
- Legacy v1 API endpoints
undefined- Legacy v1 API endpoints
undefinedKeep a Changelog Format
Keep a Changelog 格式规范
Version Header
版本标题
markdown
undefinedmarkdown
undefined[Version] - YYYY-MM-DD
[Version] - YYYY-MM-DD
- Use semantic versioning (MAJOR.MINOR.PATCH)
- Include release date
- Link to release tag
- 使用语义化版本(MAJOR.MINOR.PATCH)
- 包含发布日期
- 添加版本标签链接Change Categories
变更分类
Order of sections:
- Added
- Changed
- Deprecated
- Removed
- Fixed
- Security
Writing guidelines:
- Start with verb: "Added", "Fixed", "Updated"
- Be specific but concise
- Include issue/PR numbers if applicable
- Highlight breaking changes with BREAKING
章节顺序:
- Added
- Changed
- Deprecated
- Removed
- Fixed
- Security
撰写指南:
- 以动词开头:"Added"、"Fixed"、"Updated"
- 内容具体且简洁
- 如有需要,包含Issue/PR编号
- 使用BREAKING标记重大变更
Examples
示例
Good entries:
markdown
undefined优秀条目示例:
markdown
undefinedAdded
Added
- User profile page with avatar upload (#123)
- Export data to CSV functionality
- User profile page with avatar upload (#123)
- Export data to CSV functionality
Fixed
Fixed
- Fixed crash when uploading files over 10MB (#456)
- Corrected calculation in tax report
**Bad entries:**
```markdown- Fixed crash when uploading files over 10MB (#456)
- Corrected calculation in tax report
**不佳条目示例:**
```markdownAdded
Added
- Stuff
- Various improvements
- Stuff
- Various improvements
Fixed
Fixed
- Bug fixes
undefined- Bug fixes
undefinedSemantic Versioning
Semantic Versioning(语义化版本)
Determine version bump:
| Change Type | Version Bump | Example |
|---|---|---|
| Breaking change | MAJOR | 1.0.0 → 2.0.0 |
| New feature | MINOR | 1.0.0 → 1.1.0 |
| Bug fix | PATCH | 1.0.0 → 1.0.1 |
Breaking changes:
- Removed functionality
- Changed API signatures
- Changed behavior that breaks existing code
版本号升级规则:
| 变更类型 | 版本升级类型 | 示例 |
|---|---|---|
| 重大变更 | MAJOR(主版本) | 1.0.0 → 2.0.0 |
| 新功能 | MINOR(次版本) | 1.0.0 → 1.1.0 |
| 漏洞修复 | PATCH(修订版本) | 1.0.0 → 1.0.1 |
重大变更定义:
- 移除功能
- 修改API签名
- 修改行为导致现有代码无法正常运行
Automation
自动化
Generate from Commits
从提交记录生成变更日志
If using conventional commits:
bash
undefined如果使用规范化提交:
bash
undefinedInstall
Install
npm install -g conventional-changelog-cli
npm install -g conventional-changelog-cli
Generate
Generate
conventional-changelog -p angular -i CHANGELOG.md -s
undefinedconventional-changelog -p angular -i CHANGELOG.md -s
undefinedPre-release Checklist
发布前检查清单
- All changes categorized
- Version number updated
- Release date added
- Breaking changes highlighted
- Links to issues/PRs included
- Unreleased section cleared
- 所有变更已完成分类
- 版本号已更新
- 已添加发布日期
- 重大变更已标记
- 已包含Issue/PR链接
- 已清空“Unreleased”部分