SimonAlling / userscripter

Create userscripts in a breeze!
https://www.npmjs.com/package/userscripter
MIT License
100 stars 10 forks source link

Conventional Commits should be enforced #44

Closed SimonAlling closed 3 years ago

SimonAlling commented 3 years ago

38 made me decide to start using Conventional Commits, but I know how it's gonna end up if it's not enforced in CI …

avallete commented 3 years ago

I think the best way to "enforce" those commits is 2 steps checks:

  1. Locally enforce and configure commit convention, allowing contributors to fail quickly (and avoid the need to rewrite a remote PR history). That can be done pretty easily with husky and commitlint
  2. Add benefits to the fact of following this convention. The primary advantage of this convention, besides uniformization, is the ability to automate release versions. Using semantic-release, we could add ContinousDeployment on top of the CI. Automatically releasing a new version of the package if needed when new commits are pushed into master.

This workflow both enforce (bad release version or not release at all if not followed) and draw maximum benefits from conventional commits convention.

I have set up this workflow on this repo userscripter-boilerplate and could help set up the same one here if needed.

SimonAlling commented 3 years ago

Yes, especially Husky hooks are a given, and also a GitHub Actions check. Continuous deployment may happen at some point in the future, but I think we should move in that direction with small steps.