This GitHub Action validates Pull Request titles to ensure they follow the Conventional Commits specification. It uses the CCU (Conventional Commit Util) tool to enforce structured and compliant commit messages.
The action can be customized using the following inputs:
| Input | Description | Required | Default |
|---|---|---|---|
type |
Regular expression for commit type | No | build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test |
topic |
Regular expression for commit topic | No | (\([a-zA-Z0-9\-\.]+\))?(!)? |
message |
Regular expression for commit message | No | .* |
pr_title |
String to validate | Yes |
name: Validate PR Title
on:
pull_request:
types: [opened, edited, synchronize, reopened]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Validate PR Title
uses: lab42/ccu-action@main
with:
type: 'feat|fix|chore'
pr_title: ${{ github.event.pull_request.title }}feat: add new featurefix(auth): resolve login issuedocs: update READMEchore(deps): update dependenciesfeat!: breaking change in API
I welcome contributions to this project! If you have ideas for new features or improvements, please submit a feature request or contribute directly to the project.
This project is licensed under the MIT License.