Skip to content

chore(ci): generate release notes from conventional commits - #62

Merged
nishide-dev merged 3 commits into
mainfrom
chore/release-notes
Oct 6, 2026
Merged

nishide-dev merged 3 commits into
mainfrom
chore/release-notes

Conversation

@nishide-dev

@nishide-dev nishide-dev commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

概要

v* の tag を push するだけで、検証 → engine image の公開 → release notes 付き の GitHub release の作成(source tar 添付)まで完了するようにする。release notes は前の版の tag から今回の tag までの commit(= squash merge した PR タイトル、Conventional Commits)を git-cliff で分類して生成し、インストール方法・image の tag / digest・gh attestation verify・source tar の説明を定型で付ける。既存 release の notes だけを作り直す workflow も追加する(v0.1.0 の notes を埋めるのに使う)。

変更内容

  • cliff.toml(新規): git-cliff の設定。type で分類(feat → Features / fix → Bug fixes / perf → Performance / docs → Documentation / refactor・test・build・chore → Other changes)。chore(deps) は Dependencies に「N dependency updates: #a, #b」の 1 行にまとめる(PR 番号はタイトル行の末尾の (#N) だけから取る。番号の無いものは件数にだけ数える)。! / BREAKING CHANGE: は Breaking changes にも載せる。Conventional でない commit も Other changes に残す。すべての行は commit のタイトル(1 行目 = PR タイトル)だけから作り、PR 本文や footer の文面は載せない。末尾の (#N) を PR へのリンクにし、@name は mention にならないよう code にし、前の版との compare リンクを付ける。
  • .github/scripts/release-notes-test.sh / release-notes-test.expected.md(新規): 使い捨ての repository に main の squash merge と同じ形の fixture の commit(PR 本文付き、実際の Dependabot 形式の本文付き(単独・group)、PR 番号の無い chore(deps)、日本語の BREAKING CHANGE: footer + attribution、GitHub の Revert、@name を含むタイトル)を作り、notes の「What's changed」を期待値と比べる。PR の notes job で毎回実行する。
  • .github/scripts/release-notes.sh(新規): release-notes.sh <tag> [<digest>] で notes の Markdown を出力する。
    • 安定版は前の安定版から(間の prerelease を畳み込む: --ignore-tags '^v.*-')、prerelease は直前の tag から、最初の版は全履歴。git-cliff の --context から対象 tag の release だけを選んで --from-context で描画するので、HEAD が tag より先(main)でも同じ notes になる。
    • tag がまだ無い場合は「最後の tag 〜 HEAD」をその版としてプレビューする。digest を省略すると placeholder。
    • tag が HEAD の祖先でない、semver でない、digest の形式が違う、対象の commit が無い、などはエラー。
  • .github/workflows/engine-image.yml
    • publish が digest を output する。
    • release が checkout(fetch-depth: 0)→ git-cliff(taiki-e/install-action を SHA pin、[email protected]。install-action が checksum を検証)→ notes 生成(job summary にも出す)→ release の作成(--notes-file。版に - があれば prerelease にする既存の扱いを維持)。
    • release が既にある場合(手で作った / 再実行)は、notes を生成したもので 上書き してから asset を upload する。
  • .github/workflows/release-notes.yml(新規): notes の生成だけを行う workflow。image の公開・release の作成はしない。
    • pull_request(cliff.toml・script・この workflow の変更時): fixture の test の後、PR の head commit(merge ref ではなく。Merge … into … の行が入らない)で、最後の tag(現状 v0.1.0、全履歴)の notes と、次の版(patch + 1)としての「最後の tag 以降」の notes を job summary と artifact release-notes に出す。digest は GHCR から引く(未公開の版は placeholder)。
    • workflow_dispatch(tag、update): update=false(既定)は dry run。update=true は gh release edit --notes-file で既存 release の notes を置き換える(main か tag 上の実行のみ。image が GHCR に無い版は失敗)。
    • 権限: 生成する notes job は contents: read。書き込む update job だけが contents: write で、repository の code は実行しない(artifact を受け取って gh release edit するだけ)。
  • docs
    • docs/development.md: release 手順を「tag を push するだけ」に更新し、「release notes」節(分類の規則、notes の文面は PR タイトルで決まること、ローカルでの生成方法、作り直し方)を追加。
    • CONTRIBUTING.md: PR タイトルが release notes の 1 行になること、type / description の書き方の注意、notes の PR check を追記。
    • docs/security.md(権限の記述)、docs/engine-image.md(digest は release notes に載る)を追随。

