-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
chore: setup conventional commits with Lerna #8415
Conversation
@karmatosed @mtias @pento - are we okey with adopting Angular conventions to use when merging PRs? Examples:
|
I'm really not excited about having this kind of strict format, without the ability to enforce it, and the ability to provide templates. |
Thinking about the current WordPress' commit message format:
And ideally having this continue once Gutenberg is merged into core rather than the Angular preset, the jQuery preset is very similar to the current WordPress format: e.g:
Add some props, change Ref to See, and we'd nearly have nailed it.
I'm not sure if there any GitHub apps that offer templates but enforcement can be provided by I beleive https://github.com/paulirish/commitlintbot. |
It's only about merging PRs, something that happens a few times a day usually and is done by a limited number of contributors. What do you propose as an alternative? Enforcing updates to
I don't care really what we use as long as it is to follow and doesn't require tons of coding to start using it. It can be jQuery if it is closer to WordPress standards 👍
Awesome, that would be great to have it integrated 👍 |
I also don't like enforcing commit messages but I acknowledge that we have an issue we need to solve: How to maintain packages CHANGELOG and since the person releasing packages (which means choosing versions that follow semver) is not the person who did the changes to all the updated packages in general, it means we need a way to know if there's breaking changes, features or just bug fixes when releasing. And a conventional changelog is a "tempting" solution for that. |
Maybe we should revisit the decision for the changelog to be compiled at release time (which we've not really been doing anyways), and move the burden of this onto the developer proposing the change. Then, when it comes time for release, it should be a matter of scanning the changelog and seeing whether changes are breaking or not. This might also need some convention, though even as simple as "Breaking:" (major) and "New:" (minor) and "Fix:" (patch). |
I'm inclined to agree that the changelog update should happen in the PR that creates the change, rather trying to automate it with fragile scripts. The pre-release process is then just a matter of deciding whether the items in the unreleased section of the changelog deserve a major, minor, or patch level version bump. |
I'm fine with that as well and keeping it as simple as @aduth proposed with having PR title prefixed when it is applicable:
All other PRs should have no prefix for better discoverability. For those 3 types of PRs we would enforce adding an item to the appropriate |
We decided to not use conventional commits during Core JS chat yesterday:
See more at https://make.wordpress.org/core/2018/08/07/javascript-chat-summary-august-7/. |
Description
This PR tries to enabled conventional commits with Lerna which would allows us to automatically regenerate
CHANGELOG.md
files every time we publish packages to npm. This might also simplify creating Gutenberg changelog for release similar to what we did in #8278.It's based on Lerna repository configuration and the following article: https://michaljanaszek.com/blog/lerna-conventional-commits.
It is blocked by a known bug in Lerna itself: lerna/lerna#1532:
TODO
How has this been tested?
Can you actually test without publishing? I guess, NO.