@timbeyer/commitlint-circle
TypeScript icon, indicating that this package has built-in type declarations

4.1.1 • Public • Published

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-circle

When 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-circle

Note 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

PR Lookup

When building a change

SHA Lookup

Readme

Keywords

none

Package Sidebar

Install

npm i @timbeyer/commitlint-circle

Weekly Downloads

1,451

Version

4.1.1

License

MIT

Unpacked Size

15.3 kB

Total Files

8

Last publish

Collaborators

  • timbeyer