Skip to content

Commit f4a8791

Browse files
authored
Merge pull request #12 from e-dialect/Norton-Lin-patch-2
fix: fix commitlint download error
2 parents 6863ba1 + 13972a6 commit f4a8791

File tree

1 file changed

+7
-29
lines changed

1 file changed

+7
-29
lines changed

.github/workflows/pr.yml

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
1-
name: Pull Request Checker
2-
on:
3-
pull_request:
4-
branches:
5-
- main
1+
name: Commitlint
62

7-
permissions:
8-
pull-requests: read
3+
on: [pull_request]
94

105
jobs:
116
commitlint:
@@ -14,26 +9,9 @@ jobs:
149
- uses: actions/checkout@v3
1510
with:
1611
fetch-depth: 0
17-
- uses: actions/setup-node@v2
12+
- uses: actions/setup-node@v3
1813
with:
19-
node-version: '14'
20-
- run: npm install
21-
- run: |
22-
npm install --save-dev @commitlint/config-angular @commitlint/cli
23-
echo "module.exports = {extends: ['@commitlint/config-angular']};" > commitlint.config.js
24-
25-
# Run the commitlint action, considering its own dependencies and yours as well 🚀
26-
# `github.workspace` is the path to your repository.
27-
- uses: wagoid/commitlint-github-action@v5
28-
env:
29-
NODE_PATH: ${{ github.workspace }}/node_modules
30-
with:
31-
helpURL: 'https://github.com/FrogDar/code-contributing-practice/blob/main/CONTRIBUTING.md'
32-
33-
# check if the PR close an issue in PR body
34-
- name: Check if the PR close an issue in PR body
35-
run: |
36-
if ! echo "${{ github.event.pull_request.body }}" | grep -q "close" ; then
37-
echo "No issue closed in the PR body. Please add a line like 'close #123' to the PR body."
38-
exit 1
39-
fi
14+
node-version: '16'
15+
- run: npm install -g @commitlint/cli @commitlint/config-conventional
16+
- run: echo "module.exports = {extends: ['@commitlint/config-conventional']}" > commitlint.config.js
17+
- run: commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose

0 commit comments

Comments
 (0)