Commit message validation with commitlint
npm package
Add the following step to your circleci config.yml
:
version: 2
jobs:
commitlint:
docker:
- image: williamlauze/circleci-commitlint:latest
working_directory: /www
steps:
- checkout
- run:
name: Lint commit messages
command: |
/bin/sh /.scripts/commitlint_range.sh
workflows:
version: 2
my_pipeline:
jobs:
- commitlint
You will need to have a github OAUTH token to get the pull request details
Create an environment variable in your circleci repository
GITHUB_TOKEN_COMMITLINT=yourToken