File tree Expand file tree Collapse file tree 3 files changed +25
-20
lines changed Expand file tree Collapse file tree 3 files changed +25
-20
lines changed Original file line number Diff line number Diff line change 3
3
on :
4
4
push :
5
5
pull_request :
6
- pull_request_target :
7
- types : [opened, reopened, synchronize]
8
6
9
7
concurrency :
10
8
group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
15
13
COMPOSER_ROOT_VERSION : " 4.1.x-dev"
16
14
17
15
jobs :
18
- commitlint :
19
- if : github.event_name == 'pull_request_target'
20
- runs-on : ubuntu-latest
21
- steps :
22
- - uses : actions/checkout@v4
23
- with :
24
- fetch-depth : 0
25
- - name : Run commitlint
26
- run : |
27
- base_sha="${{ github.event.pull_request.base.sha }}"
28
- head_sha="${{ github.event.pull_request.head.sha }}"
29
- first_commit_sha=$(git rev-list --no-merges --reverse $base_sha..$head_sha | head -n 1)
30
- commit_message=$(git log -1 --pretty=%B $first_commit_sha)
31
- # we can't use npx see https://github.com/conventional-changelog/commitlint/issues/613
32
- echo '{}' > package.json
33
- npm install --no-fund --no-audit @commitlint/config-conventional @commitlint/cli
34
- echo "$commit_message" | ./node_modules/.bin/commitlint -g .commitlintrc
35
-
36
16
architecture :
37
17
name : Check components interdependencies
38
18
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change
1
+ name : Commit Lint
2
+
3
+ on :
4
+ pull_request_target :
5
+ types : [opened, reopened, synchronize]
6
+
7
+ jobs :
8
+ commitlint :
9
+ if : github.event_name == 'pull_request_target'
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - uses : actions/checkout@v4
13
+ with :
14
+ fetch-depth : 0
15
+ - name : Run commitlint
16
+ run : |
17
+ base_sha="${{ github.event.pull_request.base.sha }}"
18
+ head_sha="${{ github.event.pull_request.head.sha }}"
19
+ first_commit_sha=$(git rev-list --no-merges --reverse $base_sha..$head_sha | head -n 1)
20
+ commit_message=$(git log -1 --pretty=%B $first_commit_sha)
21
+ # we can't use npx see https://github.com/conventional-changelog/commitlint/issues/613
22
+ echo '{}' > package.json
23
+ npm install --no-fund --no-audit @commitlint/config-conventional @commitlint/cli
24
+ echo "$commit_message" | ./node_modules/.bin/commitlint -g .commitlintrc
25
+
File renamed without changes.
You can’t perform that action at this time.
0 commit comments