Skip to content

Commit e59b986

Browse files
chore: update .github/workflows/lint.yaml
1 parent fb0c9af commit e59b986

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

.github/workflows/lint.yaml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@ name: 'lint'
2020
on:
2121
workflow_dispatch:
2222
pull_request:
23-
branches:
24-
- main
23+
types: [opened, edited, reopened, synchronize]
24+
branches: [main]
25+
26+
permissions:
27+
contents: read
2528

2629
concurrency:
2730
group: '${{ github.workflow }}-${{ github.head_ref || github.ref }}'
@@ -52,3 +55,21 @@ jobs:
5255
env:
5356
ENABLE_BPMETADATA: 1
5457

58+
commitlint:
59+
runs-on: ubuntu-latest
60+
steps:
61+
- uses: actions/checkout@v4
62+
with:
63+
fetch-depth: 0
64+
- name: Setup node
65+
uses: actions/setup-node@v4
66+
with:
67+
node-version: lts/*
68+
- name: Install commitlint
69+
run: |
70+
npm install -D @commitlint/[email protected] @commitlint/[email protected]
71+
echo "module.exports = { extends: ['@commitlint/config-conventional'], rules: {'subject-case': [0]} };" > commitlint.config.js
72+
npx commitlint --version
73+
- name: Validate PR commits with commitlint
74+
if: github.event_name == 'pull_request'
75+
run: 'echo "${{ github.event.pull_request.title }}" | npx commitlint --verbose'

0 commit comments

Comments
 (0)