update-release-notes

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Update release notes

更新发布说明

This skill handles the operational tasks of maintaining release notes: adding new PR entries to
next.mdx
and archiving releases when a new version is published.
该Skill负责处理发布说明的运维任务:向
next.mdx
添加新的PR条目,以及在发布新版本时归档旧版本发布说明。

Process

流程

1. Check status

1. 检查状态

Run the status script to determine versions and diff branch:
bash
.claude/skills/update-release-notes/scripts/get-changelog-status.sh
This returns:
  • diff_branch
    (e.g.,
    v4.3.x
    ) - the branch to diff against
  • latest_release
    - the most recent published release
  • Whether archival is needed
运行状态脚本以确定版本和对比分支:
bash
.claude/skills/update-release-notes/scripts/get-changelog-status.sh
返回内容包括:
  • diff_branch
    (例如
    v4.3.x
    ):用于对比的分支
  • latest_release
    :最新已发布版本
  • 是否需要执行归档操作

2. Handle archival (if needed)

2. 处理归档(若需要)

If a new release was published since
last_version
in
next.mdx
:
  1. Copy
    next.mdx
    content to
    vX.Y.0.mdx
    (e.g.,
    v4.3.0.mdx
    )
  2. Update the frontmatter in the new file:
    • Set
      title
      to the version
    • Update dates
    • Add the GitHub release link after frontmatter
  3. Reset
    next.mdx
    :
    • Update
      last_version
      field to the new release
    • Clear the content sections
    • Keep the file structure for accumulating new changes
如果自
next.mdx
中的
last_version
以来已有新版本发布:
  1. next.mdx
    的内容复制到
    vX.Y.0.mdx
    (例如
    v4.3.0.mdx
  2. 更新新文件的前置元数据(frontmatter):
    • title
      设置为对应版本号
    • 更新日期
    • 在前置元数据后添加GitHub发布链接
  3. 重置
    next.mdx
    • last_version
      字段更新为新发布的版本
    • 清空内容部分
    • 保留文件结构以便积累新的变更

3. Find new PRs

3. 查找新PR

Get PR numbers merged since the release branch:
bash
.claude/skills/update-release-notes/scripts/get-new-prs.sh <diff_branch>
获取自发布分支以来合并的PR编号:
bash
.claude/skills/update-release-notes/scripts/get-new-prs.sh <diff_branch>

4. Fetch PR details

4. 获取PR详情

Batch fetch all PR information:
bash
.claude/skills/update-release-notes/scripts/fetch-pr-batch.sh <pr1> <pr2> ...
批量获取所有PR信息:
bash
.claude/skills/update-release-notes/scripts/fetch-pr-batch.sh <pr1> <pr2> ...

5. Update next.mdx

5. 更新next.mdx

For each PR not already in
next.mdx
:
  1. Check PR labels and body against the style guide's categorization rules
  2. Skip PRs that should be omitted (see style guide)
  3. Add entries to the appropriate section
  4. Promote significant changes to featured sections when warranted
对于每个尚未出现在
next.mdx
中的PR:
  1. 根据风格指南的分类规则检查PR标签和正文
  2. 跳过应被忽略的PR(详见风格指南)
  3. 将条目添加到对应的章节
  4. 若有重大变更,将其提升至特色章节

6. Verify

6. 验证

Check that:
  • PR links are correct
  • Community contributors are credited
  • Sections are in the correct order
  • Breaking changes are marked with 💥
检查以下内容:
  • PR链接是否正确
  • 是否已致谢社区贡献者
  • 章节顺序是否正确
  • 破坏性变更是否已标记💥

The
last_version
field

last_version
字段

The
next.mdx
frontmatter includes a
last_version
field that tracks the most recent published release. This determines which PRs are "new" and need to be added.
next.mdx
的前置元数据中包含
last_version
字段,用于记录最新已发布版本。该字段用于判断哪些PR是“新的”并需要添加到发布说明中。

References

参考资料

  • Style guide: See
    ../shared/release-notes-guide.md
    for guidance on what a release notes article should contain and how to format it.
  • Scripts: See
    scripts/
    for automation helpers
  • 风格指南:详见
    ../shared/release-notes-guide.md
    ,其中包含发布说明文章应涵盖的内容及格式规范。
  • 脚本:详见
    scripts/
    目录下的自动化辅助工具