Lints the title of a pull request
Find a file
2025-04-09 17:49:25 +00:00
.gitea/workflows ci: add test job to CI configuration (#12) 2025-04-09 17:46:26 +00:00
docs chore(release): [skip ci] 2025-04-09 17:49:25 +00:00
internal/validation feat: add linters (#11) 2025-04-09 17:40:45 +00:00
.gitignore Initial commit 2025-04-09 14:43:54 +00:00
.golangci.yml feat: add linters (#11) 2025-04-09 17:40:45 +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 feat: add linters (#11) 2025-04-09 17:40:45 +00:00
README.md docs: update README with usage and validation rules (#7) 2025-04-09 16:43:32 +00:00
release.config.cjs feat(ci): add release workflow and configuration files (#1) 2025-04-09 14:52:48 +00:00
renovate.json chore: Configure Renovate (#4) 2025-04-09 16:44:40 +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@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.