Move unreleased changelog entries to CHANGELOG.d#4132
Move unreleased changelog entries to CHANGELOG.d#4132rhendric merged 2 commits intopurescript:masterfrom
Conversation
1ed9a95 to
a6749b8
Compare
|
Just a few thoughts
Other than that, it looks good. |
No, the whole idea is to get rid of that! This PR can't actually delete that section yet because I didn't want to mess with your release PR, but the idea is that
Yeah, so this is a little complex. The design (which could be imperfectly implemented) is as follows:
So if a feature spans multiple PRs, any PR that edits the same entry file and also touches some non-changelog file in the repo gets added to the list for that entry. Any PR that only edits entry files is not mentioned. |
🤦♂️ Ha! I'm dumb. Well great! I like this idea a lot! Well done. |
a6749b8 to
59de313
Compare
|
Updated to actually remove the Unreleased section from the changelog, now that it's empty. |
|
I try not to be pushy about my PRs, but I think it would be particularly convenient for this to be reviewed and, if acceptable, merged before any other PRs, now that 0.14.3 is released and there aren't any unreleased changelog entries. |
|
I'm in full agreement of getting this merged first before any other PRs. |
|
I checked this out locally to see how this works. @rhendric Thanks for making me laugh. The changelog was a fun read. Running Once it did build, rerunning it took about 4 seconds. When I did build the changelog via the above command (after updating the version in ## 0.14.4
New features:
* Support cobras to control anteater population (#4123 and #4100 by @varikvalefor and @JordanMartinez)
The cobras are themselves controlled by a mongoose.
* Add a doberman to guard the big pit (#4129 by @rhendric)
Bugfixes:
* Use anteaters to clean up rooms (#4096 by @rhendric)
Internal:
* Move unreleased changelog entries to CHANGELOG.d
See CHANGELOG.d/README.md for details.
* Use a big pit to hold all these animals (#4113 by @f-f)At some point, as I was playing around with it, I modified one of the files in the CHANGELOG.d folder but didn't commit it. Running I also intentionally created a file with a lot of blank lines at the end of it to see what would happen. Why? My editor always adds a blank newline to the bottom of a file, whether I need it or not: This changelog script did not trim the three extra lines at the bottom of the file. Below is a snippet of what it produced: Bugfixes:
* Use anteaters to clean up rooms (#4096 by @rhendric)
* fix some stuff
and some more stuff
Internal:The same extra newlines issue occurs if there are extra newlines above the file's content. For example: Perhaps this line trimming issue should be addressed, but since we can address it when reviewing PRs, I don't think it's absolutely necessary. If anything, @rhendric, do you think there should be an |
Sad but true. How often do you think contributors will really want to do this, though? The processing done to the entries is pretty minimal; I expect once the novelty wears off, this script will get run about as often as the license generator, which has a similar startup cost.
That's a good test. Failing at this step—with CHANGELOG.md updated and
I think that's a good idea. I didn't think it mattered much because in Markdown, many line breaks are the same as one, but if you cared enough to look for it, I can care enough to make it correct.
Doesn't |
I read it again. Yeah, It does. Never mind.
Probably not that often. Again, I think this is the only downside, but it's a very small downside in comparison to the other advantages this provides.
I don't think it needs to be changed until we experience this problem enough to warrant the change. Let's keep this tool simple and see how things go.
Good questions. I think the force-delete would be an unexpected change if I was actually trying to change one of the entries. I think it would be better to force the user to commit them, so that it appears in the diff when we're reviewing the release PR. |
|
@JordanMartinez I had already implemented stripping extra whitespace by the time I read your comment; it's pretty simple. Feedback is addressed in 9865dd8, and my test branch has been rebased atop this one. If you could give this all one final look-over before I merge? |
|
@rhendric Thanks for doing that. Yeah, this looks good. Feel free to merge! |
Description of the change
Instead of editing
CHANGELOG.md, let's create files inCHANGELOG.d.CHANGELOG.d/README.mdexplains the scheme, andupdate-changelog.hsdoes the hard work at release time.If you'd like to play around with the release-time ergonomics, get a test branch with
git clone -b rhendric/test-for-changelog-dir --single-branch https://github.com/rhendric/purescript.git, run./update-changelog.hs, and see what happened withgit diff --cached.Closes #4130.
Checklist: