-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (29 loc) · 1.44 KB
/
Copy pathcommit-lint.yaml
File metadata and controls
34 lines (29 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Conventional Commit (PR title)
on:
pull_request:
types: [opened, synchronize, reopened, edited]
concurrency:
group: commit-lint-${{ github.event.pull_request.number }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: write
jobs:
# ─── CONVENTIONAL COMMIT TITLE CHECK ─────────────────────────────────────────
# Validates the PR title follows the Conventional Commits spec and auto-labels
# the PR by type (feat → feature, fix → fix, feat! → breaking change, etc.).
#
# Intentionally lives in its own workflow with NO path filter so the title is
# always validated regardless of which files changed — even documentation-only
# or config-only PRs must follow the convention.
commit-lint:
name: Conventional Commit (PR title)
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: 🔍 Validate PR title and label
uses: ytanikin/pr-conventional-commits@639145d78959c53c43112365837e3abd21ed67c1 #1.5.2
with:
task_types: '["feat","fix","docs","style","refactor","perf","test","build","ci","chore","revert"]'
add_label: "true"
custom_labels: '{"feat": "feature", "fix": "fix", "docs": "documentation", "style": "style", "refactor": "refactor", "perf": "performance", "test": "test", "build": "build", "ci": "CI/CD", "chore": "chore", "revert": "revert"}'