conventional-commit

command module
v0.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

README

Conventional commit docker action

This action validates the PR title and checks if it is formulated according to the conventional commit spec.

Basic usage

name: Pull request

on:
  pull_request: {}

jobs:
  Validate:
    runs-on: ubuntu-latest
    steps:
      - name: Validate PR title
        uses: lab42/conventional-commit@main
        env:
            GITHUB_TOKEN: ${{ secrets.TOKEN }}

Configuring types and description validation.

The following example uses regular expressions to valudate the types and description. Adjust them according to your needs.

  • Default types : build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test
  • Defautl description: ([\w ]+)
name: Pull request

on:
  pull_request: {}

jobs:
  Validate:
    runs-on: ubuntu-latest
    steps:
      - name: Validate PR title
        uses: lab42/conventional-commit@main
        env:
            GITHUB_TOKEN: ${{ secrets.TOKEN }}
            TYPES: feat|fix
            DESCRIPTION: \[([\w])-(\d{1,4})\] ([\w ]+) # Example for requiring Jira issue number before description.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL