Closed petejohanson closed 1 week ago
It might be nice to, on test failure, have a message informing/reminding contributors about the details of conventional commits, along with listing helpful commands to rename and squash their commits accordingly.
We should start by documenting this more specifically, maybe in a new page under "Development -> Contributing". By specifics I mean e.g. it'd be nice if we can enumerate possible categories as it relates to ZMK. E.g. "use docs:
only for all docs PRs", use feat(boards):
for new boards, use chore:
for npm updates, etc.
https://github.com/zmkfirmware/zmk/blob/main/CONTRIBUTING.md already mentions conventional commits, but I am not sure if people check there and I haven't been trying to update it either. I am not sure if we should document there also, or move its contents to docs and update it to simply tell people to check the "Contributing" section.
As a side note, wouldn't automating checking certain commit types be a bit difficult? Like being able to tell what is a breaking change, when both types of files (say docs+boards) are touched in a PR, etc.
As a side note, wouldn't automating checking certain commit types be a bit difficult? Like being able to tell what is a breaking change, when both types of files (say docs+boards) are touched in a PR, etc.
I think at best this should be checking the format, not whether the selected type/area is correct. That will still require human verification, IHMO.
Looking like gitlint is a nice option for this: https://jorisroovers.com/gitlint/latest/
Closed by #2623
In order to effectively leverage release-please for release automation, we need to actually enforce the use of conventional commits for our PR/commits, so that release-please can do a proper job of generating changelogs, determining next release version number, etc.
Probably takes the form of an additional GH Action to check commit messages for PRs.