File tree Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ name: Commitlint
3
3
on :
4
4
push :
5
5
branches-ignore : ["main"] # 排除 main 分支的 push 事件
6
- pull_request :
6
+ pull_request : # 修正为 pull_request
7
7
# main 分支的 pull request 事件也会运行
8
8
workflow_dispatch :
9
9
@@ -16,21 +16,10 @@ jobs:
16
16
fetch-depth : 0
17
17
- uses : actions/setup-node@v3
18
18
with :
19
- node-version : ' 20 '
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
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
- });
34
23
- name : Check commits
35
24
run : |
36
25
if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
41
30
42
31
43
32
33
+
You can’t perform that action at this time.
0 commit comments