File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change 1
- name : Commitlint
1
+ name : PRlint
2
2
3
3
on :
4
4
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
8
8
workflow_dispatch :
9
9
10
10
jobs :
16
16
fetch-depth : 0
17
17
- uses : actions/setup-node@v3
18
18
with :
19
- node-version : ' 16' # 使用一个稳定的 Node.js 版本,比如 16
19
+ node-version : ' 16' # 使用稳定的 Node.js 版本,比如 16
20
20
- run : npm install -g @commitlint/cli @commitlint/config-conventional
21
21
- run : |
22
22
echo "module.exports = {extends: ['@commitlint/config-conventional']}" > commitlint.config.js
27
27
else
28
28
commitlint --from $(git rev-list --max-parents=0 HEAD) --to HEAD --verbose
29
29
fi
30
-
31
-
32
-
33
-
You can’t perform that action at this time.
0 commit comments