Skip to content
This repository was archived by the owner on Dec 21, 2021. It is now read-only.

Conversation

@timoxley
Copy link
Contributor

@timoxley timoxley commented Mar 16, 2021

This adds a commit message git hook that should "enforce" the type(scope): format for commit messages.

There are other rules but I've relaxed them a bunch and also set it not run during rebases.

If you find any of these rules annoying, please let me know and we can just disable it.

If there's a problem with the validation and you really need to skip this hook, you can always run your git commands with the --no-verify flag, e.g.

git commit --no-verify 

Currently this is not validated in CI, local only.

Open to expanding the list of types or maybe enforcing list of scopes.
Possible this may cause issues with the gh-pages action, since it's writing commits to the gh-pages branch. update: Fixed by adding additional types.

@timoxley timoxley requested review from fonty1, jtakalai and teogeb March 16, 2021 17:49
Copy link
Contributor

@fonty1 fonty1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any thoughts on how this should be communicated with 3rd party devs that want to commit a fix. Perhaps a 'Contributing' section in the readme docs? I can do that in a separate PR if you'd like

Copy link
Contributor

@jtakalai jtakalai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting stuff

@timoxley
Copy link
Contributor Author

Perhaps a 'Contributing' section in the readme docs?

@fonty1 Great idea. Once this PR lands, the tooling will enforce the commit message shape, but a section about formatting messages for contributors would be good in addition to this.

@fonty1 can you draft up a CONTRIBUTING.md file for the project root, linked to by the README.md? Using a CONTRIBUTING file means it would start appearing as a link in Issues/PRs i.e. https://docs.github.com/en/github/building-a-strong-community/setting-guidelines-for-repository-contributors

@timoxley timoxley merged commit 0b35cd9 into master Mar 19, 2021
@timoxley timoxley deleted the conventional-commits branch March 19, 2021 15:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants