Mirrors the conventions used in ../yams: a sectioned .gitignore, thin .githooks dispatchers over runnable scripts/, release-please config and manifest, conventional-commit linting, CODEOWNERS, a PR template with a rule-precision checkbox, and tests + commitlint workflows. CI calls scripts/lint.sh so local hooks and CI cannot drift.
30 lines
658 B
YAML
30 lines
658 B
YAML
name: Lint Commits
|
|
|
|
'on':
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
permissions:
|
|
contents: read
|
|
pull-requests: read
|
|
|
|
jobs:
|
|
commitlint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
|
|
- name: Install commitlint
|
|
run: npm install --save-dev @commitlint/{cli,config-conventional}
|
|
|
|
- name: Validate PR commits
|
|
env:
|
|
COMMITLINT_FROM: ${{ github.event.pull_request.base.sha }}
|
|
COMMITLINT_TO: ${{ github.event.pull_request.head.sha }}
|
|
run: scripts/lint.sh commitlint
|