This is a preconfigured Docker image with commitlint. It is configured for use within Extenda Retail and has the following settings
- Extend
@commitlint/config-conventional - Disable the
scope-caserule to allow any case - Change the
subject-caserule tosentence-case - Custom
imperative-tenserule to check subjects for imperative mood - Custom 'format' rule to validate structure of PR title
This image can be used in three ways.
- As a standalone
commitlintCLI - 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~1The image can be used to build a pre-commit hook. Extenda provides a commitlint pre-commit hook that can be configured like this:
- repo: git@github.com: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>] [-f <check_format>]
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.