Skip to content

Commit 6393df2

Browse files
committed
ci:update commitlint
1 parent 60f7e57 commit 6393df2

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

.github/workflows/commitlint.yml

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Commitlint
33
on:
44
push:
55
branches-ignore: ["main"] # 排除 main 分支的 push 事件
6-
pull_request:
6+
pull_request: # 修正为 pull_request
77
# main 分支的 pull request 事件也会运行
88
workflow_dispatch:
99

@@ -16,21 +16,10 @@ jobs:
1616
fetch-depth: 0
1717
- uses: actions/setup-node@v3
1818
with:
19-
node-version: '20'
19+
node-version: '16' # 使用一个稳定的 Node.js 版本,比如 16
2020
- run: npm install -g @commitlint/cli @commitlint/config-conventional
2121
- run: |
2222
echo "module.exports = {extends: ['@commitlint/config-conventional']}" > commitlint.config.js
23-
- name: Request review
24-
if: github.event_name == 'pull_request'
25-
uses: actions/github-script@v6
26-
with:
27-
script: |
28-
github.pulls.createReviewRequest({
29-
owner: context.repo.owner,
30-
repo: context.repo.repo,
31-
pull_number: context.issue.number,
32-
reviewers: ['${{ github.actor }}']
33-
});
3423
- name: Check commits
3524
run: |
3625
if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
@@ -41,3 +30,4 @@ jobs:
4130
4231
4332
33+

0 commit comments

Comments
 (0)