feat(changelog): GitHub Milestones based changelogs - #291
Conversation
This patch implements the GitHub Milestones based automatic changelog generation. It builds up on #285 and #287 and ties them with GitHub milestone data to generate a changelog that is composed of logical sections with references to relevant PRs. Any remaining items are put under "Various fixes & improvements" section as an itemized list.
|
Changelog generated for this commit: Automated Changelog Generation (ongoing)We now automatically generate changelog entries for the PRs: #291, #290, #289, #287, #285 Added Maven Target (ongoing)Added the long-awaited Maven target, full with Android support. PRs: #271, #275, #276, #270, #258 Added symbol-collector TargetAdded target for our very own symbol-collector to collect and upload all native system symbols with Craft. PRs: #284, #277, #269, #268, #267, #266 Fixed Cocoapods SupportTurns out our Cocoapods target was a bit outdated and broken. We have fixed it in this release! 🥳 Various fixes & improvements
|
iker-barriocanal
left a comment
There was a problem hiding this comment.
I suggest renaming changes.ts to something closer to gitChanges. Without context, changes it's harder to understand what is referring to.
I'll rename it to |
kamilogorek
left a comment
There was a problem hiding this comment.
All the replies make sense, looks good to me
iker-barriocanal
left a comment
There was a problem hiding this comment.
I'd move the changes related to node versions and tsconfig to different PRs, but not blocking.
This was also on my mind so I'll get that done first before landing. Thanks a lot @kamilogorek and @iker-barriocanal for the great reviews. Btw. I'll also add some tests before landing as nothing hits these lines of codes during tests and they were buggy during my refactors. |
| ): Promise<string> { | ||
| const gitCommits = await getChangesSince(git, rev); | ||
|
|
||
| const githubCommits = await getMilestoneAndPRFromCommits( |
There was a problem hiding this comment.
nit: getMilestonesAndPRsFromCommits since we get plural milestones and PRs (right?) and we have plural in getMilestonesDetails
There was a problem hiding this comment.
Or since milestones are nested under PRs: getPRsWithMilestonesFromCommits?
There was a problem hiding this comment.
The naming is due to the commit -> PR -> milestone mapping. 1 commit to 1 PR to 1 Milestone. I guess making the other one singular is the right way to go here.
chadwhitacre
left a comment
There was a problem hiding this comment.
Some remaining questions/nits/naming suggestions.
FTR was slightly harder to review because of the changes.ts -> changelog.ts rename. It's a good rename but doing the filename change on a separate PR would've saved me some manual diffing locally to understand what had changed, or perhaps a note calling out the additions.
Sorry about this, realized it too late that GitHub did not recognize the rename properly 🙁 |
chadwhitacre
left a comment
There was a problem hiding this comment.
Seems we're talking past each other on function names. Happy to unblock this and revisit later if necessary.
In #291 we used level 2 headers for subsections in the auto generated changelogs. This made them collide with the level 2 version headers, causing our GitHub target to not pick up the automatically generated changelog. It is also semantically incorrect. This patch fixes the issue, introduces constants to determine these levels, and adds a helper function that utilizes these constants.
In #291 we used level 2 headers for subsections in the auto generated changelogs. This made them collide with the level 2 version headers, causing our GitHub target to not pick up the automatically generated changelog. It is also semantically incorrect. This patch fixes the issue, introduces constants to determine these levels, and adds a helper function that utilizes these constants.
This patch implements the GitHub Milestones based automatic
changelog generation. It builds up on #285 and #287 and ties
them with GitHub milestone data to generate a changelog that
is composed of logical sections with references to relevant
PRs.
Any remaining items are put under "Various fixes & improvements"
section as an itemized list.