update-changelog
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseUpdate the repository changelog with changes between the last release and the current version () that are not yet incorporated. If does not exist, use instead.
mainCHANGELOG.mdCHANGELOG更新仓库的变更日志,添加从上一个版本到当前版本(分支)之间尚未纳入的变更内容。如果不存在,则使用文件。
mainCHANGELOG.mdCHANGELOGStep-by-Step Process
分步流程
1. Determine baseline version
1. 确定基准版本
If no baseline version is provided, use the most recent git tag. You can find it with .
git describe --tags --abbrev=0如果未提供基准版本,请使用最新的Git标签。你可以通过命令获取。
git describe --tags --abbrev=02. Find the commits from git
2. 从Git中获取提交记录
Use the following commands to gather commit information:
bash
undefined使用以下命令收集提交信息:
bash
undefinedGet the baseline version (if not provided)
获取基准版本(如果未提供)
git describe --tags --abbrev=0
git describe --tags --abbrev=0
Get all commits since the baseline version
获取基准版本之后的所有提交记录
git log <baseline-version>..HEAD
undefinedgit log <baseline-version>..HEAD
undefined3. Update the changelog
3. 更新变更日志
Read the existing changelog file (, or if missing) and check if there are changes not yet incorporated, then add them. Always add them to the "Unreleased" section only. If there is none yet, add it at the top in the same style as the existing changelog (for example, vs ).
CHANGELOG.mdCHANGELOG## Unreleased## [Unreleased]读取现有的变更日志文件(,如果缺失则用),检查是否有尚未纳入的变更,然后添加这些内容。请务必仅将变更添加到“Unreleased”(未发布)部分。如果当前没有该部分,请在顶部按照现有变更日志的相同样式添加(例如或)。
CHANGELOG.mdCHANGELOG## Unreleased## [Unreleased]Ground Rules When Writing Changelogs
编写变更日志的基本原则
Content Guidelines
内容指南
- Focus on notable changes that affect users (features, fixes, breaking changes)
- Mention pull requests () when available, but not raw commit hashes
#NUMBER - Ignore insignificant changes (typo fixes, internal refactoring, minor documentation updates)
- Group related changes together when appropriate
- Order entries by importance: breaking changes first, then features, then fixes
- 聚焦于对用户有影响的重要变更(功能新增、问题修复、破坏性变更)
- 若有可用的拉取请求编号()请注明,但不要使用原始提交哈希值
#NUMBER - 忽略无关紧要的变更(拼写错误修复、内部重构、次要文档更新)
- 适当地将相关变更分组
- 按重要性排序条目:先列破坏性变更,再是新增功能,最后是问题修复
Style Guidelines
样式指南
- Use valid markdown syntax
- Start each entry with a past-tense verb or descriptive phrase
- Keep entries concise but descriptive enough to understand the change
- Use bullet points (or
*) for individual changes- - Format code references with backticks (e.g., )
`foo.cleanup`
- 使用有效的Markdown语法
- 每个条目以过去式动词或描述性短语开头
- 条目需简洁但足够描述变更内容
- 使用项目符号(或
*)列出单个变更- - 用反引号格式化代码引用(例如)
`foo.cleanup`
Example Format
示例格式
markdown
undefinedmarkdown
undefined2.13.0
2.13.0
- Added multi-key support to the filter. #827
|sort - Fix with strict undefined behavior. #838
not undefined - Added support for free threading Python. #841
- 为过滤器添加多键支持。 #827
|sort - 修复严格undefined行为下的问题。 #838
not undefined - 添加对Python自由线程的支持。 #841
2.12.0
2.12.0
- Item or attribute lookup will no longer swallow all errors in Python. #814
- Added filter. #818
|zip - Fix for the
break_on_hyphensfilter. #823|wordwrap - Prefer error message from . #824
unknown_method_callback - Ignore and
.jinjaas extensions in auto escape. #832.jinja2
undefined- 在Python中,项或属性查找将不再吞掉所有错误。 #814
- 添加过滤器。 #818
|zip - 修复过滤器的
|wordwrap问题。 #823break_on_hyphens - 优先使用返回的错误信息。 #824
unknown_method_callback - 在自动转义中忽略和
.jinja扩展名。 #832.jinja2
undefinedGood vs. Bad Examples
正反示例
Good:
Fixed an issue with the TypeScript SDK which caused an incorrect config for CJS.Added support for claim timeout extension on checkpoint writes.Improved error reporting when task claim expires.
Bad:
- (too vague)
Fixed bug - (insignificant unless it fixes a security issue)
Updated dependencies - (internal change, not user-facing)
Refactored internal code structure - (insignificant)
Fixed typo in comment
正确示例:
修复了TypeScript SDK中导致CJS配置错误的问题。添加了检查点写入时的声明超时扩展支持。改进了任务声明过期时的错误报告。
错误示例:
- (过于模糊)
修复bug - (除非修复安全问题,否则无关紧要)
更新依赖 - (内部变更,不影响用户)
重构内部代码结构 - (无关紧要)
修复注释中的拼写错误
Notes
注意事项
- If the current changelog already has an "Unreleased" section with content, append to it rather than replacing it
- Preserve the existing changelog style and formatting (headings, bullet style, ordering, and spacing)
- If the repo uses a different default branch name, treat that as the "current version" instead of
main - When in doubt about whether a change is significant, err on the side of including it
- 如果当前变更日志已有包含内容的“Unreleased”部分,请在其后追加内容,而非替换
- 保留现有变更日志的样式和格式(标题、项目符号样式、排序方式和间距)
- 如果仓库使用不同的默认分支名称,请将该分支视为“当前版本”而非
main - 若不确定某变更是否重要,优先将其纳入