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 1
1
{
2
2
"defaultIgnores": true,
3
- "parserPreset ": "conventional-changelog-conventionalcommits ",
3
+ "extends ": "@commitlint/config-conventional ",
4
4
"rules": {
5
5
"scope-enum": [
6
6
2,
Original file line number Diff line number Diff line change 11
11
12
12
jobs :
13
13
commitlint :
14
+ if : github.event_name == 'pull_request'
15
+ env :
16
+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
14
17
runs-on : ubuntu-latest
15
18
steps :
16
19
- uses : actions/checkout@v3
17
20
with :
18
21
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
21
32
php-cs-fixer :
22
33
name : PHP-cs-fixer (PHP ${{ matrix.php }})
23
34
runs-on : ubuntu-latest
You can’t perform that action at this time.
0 commit comments