Open ajanon opened 1 year ago
I'm all for adopting conventional commits, it will help us with a lot of automation such as automatic release tagging and changelog generation.
I think git hooks and github action checks are a good way to enforce them just incase someone works around the hooks. Apart from that in the PR review process I presume just looking for a meaningful message is enough.
I am looking into cocogitto
and alternatives.
I am not a fan of automating changelog generation as I think this would still need a lot of manual editing to remove noise (refactors, non-user facing changes...). Also, even with very well written commit titles, we'd still need to adjust them to form complete sentences and sometimes add a bit of context. Ideally, if we make sure each PR updates the changelog as needed, there will be no need to generate it from the git log.
Git hooks would be nice, but I do have one issue. If we add cocogitto
hooks (or alternatives), every developer then must have cocogitto
installed on their machine to be able to commit and push. This creates an additional (small) barrier to contributing.
GitHub Actions don't have such a problem. In a way, this may just be kicking the can down the road, though, as a contributor would then need to amend their PR to follow our guidelines, instead of having a correct PR first try (commit-style wise).
What do you think?
I think karma runner should be good. Afaik, many rust based projects like pacdef, topgrade and helix use it and this is already popular enough that tools would be built around it. Also not hard to integrate into Github checks for PRs.
Currently, git commits tend to follow the
[subject] title
style. Unfortunately, there is no strict guide for this format as the link given in theCONTRIBUTING.md
file is not up to date (https://github.com/facebook/draft-js/blob/a9316a723f9e918afde44dea68b5f9f39b7d9b00/CONTRIBUTING.md links to a 404). In addition, this format is not followed closely by contributors or maintainers: see 04e5125, e4a490 and 321c58c for three different commit styles.This was mentioned briefly in #181 (comment https://github.com/waycrate/swhkd/issues/181#issuecomment-1357503117) where we discussed adopting Conventional Commits with automation help from the cocogitto project.
This issue is for discussing adopting Conventional Commits or alternatives.
We should also discuss if/how to enforce it. Should we add git hooks? GitHub actions checks? Manually, as part of the PR review process?