fix: fix commitlint download error #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Pull Request Checker | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: | |
| pull-requests: read | |
| jobs: | |
| commitlint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v2 | |
| with: | |
| node-version: '14' | |
| - run: npm install | |
| - run: | | |
| npm install --save-dev @commitlint/config-angular @commitlint/cli | |
| echo "module.exports = {extends: ['@commitlint/config-angular']};" > commitlint.config.js | |
| - run: npx commitlint --from=HEAD~1 --to=HEAD --verbose | |
| - name: Check if the PR close an issue in PR body | |
| run: | | |
| if ! echo "${{ github.event.pull_request.body }}" | grep -q "close" ; then | |
| echo "No issue closed in the PR body. Please add a line like 'close #123' to the PR body." | |
| exit 1 | |
| fi |