Skip to content

Lint all relevant commits for a change or PR on Circle CI

License

Notifications You must be signed in to change notification settings

TimBeyer/commitlint-circle

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Lint all relevant commits for a change or PR on Circle CI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 97.0%
  • JavaScript 3.0%