Commitlint: [FeatureReq] Easy Circle CI setup

Created on 24 Mar 2019  ·  3Comments  ·  Source: conventional-changelog/commitlint

It would be great to install a circle-ci package or use an orb to quickly get started.

There's an ENV variable called CIRCLE_COMPARE_URL which can be used to:

  1. Find the last successful build
    1.1. If any, get that commit sha
    1.2. If none, fall back to master branch
  2. Define range from current commit sha to commit from 1

Although it might be “better” if we could find the default branch at 1.2, this is something we can build too for commitlint.

enhancement feature

Most helpful comment

If you're using pipelines in CircleCI, I believe the following would work:

npx commitlint --from << pipeline.git.base_revision >> --to << pipeline.git.revision >>

All 3 comments

Thanks for the request. I might be interested too because the place where I work at is considering switching to CircleCI. If I finish some other issues, I'll be available to help get this feature of the ground!

I see that commitlint is using CircleCI now itself. So an easy integration would be appropriate 😉

If you're using pipelines in CircleCI, I believe the following would work:

npx commitlint --from << pipeline.git.base_revision >> --to << pipeline.git.revision >>
Was this page helpful?
0 / 5 - 0 ratings