Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
git-commit

GitHub Action

Conventional Commitlint

v0.2.1

Conventional Commitlint

git-commit

Conventional Commitlint

A GitHub Action to check conventional commit message

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Conventional Commitlint

uses: opensource-nepal/[email protected]

Learn more about this action in opensource-nepal/commitlint

Choose a version

commitlint

PyPI version CI status Downloads codecov License

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

  1. Add the following configuration on .pre-commit-config.yaml.

    repos:
    ...
    
    - repo: https://github.com/opensource-nepal/commitlint
        rev: v0.2.1
        hooks:
        - id: commitlint
    
    ...
  2. 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/[email protected]
    ...

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/[email protected]

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.