Skip to content
align-center

GitHub Action

Commit Harmonizer

v0.6.0 Latest version

Commit Harmonizer

align-center

Commit Harmonizer

Checks commit messages against Conventional Commit format

Installation

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

              

- name: Commit Harmonizer

uses: aisevim/[email protected]

Learn more about this action in aisevim/commit-harmonizer-action

Choose a version

Commit Harmonizer

Tests GitHub tag (latest by date)

Enforce conventional commit format for Commit and PR titles with clear error output

Inputs

Input Description Required Default
github-token Token for repository access true
check-pr-title Enable PR title checking false true
check-commits Enable last commit message checking false true
bypass-checks A regex to bypass checks false ^wip|Wip|Merge|Revert|revert

Usage

On PR Title Edit and Last Commit Change

name: Pull Request Message Checker

on:
  pull_request:
    types:
      - edited
      - opened
      - synchronize
      - reopened

jobs:
  check-commit:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repository
        uses: actions/checkout@v4

      - name: Check Commit Message
        uses: aisevim/commit-harmonizer-action
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}

On PR Title Edit

name: Pull Request Title Checker

on:
  pull_request:
    types:
      - edited


jobs:
  check-commit:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repository
        uses: actions/checkout@v4

      - name: Check Commit Message
        uses: aisevim/commit-harmonizer-action
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          check-commits: false

On Last Commit Change and disable bypass

name: Pull Request Commit Message Checker

on:
  pull_request:
    types:
      - opened
      - synchronize
      - reopened


jobs:
  check-commit:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repository
        uses: actions/checkout@v4

      - name: Check Commit Message
        uses: aisevim/commit-harmonizer-action
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          check-pr-title: false
          bypass-checks: ".+"

Outputs Examples

Log example-1

Log example-2

Log example-3

License

This project is licensed under the MIT License.

Release Notes

See CHANGELOG.md for details on each release.