releasio check-pr¶
Validate that a PR title follows conventional commit format.
Usage¶
Description¶
The check-pr command validates PR titles against the conventional commit format.
Use it in CI to enforce commit conventions.
Options¶
| Option | Description |
|---|---|
--require-scope |
Require scope (e.g., feat(api): not just feat:) |
--help |
Show help message |
Environment Variables¶
| Variable | Description |
|---|---|
GITHUB_PR_TITLE |
The PR title to validate |
In GitHub Actions, this is automatically set by the action.
Examples¶
Basic Validation¶
Require Scope¶
Valid PR Titles¶
| Title | Valid | Notes |
|---|---|---|
feat: add feature |
Standard feature | |
fix: resolve bug |
Bug fix | |
feat(api): add endpoint |
With scope | |
feat!: breaking change |
Breaking change | |
add feature |
Missing type | |
Feature: add feature |
Capitalized type |
GitHub Actions¶
Validate PR titles in CI:
.github/workflows/pr.yml
name: PR Validation
on:
pull_request:
types: [opened, edited, synchronize]
jobs:
check-pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: mikeleppane/releasio@v2
with:
command: check-pr
# require-scope: 'true' # Optional
Squash Merging
If you squash merge PRs, the PR title becomes the commit message. Validating PR titles ensures proper version bumps.
See Also¶
- Conventional Commits - Commit format reference