Repository navigation
fix(release): compile the changelog from commit subjects, not commit prose - #393
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.