Lints the title of a pull request
Find a file
Jan Klattenhoff e807c3ddb8
All checks were successful
Lint Pull Request / Lint PR Title (pull_request) Successful in 24s
build: update pull request lint workflow configuration
2025-04-09 18:40:14 +02:00
.gitea/workflows refactor: some polishing 2025-04-09 18:29:31 +02:00
docs chore(release): [skip ci] 2025-04-09 16:32:02 +00:00
internal/validation fix(validation): update error message for invalid commit format 2025-04-09 18:22:37 +02:00
.gitignore Initial commit 2025-04-09 14:43:54 +00:00
action.yml refactor: some polishing 2025-04-09 18:29:31 +02:00
go.mod refactor: clean up unused dependencies and functions 2025-04-09 18:19:21 +02:00
go.sum refactor: clean up unused dependencies and functions 2025-04-09 18:19:21 +02:00
LICENSE Initial commit 2025-04-09 14:43:54 +00:00
main.go fix(main): improve error message for invalid PR title 2025-04-09 18:20:59 +02:00
README.md build: update pull request lint workflow configuration 2025-04-09 18:40:14 +02:00
release.config.cjs feat(ci): add release workflow and configuration files (#1) 2025-04-09 14:52:48 +00:00

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@main

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.