The pull-request-title-validator
GitHub Action helps ensuring that contributors provide informative and well-formatted titles - based on the conventional-commits specification. The titles of the pull request could then be used to create automated releases.
feat(client): add component
│ │ └─────── message
│ └──────────────── scope
└───────────────────── type
The action can be used with both the pull_request
and pull_request_target
trigger.
name: validate-pull-request-title
on:
pull_request:
types:
- opened
- edited
- synchronize
permissions:
pull-requests: read
jobs:
validator:
name: validate-pull-request-title
runs-on: ubuntu-latest
steps:
- name: validate pull request title
uses: kontrolplane/[email protected]
name: validate-pull-request-title
on:
pull_request:
types:
- opened
- edited
- synchronize
permissions:
pull-requests: read
jobs:
validator:
name: validate-pull-request-title
runs-on: ubuntu-latest
steps:
- name: validate pull request title
uses: kontrolplane/[email protected]
with:
types: "fix,feat,chore"
Scopes support regular expression patterns, allowing you to define specific patterns to match the scopes you want to allow. You can also separate multiple scopes using commas.
name: validate-pull-request-title
on:
pull_request:
types:
- opened
- edited
- synchronize
permissions:
pull-requests: read
jobs:
validator:
name: validate-pull-request-title
runs-on: ubuntu-latest
steps:
- name: validate pull request title
uses: kontrolplane/[email protected]
with:
scopes: "api,lang,parser,package/.+"