pull-request-lint/README.md
Jan Klattenhoff 1c435549a6
All checks were successful
Lint Pull Request / Lint PR Title (pull_request) Successful in 9s
docs: update pull request lint action version in README
2025-04-09 18:42:45 +02:00

1.1 KiB

pull-request-lint

A GitHub/Gitea Action that lints pull request titles to ensure they follow the Conventional Commits format.

Usage

Add the following to your GitHub/Gitea workflow:

name: Pull Request Lint

on:
  pull_request:
    types: [opened, edited, reopened, synchronize]

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Install go
        uses: actions/setup-go@v5
        with:
          go-version: 1.24.2
      - uses: https://git.kjan.de/actions/pull-request-lint@release

Validation Rules

The action enforces the following Conventional Commits rules for PR titles:

  • Format must be: type(scope)!: description (scope and breaking change marker ! are optional)
  • Type and scope must be lowercase
  • Description must start with lowercase
  • Breaking change indicator and footer are mutually exclusive
  • Body must be separated from description by a blank line
  • Footer tokens must use hyphens instead of spaces (except for "BREAKING CHANGE")

License

See LICENSE file for details.