4.1.1 • Published 4 years ago
@timbeyer/commitlint-circle v4.1.1
Lint all relevant commits for a change or PR on Circle CI
commitlint-circle
This package is a convenience wrapper around commitlint,
providing zero-configuration linting of all relevant commits
for a given change/build combination.
Getting started
yarn add @timbeyer/commitlint-circle --dev# .circleci/config.yml
- run: yarn commitlint-circleWhen using a different main branch name
commitlint-circle for historical reasons assumes that your repository uses master as its main branch name. Github and Gitlab have since moved on from this name and started using main as the default name. In order to preserve backward compatibility, you can pass CIRCLE_REPOSITORY_MAIN_BRANCH:
# .circleci/config.yml
my-task:
environment:
CIRCLE_REPOSITORY_MAIN_BRANCH: origin/main
steps:
- # [...]
- run: yarn commitlint-circleNote that you can pass both main, origin/main or any other branch name that is your default. commitlint-circle will prefix it with the remote origin if it isn't there.
Screenshots
When building a PR

When building a change
