Skip to content

Ensures that all commits are following the conventional-commits standard.

Notifications You must be signed in to change notification settings

aprets/action-conventional-commits

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

Changes

Compared to the upstream version this fork allows you to customize the allowed commit types. This lets you allow types like enh.

Conventional Commits GitHub Action

A simple GitHub action that makes sure all commit messages are following the Conventional Commits specification.

Screenshot

Note that, typically, you would make this check on a pre-commit hook (for example, using something like Commitlint), but those require extra configuration and can theoretically easily be skipped, hence this GitHub action.

Basic usage

name: Conventional Commits

on:
  pull_request:
    branches: [ master ]

jobs:
  build:
    name: Conventional Commits
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - uses: gentleseal/action-conventional-commits@master
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}

This will use the default allowed types of:

[
    "feat",
    "fix",
    "docs",
    "style",
    "refactor",
    "test",
    "build",
    "ci",
    "chore",
    "revert",
    "merge",
    "wip",
]

Customizing the commit types

name: Conventional Commits

on:
  pull_request:
    branches: [ master ]

jobs:
  build:
    name: Conventional Commits
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - uses: gentleseal/action-conventional-commits@master
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          valid-commit-types: >
            [
              "feat",
              "fix",
              "docs",
              "style",
              "refactor",
              "test",
              "build",
              "ci",
              "chore",
              "revert",
              "merge",
              "wip",
              "enh"
            ]

About

Ensures that all commits are following the conventional-commits standard.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 86.5%
  • JavaScript 13.5%