Skip to content

feat: add events to guard #24

feat: add events to guard

feat: add events to guard #24

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 }}'