commitlint is is a pre-commit hook designed to lint your commit messages according to the Conventional Commits standard.
Project description
commitlint
commitlint is a tool designed to lint your commit messages according to the Conventional Commits standard for your pre-commit hook and GitHub Actions.
How to use
For pre-commit
-
Add the following configuration on
.pre-commit-config.yaml
.repos: ... - repo: https://github.com/opensource-nepal/commitlint rev: v0.2.1 hooks: - id: commitlint ...
-
Install the
commit-msg
hook in your project repo:pre-commit install --hook-type commit-msg
NOTE: Installing using only
pre-commit install
will not work.
For github-actions
If you have any existing workflows, add the following steps:
steps:
...
- name: Run commitlint
uses: opensource-nepal/commitlint@v0.2.1
...
If you don't have any workflows, create a new GitHub workflow, e.g. .github/workflows/commitlint.yaml
.
name: Commitlint
on:
push:
branches: ['main']
pull_request:
jobs:
commitlint:
runs-on: ubuntu-latest
name: Commitlint
steps:
- uses: actions/checkout@v4
- name: Run commitlint
uses: opensource-nepal/commitlint@v0.2.1
NOTE: commitlint GitHub Actions will only be triggered by "push" or "pull_request" events.
Contribution
We appreciate feedback and contribution to this package. To get started please see our contribution guide.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for commitlint-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04ac9c4e0a753f8cedfa727a2b65640bfc680d7925f74c3283254959ef2bb35a |
|
MD5 | 766b0808f1d635aabba52a88e6f8bf71 |
|
BLAKE2b-256 | 76430e7f08fa0ccf29a3b25580b9b53c6c3a91268561c759f977592d48e83bd6 |