Lint your commit messages in a CircleCI job.
Add this orb's commitlint/lint
job to your existing CircleCI workflow to utilize commitlint for validating commit messages against the conventional commit format.
This example shows importing the commitlint
orb into a basic CircleCI 2.1 config file, and adding the commitlint/lint
job to a workflow. This configuration will lint every commit pushed to the repository.
version: 2.1
orbs:
# Use the latest version of the orb.
# See the Orb Registry, or GitHub Releases
commitlint: conventional-changelog/commitlint@<latest version>
workflows:
my-workflow:
jobs:
- commitlint/lint
CircleCI will report back the status of the commitlint/lint
job and block a Pull Request from being merged if the job fails.
Want to test out the commitlint orb in your CI pipeline before pushing your changes? Use the CircleCI CLI to run any job defined in your .circleci/config.yml
locally, including jobs from orbs.
Assuming your config file looks similar to the example above, and you have the CircleCI CLI installed, you can run this orb for the current project locally with the following command.
circleci local execute --job commitlint/lint
CircleCI Orb Registry Page - The official registry page of this orb for all versions, executors, commands, and jobs described. CircleCI Orb Docs - Docs for using and creating CircleCI Orbs.
We welcome issues to and pull requests against this repository!
- Create and push a branch with your new features.
- When ready to publish a new production version, create a Pull Request from feature branch to
master
. - The title of the pull request must contain a special semver tag:
[semver:<segment>]
where<segment>
is replaced by one of the following values.
Increment | Description |
---|---|
major | Issue a 1.0.0 incremented release |
minor | Issue a x.1.0 incremented release |
patch | Issue a x.x.1 incremented release |
skip | Do not issue a release |
Example: [semver:major]
- Squash and merge. Ensure the semver tag is preserved and entered as a part of the commit message.
- On merge, after manual approval, the orb will automatically be published to the Orb Registry.
For further questions/comments about this or other orbs, visit the Orb Category of CircleCI Discuss.