File tree Expand file tree Collapse file tree 1 file changed +23
-2
lines changed Expand file tree Collapse file tree 1 file changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -20,8 +20,11 @@ name: 'lint'
2020on :
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
2629concurrency :
2730 group : ' ${{ github.workflow }}-${{ github.head_ref || github.ref }}'
5659 ENABLE_PARALLEL : 0
5760 EXCLUDE_LINT_DIRS : \./3-networks/modules/transitivity/assets
5861
62+ commitlint :
63+ runs-on : ubuntu-latest
64+ steps :
65+ - uses : actions/checkout@v4
66+ with :
67+ fetch-depth : 0
68+ - name : Setup node
69+ uses : actions/setup-node@v4
70+ with :
71+ node-version : lts/*
72+ - name : Install commitlint
73+ run : |
74+ npm install -D @commitlint/cli@19.8.1 @commitlint/config-conventional@19.8.1
75+ echo "module.exports = { extends: ['@commitlint/config-conventional'], rules: {'subject-case': [0]} };" > commitlint.config.js
76+ npx commitlint --version
77+ - name : Validate PR commits with commitlint
78+ if : github.event_name == 'pull_request'
79+ run : ' echo "${{ github.event.pull_request.title }}" | npx commitlint --verbose'
You can’t perform that action at this time.
0 commit comments