Skip to content
umbrella

GitHub Action

Commit Validator

v0.0.10 Latest version

Commit Validator

umbrella

Commit Validator

Ensures the commits in a PR follow common rules

Installation

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

              

- name: Commit Validator

uses: oliversalzburg/action-commit-validator@v0.0.10

Learn more about this action in oliversalzburg/action-commit-validator

Choose a version

Commit Validator Action

Validate commit messages against Conventional Commits expectations.

Usage

Call the action from a workflow.

name: Pull Request

on:
  pull_request:

jobs:
  qa:
    runs-on: ubuntu-22.04
    permissions:
      contents: read

    steps:
      - uses: actions/checkout@v4
      - uses: oliversalzburg/action-commit-validator@v0.0.4
        with:
          accept_breaking_changes: false
          accept_emoji: false
          accepted_scopes: |
            api
            build
            deps
            deps-dev
          accepted_types: |
            chore
            ci
            docs
            feat
            fix
            refactor
            test
          repo_token: ${{ secrets.GITHUB_TOKEN }}

Inputs

INPUT TYPE REQUIRED DEFAULT DESCRIPTION
accept_breaking_changes string false "true" Is the breaking change indicator
(!) allowed?
accept_emoji string false "true" Are emoji allowed?
accepted_scopes string false Only accept these scopes. Provide
as multi-line string, each type
on it's own line. By
default, all scopes are accepted.
accepted_types string false "feat"
"fix"
Only accept these type prefixes.
Provide as multi-line string, each
type on it's own line.
repo_token string true Needs secrets.GITHUB_TOKEN to talk to
the API.
require_conventional string false "true" Require all commits to follow
the Conventional Commits specification
require_scope string false "false" Require all commits to specify
a scope.

Release Process

npm version patch --message "chore: Version bump %s"