Skip to content

fix(release): compile the changelog from commit subjects, not commit prose - #393

Merged
dan-petty merged 1 commit into
release/v0.2.22from
fix/changelog-compiler-duplicates
Sep 22, 2026
Merged

dan-petty merged 1 commit into
release/v0.2.22from
fix/changelog-compiler-duplicates

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

The compiler reads the log as full commit bodies so that a squash merge listing several subjects contributes all of them. The cost was never handled: every prose paragraph in a commit message arrived as a candidate entry, and anything unrecognised was filed under "Other Changes". Compiling v0.2.22 produced a section containing whole explanatory paragraphs -- "That is not confined to a terminal. The changelog is masked on its way out..." -- as changelog bullets. Release descriptions are written from the changelog, so that is what would have been published.

A changelog entry is a conventional commit subject. When the range contains any, the rest is body prose and is now dropped. Matching word: was not enough on its own: ordinary sentences carry colons, and "Fixed:", "Docker: the panel listed only running containers" and "kubeconfig: selecting one that does not exist" all qualified. The type must be one the project actually uses.

Entries were also duplicated. A squash merge appends its pull request number to the subject and the original subject often survives in the body without one, so comparing whole lines missed the pair: "feat(k8s): address cluster services without localhost port-forwarding" appeared twice, once with (#369) and once bare. Deduplication now ignores trailing references while the entry keeps them, since the reference is how a reader gets from the changelog to the change.

A repository that does not use conventional commits still gets every line, since there is nothing else to select on.

Compiling v0.2.22 before: 76 entries across four sections including prose fragments. After: 56 entries across three, no duplicates.

…prose

The compiler reads the log as full commit bodies so that a squash merge listing several subjects contributes all of them. The cost was never handled: every prose paragraph in a commit message arrived as a candidate entry, and anything unrecognised was filed under "Other Changes". Compiling v0.2.22 produced a section containing whole explanatory paragraphs -- "That is not confined to a terminal. The changelog is masked on its way out..." -- as changelog bullets. Release descriptions are written from the changelog, so that is what would have been published.

A changelog entry is a conventional commit subject. When the range contains any, the rest is body prose and is now dropped. Matching `word:` was not enough on its own: ordinary sentences carry colons, and "Fixed:", "Docker: the panel listed only running containers" and "kubeconfig: selecting one that does not exist" all qualified. The type must be one the project actually uses.

Entries were also duplicated. A squash merge appends its pull request number to the subject and the original subject often survives in the body without one, so comparing whole lines missed the pair: "feat(k8s): address cluster services without localhost port-forwarding" appeared twice, once with `(#369)` and once bare. Deduplication now ignores trailing references while the entry keeps them, since the reference is how a reader gets from the changelog to the change.

A repository that does not use conventional commits still gets every line, since there is nothing else to select on.

Compiling v0.2.22 before: 76 entries across four sections including prose fragments. After: 56 entries across three, no duplicates.
@dan-petty
dan-petty merged commit 88faac0 into release/v0.2.22 Sep 22, 2026
8 checks passed
@dan-petty
dan-petty deleted the fix/changelog-compiler-duplicates branch September 22, 2026 17:47
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