File tree Expand file tree Collapse file tree 1 file changed +7
-29
lines changed Expand file tree Collapse file tree 1 file changed +7
-29
lines changed Original file line number Diff line number Diff line change 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
105jobs :
116 commitlint :
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
You can’t perform that action at this time.
0 commit comments