File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 11{
22 "defaultIgnores": true,
3- "parserPreset ": "conventional-changelog-conventionalcommits ",
3+ "extends ": "@commitlint/config-conventional ",
44 "rules": {
55 "scope-enum": [
66 2,
Original file line number Diff line number Diff line change 1111
1212jobs :
1313 commitlint :
14+ if : github.event_name == 'pull_request'
15+ env :
16+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
1417 runs-on : ubuntu-latest
1518 steps :
1619 - uses : actions/checkout@v3
1720 with :
1821 fetch-depth : 0
19- configFile : .commitlintrc
20- - uses : wagoid/commitlint-github-action@v5
22+ - name : Run commitlint
23+ run : |
24+ commit=$(gh api \
25+ -H "Accept: application/vnd.github+json" \
26+ /repos/${{ github.repository }}/pulls/${{github.event.number}}/commits \
27+ | jq -r '.[0].commit.message')
28+ # we can't use npx see https://github.com/conventional-changelog/commitlint/issues/613
29+ echo '{}' > package.json
30+ npm install --no-fund --no-audit @commitlint/config-conventional @commitlint/cli
31+ echo $commit | ./node_modules/.bin/commitlint -g .commitlintrc
2132 php-cs-fixer :
2233 name : PHP-cs-fixer (PHP ${{ matrix.php }})
2334 runs-on : ubuntu-latest
You can’t perform that action at this time.
0 commit comments