-
-
Notifications
You must be signed in to change notification settings - Fork 3
38 lines (31 loc) · 871 Bytes
/
commitlint.yml
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
35
36
37
38
# https://commitlint.js.org/
name: commitlint
on:
push:
pull_request:
# defaults to opened, synchronize, reopened
types: [opened, synchronize, reopened, edited]
jobs:
commitlint:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install dependencies
run: npm ci
- name: Lint commit message
run: npx commitlint --from=HEAD~1
- name: Lint PR title
if: github.event_name == 'pull_request'
run: |
npx commitlint << EOF
${{ github.event.pull_request.title }}
EOF
- name: Lint string
run: |
echo 'chore: message' | npx commitlint
# https://github.com/remarkablemark/commitlint
- uses: remarkablemark/commitlint@v1