設計判断

  • git-cliff を採用(GitHub の自動生成 + .github/release.yml ではなく): この repo は PR にラベルを付けない運用で、GitHub の自動生成はラベルでしか分類できない。git-cliff は commit の type で分類でき、PR タイトル = commit タイトルの運用にそのまま合う。API を使わず(--offline)git の履歴だけで決まるので、PR 上やローカルでも同じ結果を再現できる。
  • 既存 release の notes は上書き: notes は git の履歴と公開済みの digest から決定的に作られるので、再実行で上書きしても結果は同じ。手で先に release を作った場合も、生成した notes に揃える(docs に明記。公開後の手修正は、作り直すと消える)。
  • CHANGELOG.md は置かない: tag ごとに CHANGELOG 更新の commit / PR が必要になり、運用が増えるため。GitHub release を changelog とし、必要なら同じ cliff.toml から git cliff でいつでも全履歴を出せる。
  • notes の作り直しは別 workflow: engine-image.yml の workflow_dispatch は image の公開と結び付いているので、notes だけの経路を分けた。image は再公開せず、digest は GHCR にある既存の版から引く。
  • notes の生成は image の公開後: digest が要るため release job で生成する。設定の誤りは PR 上の Release notes / notes で先に検出する。万一 release で失敗しても image は公開済みで、gh run rerun --failed でやり直せる(既存の手順どおり)。
  • git-cliff の版: 2.14.2 を両 workflow で固定(install-action の manifest の sha256 で検証)。install-action 自体は SHA pin で、Dependabot の対象。

確認方法

  • actionlint(全 workflow)、shellcheck .github/scripts/release-notes.sh
  • ローカルで git-cliff 2.14.2(公式 release の tar を sha512 で確認)を使って生成
    • release-notes.sh v0.1.0 sha256:b611… → 下記(v0.1.0 までの全履歴、32 commit)
    • release-notes.sh v0.1.1 → v0.1.0 以降の差分(この PR の commit のみ)のプレビュー
    • 使い捨ての clone で v0.2.0-rc.1 / v0.2.0-rc.2 / v0.2.0 を打って確認: rc.2 は rc.1 からの差分、v0.2.0 は v0.1.0 からの全部(rc の分を畳み込む)。tag が HEAD の祖先でない場合・semver でない tag・不正な digest はエラーになる
    • release-notes-test.sh: 期待値どおり(下記)。修正前の cliff.toml に戻して実行すると、Dependabot の行が 3 dependency updates (Dependabot):,, に、Breaking changes が日本語の footer + 🤖 Generated with … に、Revert の行が本文付きに、@octocat が mention になり、test が失敗することを確認した
    • レビュー対応の後も v0.1.0 の notes は変わらない(前回の出力と diff なし)
  • CONTRIBUTING.md / docs/development.md: タイトルだけが載ること、@name を書かないこと、jq が要ること、update は通常 --ref main で実行すること(v0.1.0 の tag の上には workflow が無い)、fixture の test を追記
  • PR 上の Release notes / notes が、v0.1.0 と v0.1.1(プレビュー)の notes を job summary と artifact に出す(GHCR から v0.1.0 の digest を引く)
  • workflow_dispatch の dry run は、新規 workflow が default branch に入るまで dispatch できないため、merge 後に gh workflow run release-notes.yml --ref main -f tag=v0.1.0 で確認する(PR 上の pull_request の実行が同じ生成を行う)
  • tag の push・release の作成 / 編集・publish を有効にした実行はしていない
  • Rust のコードは変更していない(cargo の品質ゲートは CI で確認)

生成例: v0.1.0(digest は GHCR の実際の値)

v0.1.0 の notes(全文)
## What's changed

### Features

