Lints the title of a pull request
Find a file
Jan K9f 2651245a59
All checks were successful
Lint Pull Request / Lint PR Title (pull_request) Successful in 9s
Merge branch 'main' into update-readme
2025-04-09 16:34:28 +00: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 docs: update README with usage and validation rules 2025-04-09 18:34:02 +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, synchronize]

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: your-org/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.