commitlint icon indicating copy to clipboard operation
commitlint copied to clipboard

[FeatureReq] Easy Circle CI setup

Open MathiasKandelborg opened this issue 5 years ago β€’ 5 comments

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.

MathiasKandelborg avatar Mar 24 '19 14:03 MathiasKandelborg

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!

byCedric avatar Mar 25 '19 00:03 byCedric

I see that commitlint is using CircleCI now itself. So an easy integration would be appropriate πŸ˜‰

BorntraegerMarc avatar Apr 02 '20 16:04 BorntraegerMarc

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

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

rrjohnson85 avatar Apr 02 '20 17:04 rrjohnson85

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

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

If this is working for everyone it would be great if someone creates a PR to document this

escapedcat avatar May 12 '21 08:05 escapedcat

I don't use CircleCI, but there are some docs on the website that haven't been linked to yet.

Could be worth updating that if it's not what you are after. The above snippet is not in there.

AdeAttwood avatar May 17 '21 07:05 AdeAttwood

I believe this has been done with this: https://github.com/conventional-changelog/commitlint-orb

escapedcat avatar Mar 02 '24 09:03 escapedcat