- **core**: Define compile domain model and engine interface ([#20](https://github.com/nishide-dev/texrun/pull/20))
- **workspace**: Add isolated compile workspaces ([#21](https://github.com/nishide-dev/texrun/pull/21))
- **diagnostics**: Parse LaTeX logs into structured diagnostics ([#23](https://github.com/nishide-dev/texrun/pull/23))
- **texlive**: Add latexmk engine ([#30](https://github.com/nishide-dev/texrun/pull/30))
- **preview**: Render PDF pages to PNG previews ([#31](https://github.com/nishide-dev/texrun/pull/31))
- **cli**: Add compile command ([#34](https://github.com/nishide-dev/texrun/pull/34))
- **workspace**: Exclude nested output directories by path ([#38](https://github.com/nishide-dev/texrun/pull/38))
- **diagnostics**: Locate missing packages and fold fatal errors ([#40](https://github.com/nishide-dev/texrun/pull/40))
- **diagnostics**: Report BibTeX failures ([#42](https://github.com/nishide-dev/texrun/pull/42))
- **process**: Apply resource limits before exec through a gate ([#44](https://github.com/nishide-dev/texrun/pull/44))
- **process**: Limit CPU, memory and process count ([#45](https://github.com/nishide-dev/texrun/pull/45))
- **sandbox**: Add a container backend for the TeX engine ([#50](https://github.com/nishide-dev/texrun/pull/50))
- **sandbox**: Render previews inside the container ([#52](https://github.com/nishide-dev/texrun/pull/52))
- **sandbox**: Reclaim containers left by killed runs and report the process limit ([#53](https://github.com/nishide-dev/texrun/pull/53))
- **sandbox**: Reclaim leftovers from a previous boot ([#58](https://github.com/nishide-dev/texrun/pull/58))

### Bug fixes

- **workspace**: Refine exclusion and collection edge cases ([#29](https://github.com/nishide-dev/texrun/pull/29))
- **texlive**: Restore the build after #39 and #40 ([#43](https://github.com/nishide-dev/texrun/pull/43))
- **sandbox**: Accept engine images without labels ([#55](https://github.com/nishide-dev/texrun/pull/55))
- **sandbox**: Support rootless Podman and refuse rootless Docker ([#57](https://github.com/nishide-dev/texrun/pull/57))
- **sandbox**: Detect OOM kills reliably on Docker ([#61](https://github.com/nishide-dev/texrun/pull/61))

### Documentation

- Add contribution guidelines and MIT license ([#15](https://github.com/nishide-dev/texrun/pull/15))
- Add initial README ([#18](https://github.com/nishide-dev/texrun/pull/18))
- **security**: Define the MVP security model and execution limits ([#22](https://github.com/nishide-dev/texrun/pull/22))
- Update README to reflect the completed MVP ([#37](https://github.com/nishide-dev/texrun/pull/37))
- Rewrite the README ([#59](https://github.com/nishide-dev/texrun/pull/59))

### Other changes

- Initialize repository
- Bootstrap Rust workspace and toolchain ([#16](https://github.com/nishide-dev/texrun/pull/16))
- **ci**: Add quality gates and dependency checks ([#19](https://github.com/nishide-dev/texrun/pull/19))
- **docker**: Add TeX Live development environment ([#17](https://github.com/nishide-dev/texrun/pull/17))
- Add TeX Live integration fixtures and CI job ([#33](https://github.com/nishide-dev/texrun/pull/33))
- **process**: Extract shared subprocess execution ([#39](https://github.com/nishide-dev/texrun/pull/39))
- **ci**: Publish the engine image to GHCR ([#51](https://github.com/nishide-dev/texrun/pull/51))

## Install

```bash
cargo install --locked --git https://github.com/nishide-dev/texrun --tag v0.1.0 texrun
```

See the [README](https://github.com/nishide-dev/texrun/blob/v0.1.0/README.md#installation) for the requirements and
the tools each backend needs.

## Engine image

The container backend (`--backend container`) runs TeX in the engine image
of this version, `ghcr.io/nishide-dev/texrun-engine:0.1.0` (linux/amd64, linux/arm64). texrun
never pulls it; pull it once:

```bash
docker pull ghcr.io/nishide-dev/texrun-engine:0.1.0
```

Published versions are never overwritten. To use exactly this image, pin its
digest:

```bash
docker pull ghcr.io/nishide-dev/texrun-engine@sha256:b611748f16d50c00982da2e52b51939d50167bebbc22b35ab8741d1c39e00d1b
texrun compile --backend container --container-image ghcr.io/nishide-dev/texrun-engine@sha256:b611748f16d50c00982da2e52b51939d50167bebbc22b35ab8741d1c39e00d1b main.tex
```

The image has an SBOM, SLSA provenance and a signed GitHub artifact
attestation:

```bash
gh attestation verify oci://ghcr.io/nishide-dev/texrun-engine:0.1.0 -R nishide-dev/texrun
```

## Source of the engine image

`texrun-engine-0.1.0-sources.tar` (below) has the Debian source packages
(`.dsc`, `.orig.tar.*`, `.debian.tar.*`) of every package in the image,
for both platforms, at exactly the installed versions (`packages.txt` and
`SHA256SUMS` inside): the corresponding source of its GPL / AGPL programs.
See [docs/engine-image.md](https://github.com/nishide-dev/texrun/blob/v0.1.0/docs/engine-image.md#licenses).

生成例: v0.1.0 以降の main の差分(次の版のプレビュー)

## What's changed

### Bug fixes

- **ci**: Build release notes lines from commit titles only

### Other changes

- **ci**: Generate release notes from conventional commits
- **ci**: Write release notes on tag push and add a notes-only workflow

**Full diff**: [v0.1.0...v0.1.1](https://github.com/nishide-dev/texrun/compare/v0.1.0...v0.1.1)

(以下の Install / Engine image / Source は v0.1.0 と同じ形で、digest は placeholder。squash merge 後は 1 commit になる)

生成例: fixture(release-notes-test.expected.md)

## What's changed

### Breaking changes

- **cli**: Rename --json flag to --format json ([#4](https://github.com/nishide-dev/texrun/pull/4))

### Features

- **cli**: Rename --json flag to --format json ([#4](https://github.com/nishide-dev/texrun/pull/4))

### Bug fixes

- **diagnostics**: Report the error `@octocat` found ([#7](https://github.com/nishide-dev/texrun/pull/7))

### Other changes

- Revert "fix(core): handle empty logs ([#5](https://github.com/nishide-dev/texrun/pull/5))" ([#6](https://github.com/nishide-dev/texrun/pull/6))

### Dependencies

- 3 dependency updates: [#2](https://github.com/nishide-dev/texrun/pull/2), [#3](https://github.com/nishide-dev/texrun/pull/3)

**Full diff**: [v0.1.0...v0.2.0](https://github.com/nishide-dev/texrun/compare/v0.1.0...v0.2.0)

補足

  • merge 後、v0.1.0 の notes を埋めるには: gh workflow run release-notes.yml --ref main -f tag=v0.1.0(dry run、summary で確認)の後に gh workflow run release-notes.yml --ref main -f tag=v0.1.0 -f update=true。
  • notes の文面は PR タイトルで決まる。merge 後に誤りに気付いた場合は release を手で編集できるが、作り直すと消える。
  • 推奨(任意): release-notes.yml の update job にも、engine-image.yml と同様に environment を付けることを検討できる(docs/security.md の「release の入口」)。

🤖 Generated with Claude Code

@nishide-dev nishide-dev left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: CHANGES_REQUESTED

全体の設計(tag push → verify → publish → release で notes 付き release、notes 専用 workflow、contents: write の分離、git-cliff の pin)は要望どおりで良いと思います。ただ、実際の squash commit(PR 本文が commit 本文になる)で notes を作ると、Dependabot の 1 行まとめが壊れることを確認しました。must-fix 1 件、should-fix 2 件です。

確認したこと

  • actionlint(全 workflow)・shellcheck .github/scripts/release-notes.sh: 指摘なし。
  • git-cliff 2.14.2 は公式 release の aarch64-apple-darwin の tar を取得し、sha512 が一致することを確認してから使用。taiki-e/install-action@83ac0ad… は v2.87.22 の tag の commit と一致。その manifest にある git-cliff 2.14.2(x86_64 musl)の sha256 fa21e2fc… も、公式 tar の実際の値と一致した(公式の .sha512 でも OK)。
  • release-notes.sh v0.1.0 sha256:b611… の出力は CI の artifact release-notes/v0.1.0.md と 完全に一致。
  • release-notes.sh v0.1.1 は 1 行だけ違う。CI 側には - Merge e039f10… into 0eacfe4… がある(PR の merge ref から生成しているため。nit 1)。
  • 使い捨ての clone で v0.2.0-rc.1 → v0.2.0-rc.2 → v0.2.0 を打って確認(push なし)。rc.1 は v0.1.0 から、rc.2 は rc.1 から、v0.2.0 は v0.1.0 から(rc の分を畳み込む)、compare リンクもそれぞれ正しい。前回 tag の選び方は OK。
  • workflow の安全性:
    • tag・input・commit message は ${{ }} で shell に直接展開されておらず、すべて env 経由で、quote されている。
    • notes は --notes-file で渡しているので、PR タイトルから shell injection にはならない。
    • contents: write を持つのは release(main の祖先の tag の code のみ実行)と update(repository の code を実行しない)だけ。
    • update=true で main / tag 以外から実行した場合と GHCR に image が無い場合は、notes job が失敗して update は skip される。
    • publish.outputs.digest は Tag step で tag の指す digest と一致を確認済みの値で、受け渡しも正しい。

must-fix

1. Dependabot のまとめ行から PR リンクが消える(本文のある commit)

link_parsers の pattern が …\)\)$ で終わっています。git-cliff は link parser を 本文を含む commit message 全体に当てるので、$ が本文の末尾にしか一致しません。この repo の squash merge は PR 本文を commit 本文にします(template の注記と 0eacfe4 のとおり)。Dependabot の PR には必ず本文(Bumps … / updated-dependencies: / Signed-off-by:)があるので、実際の Dependabot の commit ではリンクが 1 つも取れません。

再現(使い捨て clone、本文ありの chore(deps): … (#71) と (#72)):

### Dependencies

- 2 dependency updates (Dependabot):,

本文なしの commit 1 件と本文ありの commit 1 件では [#80](…), となり、1 件だけ載って末尾に , が残ります。PR 説明の「Dependabot の 2 件は 1 行になり」は、本文なしの commit で確認したものだと思います。

修正案(1 行目の末尾の ([#N](…)) だけを取る。確認済みで、v0.1.0 の出力は変わりません):

link_parsers = [
  { pattern = '\A[^\n]*\(\[#([0-9]+)\]\(https://github\.com/nishide-dev/texrun/pull/[0-9]+\)\)(?m:$)', href = "https://github.com/nishide-dev/texrun/pull/$1", text = "#$1" },
]

修正後: - 2 dependency updates (Dependabot): [#71](…), [#72](…)

併せて、PR 番号の無い chore(deps)(直 push など)が混ざっても , が残らないようにする(nit 2)か、本文ありの Dependabot 形式の commit を含む fixture を PR の notes job で生成して確かめると、回帰を防げます。

should-fix

2. Breaking changes に footer の本文がそのまま出る(日本語・後続の段落・PR リンクなし)

template が commit.breaking_description | default(value=commit.message) を使っています。CONTRIBUTING.md の例のとおり footer を日本語で書くと、英語の notes にそのまま日本語の行が入ります。また、この repo の PR 本文は末尾が 🤖 Generated with [Claude Code](…) なので、footer の後の段落まで breaking_description に含まれ、notes の構造が崩れます。footer 由来の行には PR リンクも付きません。

再現:

### Breaking changes

- **core**: Rename the engine trait ([#73](…))
- **cli**: `--json` は削除され、`--format json` に置き換えられた。
- **cli**: --quiet is removed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

### Features

修正案: Breaking changes の行も commit のタイトル(PR タイトル)で書く。

- {% if commit.scope %}**{{ commit.scope }}**: {% endif %}{{ commit.message | split(pat="\n") | first | trim | upper_first }}

(確認済み: - **cli**: Rename --json flag to --format json ([#74](…)) になります)

footer の説明(移行方法)を載せたい場合は、「footer は英語で 1 段落、PR 本文の最後(attribution より後)に書く」と CONTRIBUTING.md に明記する必要があり、運用上は難しいと思います。タイトルにするのが無難です。

3. Conventional でない commit は本文ごと notes に入る

conventional として parse できない commit では commit.message が本文を含む全文になります。そのため、filter_unconventional = false で Other changes に残す設計だと、PR 本文(日本語の長文)がそのまま notes に流れ込みます。例: GitHub の Revert ボタンで作った PR を merge した場合(Revert "…" (#76) + This reverts commit …)や、pr-title を通らずに入った commit。

再現:

- Revert "feat(cli): drop --quiet ([#75](…))" ([#76](…))

This reverts commit abc.

修正案: 各行を commit.message | split(pat="\n") | first | trim | upper_first にする(上の 2 と同じ式。conventional な commit では message が description だけなので影響なし。確認済み)。

nit

  1. PR 上のプレビューに Merge <sha> into <sha> の行が入る(pull_request の checkout が merge ref のため)。release-notes.yml の checkout に ref: ${{ github.event.pull_request.head.sha }} を付けると、「main に squash した後」に近いプレビューになります(tag は fetch-depth: 0 で取れます)。
  2. Dependencies の行の , の扱い: commits | filter(attribute="links") 相当で、リンクのある commit だけを並べ、件数と分ける(または、リンクの無いものは短い SHA を出す)と安全です。
  3. PR タイトルに @user があると、release notes で mention になり通知されます。CONTRIBUTING.md の注意に一言あってもよいです(<img …> や javascript: のリンクは GitHub が sanitize するので、セキュリティ上の問題ではありません)。
  4. docs/development.md の「update=true は main か tag の上でのみ」について。この PR より前の tag(v0.1.0)には release-notes.yml も script も無いので、tag の上では dispatch できません。「通常は --ref main」と書くのが正確です。
  5. docs/development.md の「ローカルで確かめる」に、jq も必要なことを追記(script の冒頭のコメントには書いてあります)。
  6. (PR の補足にある提案に同意)update job に environment を付けると、branch 上で workflow を書き換えて dispatch した場合も含めて、release の書き換えを保護できます。必須ではありません。

設計について(問題なし)

  • 既存 release の notes を上書きする点は、notes が git の履歴と GHCR の digest から決定的に作られるので、再実行は冪等です。手の編集が消えることも docs/development.md に明記されています。
  • engine-image.yml の release は、notes を生成して summary に出してから create / edit → upload の順です。再実行時に asset が残っていると upload が失敗する点は、従来どおり docs に書かれています。

@nishide-dev nishide-dev left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: APPROVE

db3e42a の再レビューです。前回の must-fix 1 件と should-fix 2 件はすべて解消し、nit 1〜5 も対応されています。残るのは任意の nit 2 件だけです。

確認したこと

  • actionlint(全 workflow)、shellcheck .github/scripts/release-notes.sh .github/scripts/release-notes-test.sh: 指摘なし。
  • fixture test の妥当性:
    • 新しい head で release-notes-test.sh は release notes: as expected(ローカルの git-cliff 2.14.2、公式 binary で sha512 を確認済み)。CI の notes job の Test step も同じ結果。
    • cliff.toml だけを e039f10(修正前)に戻して同じ test を実行すると、期待どおり失敗した。差分は前回の指摘 4 点すべてに出る。
      • Breaking changes が日本語の footer と 🤖 Generated with … の段落になる。
      • @octocat が code にならない。
      • Revert の本文が notes に入る。
      • 3 dependency updates (Dependabot):,, になる。
    • fixture は main の実際の squash merge の形(PR 本文付き、Dependabot の本文付き、PR 番号無しの deps、日本語の footer の後に attribution、Revert ボタン形式)を押さえていて、回帰 test として十分。
  • v0.1.0 の notes は変わらない: 新しい head でローカルに生成した notes が、前回の CI の artifact v0.1.0.md と完全に一致。新しい CI の artifact(run 37507632302)の v0.1.0.md とも一致。
  • 前回の再現の再実行(使い捨て clone の同じ履歴に、新しい cliff.toml を当てた):
    • Dependabot(本文付き)は - 2 dependency updates: [#71](…), [#72](…) になる。本文ありと本文なしの混在でも [#80](…), [#81](…)。
    • Breaking changes は 3 件ともタイトルと PR リンクで出る(--json の footer も Rename --json flag to --format json ([#74](…)))。
    • Revert は本文が消えて 1 行になる。@nishide-dev は `@nishide-dev` になる。
    • rc / 正式版の前回 tag の選び方と compare リンクは前回どおり正しい。
  • PR のプレビュー: head sha で checkout するようになり、新しい artifact の v0.1.1.md から Merge … into … の行が消えた。
  • docs: CONTRIBUTING.md(タイトルだけが載る、@name を避ける)と docs/development.md(PR 番号の無いものは件数だけ、本文や footer は載らない、jq が要る、通常は --ref main で実行する、fixture test と --update)が、実装と一致している。

nit(任意。merge を妨げない)

  1. @name の preprocessor は、PR タイトルの code span の中にある、空白に続く @ にも当たります。例: fix: handle `foo @bar` は `foo `@bar `` になり、code span が崩れます。preprocessor は commit message 全体に当たるのでまれなケースで、CONTRIBUTING.md でタイトルに @name を書かない運用にしているため、実害はほぼありません。気になる場合は、fixture に 1 件追加して挙動を固定しておく程度で十分です。
  2. 前回の nit 6(update job に environment を付ける)は引き続き任意です。

@nishide-dev
nishide-dev merged commit 81dc7b1 into main Oct 6, 2026
21 of 22 checks passed
@nishide-dev
nishide-dev deleted the chore/release-notes branch October 6, 2026 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant