Skip to content

About

Commit lint Github action

Resources

Stars

1 star

Watchers

1 watching

Forks

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Commit lint action

Github commit lint action

GitHub stars Usages

Versions

Stable Version GitHub Release GitHub Release

Introduction

This is template repository for new libraries

Example

name: Commit Lint

on:
  workflow_call:
    inputs:
      branch:
        required: false
        type: string
        default: "main"
      prefixes:
        required: true
        default: "Add|Fix|Update|Remove|Refactor|Docs|Test|Improve|Merge|Bump"
        description: "List of all allowed prefix [TYPE] where type can be Add, Fix, use Add|Fix|Update ..."
      minLengthText:
        required: true
        default: 8
        description: "Minimal length after [TYPE] for commit message"
  pull_request:
    types: [opened, synchronize, edited]
  push:
    branches:
      - master
      - main
      - develop
      - feature/**
      - release/**
      - test/**
      - bugfix/**

jobs:
  lint-commits:
    runs-on: ubuntu-latest
    steps:
      - name: Commit lint
        uses: gouef/commit-lint-action@main

Commit rules

Commit message should looks like

[TYPE] some message

Pre-commit

Requirements:

  • pre-commit
  pre-commit install --hook-type commit-msg

.pre-commit-config

repos:
  - repo: https://github.com/gouef/commit-lint-action
    rev: v1.1.1
    hooks:
      - id: check-commit-msg
        args: [
          "-p", "Add|Fix|Update|Remove|Refactor|Docs|Test|Improve|Merge|Bump", # List of all allowed prefix [TYPE] where type can be Add, Fix, use Add|Fix|Update ...
          "-l", "6" # Minimal length after [TYPE] for commit message
        ]

Contributors

JanGalek actions-user

About

Commit lint Github action

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages