craft icon indicating copy to clipboard operation
craft copied to clipboard

Add new `## Unreleased` section to CHANGELOG.md after replacing it with the just-released tag

Open vaind opened this issue 3 years ago • 8 comments

This is something everyone has to do manually at the moment (or have some other automation do it for them).

I guess this could be an additional commit after the tagged change.

vaind avatar Sep 14 '22 15:09 vaind

could you elaborate on what you're referring to ?

asottile-sentry avatar Sep 14 '22 15:09 asottile-sentry

After this commit is made, I'd like there to be another one that adds a blank ## Unreleased section to the changelog.

vaind avatar Sep 14 '22 15:09 vaind

I'm not sure how that would work -- wouldn't that make the top of a just-released changelog say "Unreleased" if it were to add that section at the same time ? that seems undesirable

asottile-sentry avatar Sep 14 '22 15:09 asottile-sentry

Yes, it would - that's what the changelog.md looks like anyway - PRs add their items to the Unreleased section, then there's a release which just renames it. The first contributor that comes with a PR after a release needs to update their changelog by adding the Unreleased section first.

I mean it's really a first-world-problem of course, just nice to have as it makes life just a bit easier. Also, it helps reduce the chance (of course it doesn't prevent this) of accidentally adding one to an already released section accidentally.

examples: image image

vaind avatar Sep 14 '22 15:09 vaind

I think what you actually want is a post-release commit to re-add that section -- having it be part of the release will ship that "Unreleased" header to package repositories

asottile-sentry avatar Sep 14 '22 15:09 asottile-sentry

I think what you actually want is a post-release commit to re-add that section

yes exactly

having it be part of the release will ship that "Unreleased" header to package repositories

Maybe my assumption was wrong then - I thought craft runs the whole release process so it could make a commit after it made the release?

vaind avatar Sep 14 '22 15:09 vaind

the current way craft works is it merges in a commit that's already passed tests -- it could add another commit afterwards but I'm not sure it should without review / passing tests / etc.

asottile-sentry avatar Sep 14 '22 15:09 asottile-sentry

Why not use the automatic changelog policy instead?

BYK avatar Sep 14 '22 15:09 BYK