open-scd icon indicating copy to clipboard operation
open-scd copied to clipboard

Add commitlint to OpenSCD and Core

Open pascalwilbrink opened this issue 1 year ago • 7 comments

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

pascalwilbrink avatar Nov 14 '23 10:11 pascalwilbrink

@ca-d already did some work on this: https://github.com/openscd/open-scd/pull/1286

Sander3003 avatar Nov 15 '23 08:11 Sander3003

Needs community refinement

Sander3003 avatar Nov 15 '23 08:11 Sander3003

Could me moved to the TSC

Sander3003 avatar Nov 22 '23 13:11 Sander3003

@trusz What is your opinion on this idea?

Sander3003 avatar Dec 19 '23 14:12 Sander3003

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.

trusz avatar Jan 31 '24 15:01 trusz

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.

juancho0202 avatar Feb 13 '24 08:02 juancho0202

Use conventionals Use squashing

  1. pre merge github action
  2. Check PR-name

Next steps: Create this Try this approach

Sander3003 avatar Feb 15 '24 14:02 Sander3003