feat: add events to guard #24
Workflow file for this run
This file contains 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: lint-pull-request | |
on: | |
pull_request: | |
types: ['opened', 'edited', 'reopened', 'synchronize'] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
- name: Install Dependencies | |
# yamllint disable rule:line-length | |
run: | | |
npm install @commitlint/config-conventional | |
echo "module.exports = {extends: ['@commitlint/config-conventional'], rules: { 'subject-case': [0,'always',['sentence-case']],'header-max-length': [2, 'always', 120], 'body-max-line-length': [0, 'always', 120] }};" > commitlint.config.js | |
# yamllint enable rule:line-length | |
- name: Lint the PR Title | |
run: | | |
echo "${PR_TITLE}" | npx --yes commitlint | |
env: | |
PR_TITLE: '${{ github.event.pull_request.title }}' |