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: 0.2.0 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@0.2.0
...
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@0.2.0
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
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.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 946ec1707a3c09188d7eb55a07028a04714a0012eafdbad28e786aa48a660341 |
|
MD5 | d89128e75f9d6b7f8e5206b2b9762b12 |
|
BLAKE2b-256 | 367f7a7e9eb135088b4649a29b9bc61f573c71335487958d0539156df5512ff8 |