Skip to content

Commit 60f7e57

Browse files
committed
ci:update commitlint,
1 parent d526994 commit 60f7e57

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/commitlint.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches-ignore: ["main"] # 排除 main 分支的 push 事件
66
pull_request:
7-
# 移除对 main 分支的排除,使其在 main 分支的 pull request 事件中也能运行
7+
# main 分支的 pull request 事件也会运行
88
workflow_dispatch:
99

1010
jobs:
@@ -25,18 +25,19 @@ jobs:
2525
uses: actions/github-script@v6
2626
with:
2727
script: |
28-
const { github, context } = require('@actions/github');
2928
github.pulls.createReviewRequest({
3029
owner: context.repo.owner,
3130
repo: context.repo.repo,
3231
pull_number: context.issue.number,
33-
reviewers: ['${{ github.actor }}']
32+
reviewers: ['${{ github.actor }}']
3433
});
3534
- name: Check commits
3635
run: |
3736
if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
38-
commitlint --from ${{ github.event.pull_request.base.sha }} --to${{ github.event.pull_request.head.sha }} --verbose
37+
commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
3938
else
4039
commitlint --from $(git rev-list --max-parents=0 HEAD) --to HEAD --verbose
4140
fi
4241
42+
43+

0 commit comments

Comments
 (0)