Repository navigation
ci: generate release notes on tag push and lint commit messages - #580
Conversation
- Add a commit-msg hook (husky + commitlint) that warns on messages not following Conventional Commits - Check PR titles with a semantic PR workflow - Fill the GitHub Release body with git-cliff - Notify selection-command-hub to open a draft What's New PR Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Pd1sH2SVL35AWHUxzVCAqk
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #580 +/- ##
=======================================
Coverage 57.01% 57.01%
=======================================
Files 325 325
Lines 33623 33623
Branches 3697 3697
=======================================
Hits 19170 19170
Misses 14453 14453 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
- Replace the commit SHA on each release note line with the PR that brought it in, looked up via the GitHub API, since git-cliff cannot map commits merged through merge commits to their PRs - Drop git-cliff's GitHub integration, which is no longer needed - Skip "address ... review" follow-up commits in the release notes - Run the release workflow only for v* tags - Keep publishing the release when the note generation fails Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
レビュー結果全体として、失敗しても Release を止めない設計( 要確認・改善提案
テストについて
セキュリティ
良い点
上記 1〜3 が主な確認事項です。残りは任意の改善です。 |
- Pin git-cliff in CI to the version used by yarn release-notes - Keep the workflow green when notifying the Hub fails - Drop the redundant v-tag check now that only v* tags trigger it - Warn with the number of note lines whose PR was not found - Pass the repository name through env instead of inline expansion - Narrow the review follow-up filter to "review" as a whole word and also match a capitalized "Address" Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
レビュー結果全体として、失敗してもリリースを止めない設計( 指摘事項
テストカバレッジ
セキュリティ
パフォーマンス
以上です。 |
gh api prints the error body to stdout on an HTTP error, which would have been written into the notes as a PR number. Accept only a number and log the error to stderr instead. - Clarify the commit-msg warning, which also shows when commitlint fails - Document the prerequisites of yarn release-notes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
レビュー結果全体として、失敗しても Release 公開を止めない設計( 確認・提案
セキュリティ
軽微
以上です。マージ前チェックリストの |
Closes #576
概要
リリースタグの push をきっかけに、リリースノートを自動で生成する。
commit-msgフックと commitlint(@commitlint/config-conventional)を追加。規約に沿っていない場合は警告だけ出し、コミットは止めない.github/workflows/pr-title.ymlを追加。Hub のドラフト生成は PR タイトルの種別で分類するため(GitHub Release の本文はコミットメッセージで分類するので、PR タイトルの影響は受けない)。dev-*のまとめ PR は対象外release.ymlで git-cliff(cliff.toml)を実行し、前回タグ以降のpackages/extensionとpackages/sharedの変更を feat/fix/perf/refactor/revert に分類して載せるdev-*をマージコミットで取り込む運用のため git-cliff 単体では PR 番号が取れないので、.github/scripts/link-release-note-prs.shが GitHub API(/commits/<sha>/pulls)で機能 PR を調べて短縮 SHA を置き換える(dev-*の PR は除外。見つからなければ SHA のまま)<種別>(<スコープ>): address ... review ...)は載せないrelease.ymlはv*タグの push のみで動くrepository_dispatch(extension-released)を selection-command-hub に送り、What's New のドラフト PR を作らせる(Hub 側の PR: 別途作成)yarn release-notesで、前回のタグ以降の未リリース分のノートをRELEASE_NOTES.md(git 管理外)に出力して表示する設計は
docs/design/release-notes.mdに記載。マージ前に必要な設定
HUB_DISPATCH_TOKENを登録する(selection-command-hub の Contents: Read and write を持つ fine-grained PAT)。未設定の場合、通知は警告を出してスキップする確認したこと
commit-msgフック:Update: fooで警告が出て exit 0、規約に沿った日本語の件名では警告なしyarn release-notesで未リリース分(refactor: packages/hub を packages/pages にリネーム #556)のノートが PR リンク付きで出力されるyarn install --frozen-lockfileが通る補足
release.ymlを使うため、新しいノート生成が動くのはこの PR のマージ後に作るタグから🤖 Generated with Claude Code
https://claude.ai/code/session_01Pd1sH2SVL35AWHUxzVCAqk