-
Notifications
You must be signed in to change notification settings - Fork 139
Add changelog generator script #51
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implementation wise, this looks fine to me @felixarntz. Tested and it worked as expected.
I was wondering, when the npm run changelog -- -m "Initial plugin release" command is run, would it make sense to paste the output in the clipboard, or even paste it in the README.txt file directly? We can anticipate that with time, the generated changelog will be bigger and bigger, and at least the first option will come handy.
Great idea! I think we could eventually add this, but since we don't have the Maybe worth a follow-up issue (which would depend on both #40 and #41 to be completed)? |
Fixes #41
This PR takes over the code from Gutenberg's changelog generator script to this repository, with a few adjustments for our purposes. Overall, our implementation can be a bit simpler than theirs since we don't have as many labels and complex requirements to our changelog - at least not yet 🙂
In order to test this PR, pull the branch and run the following command (make sure to update dependencies first):
You can provide any milestone title as argument, but the above is the only one we have so far (see https://github.com/WordPress/performance/milestones).
The above should give an output like the following (which can later be directly copied/pasted into the
readme.txtfile):Our milestones will eventually be named with actual versions, i.e. instead of
= Initial plugin release =the output would start with something like= 1.0.0 =.More in-depth overview of the changes:
bin/pluginfolder withcli.jsentrypoint to the plugin's CLI framework.bin/plugin/commands/changelog.jswith the implementation of the changelog command. That is going to be the only command we need for now.--milestoneor-margument is required in our case.[Type] xyzlabel.[Focus] xyzlabel) or the word "Infrastructure" (fromInfrastructurelabel).readme.txtformat (which Gutenberg is not using for its changelog, it uses regular Markdown instead).bin/plugin/libfolder with some common utility functions.npm run changelogscript that calls the above changelog command via the new CLI tool.@wordpress/scriptspackage, withformat-jsandlint-jscommands.binfolder, which at this point are the only JS files in the entire project.devDependenciestopackage.json.