Skip to content

Commit bcbaba0

Browse files
authored
ci: add PR quality workflow for conventional commit title validation (#58)
## Summary - Ports `.github/workflows/pr-quality.yml` from `kosli-dev/terraform-provider-kosli` - Validates PR titles follow Conventional Commits format using `amannn/action-semantic-pull-request@v6` - Allowed types: `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `build`, `ci`, `chore`, `revert` - Scope is optional - Enforces lowercase subject (no uppercase first letter) Closes #28
1 parent fc4732a commit bcbaba0

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

.github/workflows/pr-quality.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: PR Quality Checks
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- edited
8+
- reopened
9+
- synchronize
10+
11+
jobs:
12+
validate-title:
13+
name: Validate PR Title
14+
runs-on: ubuntu-latest
15+
permissions:
16+
pull-requests: read
17+
steps:
18+
- name: Check PR title follows Conventional Commit format
19+
uses: amannn/action-semantic-pull-request@v6
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
with:
23+
# Configure allowed types (based on conventional commits)
24+
types: |
25+
feat
26+
fix
27+
docs
28+
style
29+
refactor
30+
perf
31+
test
32+
build
33+
ci
34+
chore
35+
revert
36+
# Don't require a scope (e.g., "feat(<scope>): ...")
37+
requireScope: false
38+
# Don't allow subject to start with uppercase letter
39+
subjectPattern: ^(?![A-Z]).+$
40+
subjectPatternError: |
41+
The subject (description) should start with a lowercase letter.
42+
Example: "feat(api): add new endpoint" (not "feat(api): Add new endpoint")

0 commit comments

Comments
 (0)