feat(docs): automatic changelog.mdx generation #2724
Draft
+1,692
−1,466
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For some time now, we've had the problem where our changelog has stayed outdated for some time because it takes a long time to update manually, and we were trying to focus on other things. But in truth, it feels unacceptable to have an outdated changelog for so long. Because of that, I've been entertaining the idea of auto generating it for a really long time and finally have come to it.
This generates it from the CHANGELOG.md file for each package we have. It then parses the markdown files there in a very simple way to determine the versions for each log and the changes themselves. It then, using
git blameand the line of the version's header (i.e.,## x.x.x) to determine the date of that version. Finally, it then groups those logs based on the date formatted as[Month] [Date], [Year], sorts and then outputs using the Mintlify's Update component.With those changes, the changelog (now updated automatically), looks like this:
The single problem with this right now is that it rewrites the entire changelog, since it's also a different structure, which removes the changelog entries we had before we started using changesets.