Skip to content

Commit d2c0c58

Browse files
authored
Merge pull request #17 from hepear/develop
feat:change prlint
2 parents e176196 + 2abeef0 commit d2c0c58

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

.github/workflows/commitlint.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
name: Commitlint
1+
name: PRlint
22

33
on:
44
push:
5-
branches-ignore: ["main"] # 排除 main 分支的 push 事件
6-
pull_request: # 修正为 pull_request
7-
# main 分支的 pull request 事件也会运行
5+
branches: ["main"] # 监听 main 分支的 push 事件
6+
pull_request:
7+
branches: ["main"] # 监听向 main 分支发起的 pull request
88
workflow_dispatch:
99

1010
jobs:
@@ -16,7 +16,7 @@ jobs:
1616
fetch-depth: 0
1717
- uses: actions/setup-node@v3
1818
with:
19-
node-version: '16' # 使用一个稳定的 Node.js 版本,比如 16
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
@@ -27,7 +27,3 @@ jobs:
2727
else
2828
commitlint --from $(git rev-list --max-parents=0 HEAD) --to HEAD --verbose
2929
fi
30-
31-
32-
33-

0 commit comments

Comments
 (0)