Skip to content
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

Fix changelog creation script #541

Merged
merged 9 commits into from Apr 6, 2024
Merged

Fix changelog creation script #541

merged 9 commits into from Apr 6, 2024

Conversation

vcanales
Copy link
Member

@vcanales vcanales commented Apr 5, 2024

Previous Changelogs have come up empty; this PR ensures that the changes since the last tag created are correctly added to the Changelog.

  1. Don't specify --merge, since we're not using merge commits.
  2. Prioritize printing the message instead of the body; GitHub automatically sets the squashed commit to the PR title and adds the number. This should always be available, but will still add body as a fallback just in case something is committed without a PR.
  3. Use git itself to determine the last tag created, instead of using the package.json file.
  4. Other minor fixes — capitalization, order of commits in the output, etc.

Sample output for v2.0.0 from the updated script:

= 2.0.0 =
* Add theme json inspector (#520)
* Add deprecation notice in theme export admin screen (#540)
* Replace font management with screen pointing to native font library (#539)
* Added creation of theme validation to site editor interface (#532)
* Add/child theme creation (#531)
* Add blueprint.json file to enable plugin previews (#511)
* Extracted any logic that may need to be tested from the api class (#522)
* Use CORE for Font Management (#518)
* Add integration tests (#393)
* Remove CODE_OF_CONDUCT.md from .distignore. (#515)
* Remove repo specific CoC. (#514)
* GitHub Actions: Add JavaScript Unit Test (#508)
* Add files and directories not needed for release to `.distignore` (#512)
* Replace dash icon with SVG icon (#506)
* Fix browser warning error when clicking the reset button (#505)
* Add markdown and package.json lint command (#504)
* Fix react warning error on font upload page (#502)
* Fix dynamic property deprecation (#501)
* Add text domain to translation target (#499)

Testing:

Run RELEASE_TYPE=major npm run update-version — Your changelog file will include the commits from this branch, which is fine; when merged, it'll only use the history from trunk.

@vcanales vcanales added bug Something isn't working build tooling labels Apr 5, 2024
Copy link
Member

@mikachan mikachan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for fixing this! It tests well for me. Running RELEASE_TYPE=major npm run update-version, I see the commits from this branch, formatted as expected:

image

(The screenshot cuts off the bottom, the last line is "* Add text domain to translation target (#499)".)

I see the screenshot changes are in line with what's described in the plugin docs here, so these look fine too.

I think this is good to bring in 👍

Copy link
Contributor

@creativecoder creativecoder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is also working well for me! I tested the update-version command with major and minor versions.

One question, why change screenshots from jpg to png? The png file size is a lot larger.

@vcanales
Copy link
Member Author

vcanales commented Apr 6, 2024

One question, why change screenshots from jpg to png? The png file size is a lot larger.

No particular reason, that's just the default for when I took them. I've transformed them to jpeg on ef6add0; thanks for spotting!

@vcanales vcanales merged commit 14a6f16 into trunk Apr 6, 2024
2 checks passed
@vcanales vcanales deleted the fix-changelog-creation branch April 6, 2024 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working build tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants