This is a preconfigured Docker image with commitlint. It has the following settings
- Extend
@commitlint/config-conventional
- Disable the
scope-case
rule to allow any case - Custom
imperative-tense
rule to check subjects for imperative mood
This image can be used in three ways.
- As a standalone
commitlint
CLI - As a pre-commit hook
- As a GitHub action
$ docker pull extenda/commitlint
$ echo "feat: add feature" | docker run --rm -i extenda/commitlint
$ docker run --rm -i extenda/commitlint --from HEAD~1
The image can be used to build a pre-commit hook. Extenda provides a commitlint pre-commit hook that can be configured like this:
- repo: [email protected]:extenda/pre-commit-hooks.git
rev: v0.4
hooks:
- id: commitlint
stages: [commit-msg]
To support GitHub actions, the docker image offers an alternative entrypoint under /usr/local/bin/action
.
Usage: action [-c <sha>] [-m <message>]
Extenda Retail provides a GitHub action out-of-the-box available at https://github.com/extenda/actions/commitlint.
This project is licensed under the MIT license.
This project contains a list imperative mood blacklist from the MIT licensed git-good-commit project.