update-changelog
Generate and update CHANGELOG.md for a new kubelogin release. Use this when asked to prepare release notes or update the changelog for a new version. Fetches merged pull requests since the previous release, categorizes them, identifies new contributors, and prepares a formatted entry for CHANGELOG.md.
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
Overview
The make changelog target runs hack/changelog-generator/main.go, which:
- Calls
gh api repos/Azure/kubelogin/releases/latestto determine the previous release tag (whenSINCE_TAGis not supplied). - Calls
gh api repos/Azure/kubelogin/commits/<tag>to get the tag date. - Fetches all merged pull requests since that date via
gh api --paginate repos/Azure/kubelogin/pulls?state=closed&.... - Categorizes each PR by GitHub label, then by title prefix:
-
Bug Fixes — label
bug/fix; prefixfix:,bugfix:,hotfix: -
Enhancements — label
enhancement/feature; prefixfeat: -
Maintenance — label
dependencies/chore; prefixbump,update -
Doc Update — label
documentation/docs; prefixdocs: - What's Changed — everything else
-
Bug Fixes — label
- Identifies first-time contributors by comparing PR authors against all prior merged PR authors.
- Writes a formatted entry to
changelog-entry.md.
Steps to follow
-
Determine the new version number (e.g.
0.2.15) and, optionally, the previous tag to compare from (e.g.v0.2.14).- If the previous tag is not provided, the tool will auto-detect the latest stable release.
-
Run
make changelogto generate the changelog entry:# SINCE_TAG is optional – omit to auto-detect the latest release tag VERSION=0.2.15 make changelog # or explicitly: VERSION=0.2.15 SINCE_TAG=v0.2.14 make changelogThis writes the formatted entry to
changelog-entry.md. When using the GitHub Actions workflow, the workflow then insertschangelog-entry.mdafter the header ofCHANGELOG.mdand opens a pull request automatically.When running locally, insert the content manually:
# Insert after the "# Change Log" header { head -n 2 CHANGELOG.md echo "" cat changelog-entry.md echo "" tail -n +3 CHANGELOG.md } > CHANGELOG.md.new && mv CHANGELOG.md.new CHANGELOG.md rm changelog-entry.mdAuthentication is handled automatically by the
ghCLI. Ensure you are authenticated (gh auth login) or thatGH_TOKEN/GITHUB_TOKENis set in the environment. -
Review the updated
CHANGELOG.mdand edit entries as needed for clarity before committing. -
After the changelog is merged to the default branch, trigger the Release workflow to create the GitHub release and build binaries.
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-03-11
- 索引更新时间
- 2026-03-11
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!