File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 1- name : " Commit messages adheres to guidelines at https://goo.gl/p2fr5Q"
1+ name : " First commit message adheres to guidelines at https://goo.gl/p2fr5Q"
22
33on : [pull_request]
44
99 lint-commit-message :
1010 runs-on : ubuntu-latest
1111 steps :
12- - name : Compute number of commits in the PR
13- id : nb-of-commits
14- run : echo "::set-output name=nb::$((${{ github.event.pull_request.commits }} + 1))"
1512 - uses : actions/checkout@v2
1613 with :
17- fetch-depth : ${{ steps.nb-of-commits.outputs.nb }}
14+ fetch-depth : 2
1815 - name : Install Node.js
1916 uses : actions/setup-node@v2
2017 with :
2118 node-version : ${{ env.NODE_VERSION }}
22- - name : Validate commit messages
19+ - name : Validate commit message
2320 run : |
2421 echo "::add-matcher::.github/workflows/commit-lint-problem-matcher.json"
25- git log --oneline -${{ github.event.pull_request.commits }} HEAD^ | awk '{ if ($2 != "fixup!" && $2 != "squash!") { print $1 } }' | xargs npx -q core-validate-commit --no-validate-metadata --tap
22+ git rev-parse HEAD^ | xargs npx -q core-validate-commit --no-validate-metadata --tap
You can’t perform that action at this time.
0 commit comments