open-scd
open-scd copied to clipboard
Add commitlint to OpenSCD and Core
To enforce conventional commits (https://www.conventionalcommits.org/), we can make use of CommitLint.
https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional
We can make use of Husky hooks to run commitlint before commiting;
Consequences: The kind of commits show ups in the OpenSCD release notes All commiters need to comply with conventional commits
Acceptance criteria: Not allowed to commit without using conventional commits
@ca-d already did some work on this: https://github.com/openscd/open-scd/pull/1286
Needs community refinement
Could me moved to the TSC
@trusz What is your opinion on this idea?
alternative options would be:
- pre-push hook: depending on the work style it could be hard to always adhere to it. e.g: in case of CI/CD fixes where you cannot really try it out locally or in case of micro-commits
- part of CI/CD: you can commit how every you want but merging is not possible until the commit messages are not cleaned up. Maybe you want to squash them together
The goals is probably to keep the main branch commits clean.
alternative options would be:
* pre-push hook: depending on the work style it could be hard to always adhere to it. e.g: in case of CI/CD fixes where you cannot really try it out locally or in case of micro-commits * part of CI/CD: you can commit how every you want but merging is not possible until the commit messages are not cleaned up. Maybe you want to squash them together
The goals is probably to keep the main branch commits clean.
As discussed in the standup and refinement, we have developers agreement on the convenience of relying on a pre-commit hook in order to find out about my "lack" of compliance with the conventional commits format as early as possible in the contribution process.
Use conventionals Use squashing
- pre merge github action
- Check PR-name
Next steps: Create this Try this approach