Skip to content

feat(ci): add PR title validation to prevent invalid merge commits #3

feat(ci): add PR title validation to prevent invalid merge commits

feat(ci): add PR title validation to prevent invalid merge commits #3

Workflow file for this run

name: PR Title Lint
on:
pull_request:
types: [opened, synchronize, reopened, edited]
jobs:
lint-title:
name: Lint PR Title
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install commitlint
run: npm install --save-dev @commitlint/cli @commitlint/config-conventional
- name: PR title linting
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: echo "$PR_TITLE" | npx commitlint --config ./commitlint.config.js