-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How about a changelog? #637
Conversation
A sample for non-destructive changelog generation that uses the git-history as a guide. It can be filled in manually but will pre-fill itself using git-conventional commit messages. It also collects all kinds of interesting information, and can be customized to not include certain auto-generated sections. What do you think? You can play around with it yourself using `cargo install cargo-smart-release` (a gitoxide project).
I forgot to add the rendered version. |
Great idea! Maybe we should add |
With a generated changelog, we might want to enforce conventional commits with CI (I swear I've contributed to a repo that did this, but I can't seem to find it). At the very least, maybe strongly encourage the use of the conventional commit format in our contributing guidelines. |
@o2sh For the upcoming release, for example, I didn't use conventional commits to flag all fixes - these would have to be added by hand. @spenserblack Even though I fully understand that thought, I hope with the above explanation it's also understandable why enforcing conventional commits isn't necessary. As a matter of fact, when creating the tool I considered this an anti-pattern. The reason is that this forces one to put considerable effort into classifying commit messages, which is hard to me, which would then potentially spam the changelog and reduce the actual signal. Thus I write conventional commits only for the purpose of them showing up in the changelog, and not by default. This also means that contributors don't have to change or be aware of anything in regards to commit messages which I find lowers the bar of contributions and makes interactions less cumbersome.
Note that It's kind of a lot to take in, if you are interested I can demo it in a call, you can reach me via keybase to set that up. |
Now that I know you are interested in adding a changelog, I have put in the time to actually write it beyond the generation of the scaffolding :D. Here is the rendered version. I have created the upcoming release as a milestone to help me with collecting the tickets involved - generally this is a nice way of preparing a release even if conventional commits aren't always present, like when PRs are merged that typically don't use conventional commits. The Milestone was merely for my own utility, please feel free to close/delete it. It's maybe just me who likes them as I used them extensively over at GitPython. |
Thanks for explaining! I'm actually a bit relieved to hear that it's not fully automated, as I've always preferred "human-written" changelogs. Mainly because a human is often needed to "squash" changes into a summary. I also like the idea of milestones. I've only used them for major releases ( How do you see the changelog and release notes working together? Many times notes from one are copied to the other, or the changelog simply says "refer to the release notes," or the release notes say "refer to the changelog." Or do you see the changelog and release notes being different "contexts" with different info? |
For me milestones are just a way to not forget anything that could go into the changelog. Indeed, the version number might not have to be set even since it's not perfectly known - typically I just set it to the next version I predict, often just a patch level.
Great question, I forgot to mention that |
All sounds good to me! I especially like that git tag annotations are also taken into consideration. It's a personal preference of mine, but I like making/seeing release notes in the repo without needing to open a browser. Maybe I am curious why you decided that |
Don't give me ideas ;).
It was compile/link times and ease-of-use. |
Just stumbled on this app that would allow making milestones with a PR. Since a milestone is being "proposed" in this PR, thought there was a chance that this app would be relevant. |
Just checking if there is anything I am missing, but from my point of view there is nothing else to be done here. Is there anything preventing a merge, is an action required? Thank you |
Sure! you can merge it. I forgot to approve the PR but it LGTM from the start. Thanks @Byron |
Great to hear, thank you! As this requires a slight change in workflow, let me summarize it here once more. A prerequisite is
If there are any problems, as unexpected as it would be, please feel free to reach out. |
A sample for non-destructive changelog generation that uses
the git-history as a guide.
It can be filled in manually but will pre-fill itself using
git-conventional commit messages.
It also collects all kinds of interesting information, and
can be customized to not include certain auto-generated sections.
What do you think?
You can play around with it yourself using
cargo install cargo-smart-release
(a gitoxide project).