-
Notifications
You must be signed in to change notification settings - Fork 113
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
First-class citizen support for changelog #231
Comments
Could you clarify what the need is for #230? Is it when making the release, we want to extract text to put in it? Some random thoughts
|
@epage Yes. Because Github releases has release notes included, for example: https://github.com/open-telemetry/opentelemetry-java/releases/tag/v0.9.1 We will have to upload release notes of a particular version, see
We will add internal support for adding release date and version/link
This is an opt-in feature if changelog option is not provided it will be skipped.
A quick idea is to follow current config strategy that searching changelog in crate and then workspace. |
For those interested, for now I've taken to creating the release, with notes, via Github Actions |
Some quick thoughts on "first class changelog" support Something I've been considering lately is how changelogs are a source of merge conflicts. I've been considering moving away from "upcoming" being in a single file. I've seen some repos where each change is its own file and a tool merges them together. I need to do some exploration on this. This suggests though that there are different ways of doing changelogs and it might be good to leave this to a hook
I've been tempted to add to |
I just realized there is a specification about conventional commit message: https://www.conventionalcommits.org/en/v1.0.0/ . It is designed to generate changelog from commit message. We can first provide commit message generation for those projects follows this spec. |
Along that route, yet another generator was recently release, https://github.com/orhun/git-cliff, which iirc leverages the parser I maintain, https://github.com/crate-ci/git-conventional. For people using it, they probably want to enforce the commit style which https://github.com/crate-ci/committed helps with. |
Great! Sounds like we can provide an option, say |
I'd like to add something to this. In I've been thinking how to solve this problem and would like to propose something: libp2p/rust-libp2p#2902 (comment) This ties in with the idea I quoted above: A structured format for a changelog entry that - in addition to the changelog text - also specifies that semver impact. If this were integrated into We could even automatically generate a "Breaking changes" section from this based on the semver bump of a particular change. This also plays nicely with reverting of commits. What do you think? Is this something that you see in scope for |
I'm hesitant to adopt a format without it first having wide adoption or enough promise for wide adoption as I could end up pulling support for it later. In some cases, removing something can be worse than not offering it at all. However, any such tool to manage these files could have a mode like Since I last commented on this issue, I heard of https://crates.io/crates/cargo-changelog which is trying to solve this problem. It looks like there hasn't been too much new development on it. I haven't taken the time yet to look at it deeper to provide feedback. |
That's fair.
Yes, I thought more about it since I commented and I think it can actually be standalone.
Thanks for pointing me towards that, I'll look into it. |
Been looking into the concept of generating a changelog from fragments. My thoughts are at epage/epage.github.io#23 (comment) While I'd like there to be solid buy-in on built-in changelog support, I see this also helping in several other areas
Which all of this would make #117 possible. |
I am trying to use the |
What do you mean "from the top level"? Could you expand on your workflow? We don't support running a hook regardless of what packages are being released. From most use cases I've seen, that would cause its own problems. Instead, I'd recommend associating the hook with one specific package that is most representative. |
I have a set of workspace crates that I am always releasing together, and a single changelog in the workspace root. When running |
Is there a reason it can't be made to work from one of the crate folders? |
It totally can, sorry took me a moment to understand. For reference this works well # some-crate/release.toml
pre-release-hook = ["git", "cliff", "--workdir", "../", "-o", "../CHANGELOG.md", "--tag", "{{version}}" ] |
Currently there is no standard support for changelog in cargo-release. In handlebars-rust I use
pre-release-replacement
to maintain the changelog during release. It works well for most case. But when we are going to add support for github release #230 , the issue that we don't have a structured changelog for current release is becoming a block one.So I think it's time to consider a first-class citizen support for changelog in cargo-release.
There are some important principles when maintaining a changelog with cargo-release:
UPCOMING.md
to prepend to theCHANGELOG.md
.Unreleased
section from keep-a-changelog compatible markdown file.Some corner case we might need to consider:
CHANGELOG.md
orUPCOMING.md
with a feature pull request?The text was updated successfully, but these errors were encountered: