Skip to content

Commit

Permalink
Add GH action to check PR title
Browse files Browse the repository at this point in the history
  • Loading branch information
adamyeats committed Nov 27, 2024
1 parent 013bcef commit 53721ca
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
27 changes: 27 additions & 0 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Commitlint

on:
pull_request:
branches:
- main

jobs:
commitlint:
name: Check PR title conforms to @commitlint/config-conventional
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'yarn'

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Lint PR title
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: echo $PR_TITLE | yarn commitlint
1 change: 0 additions & 1 deletion .husky/commit-msg

This file was deleted.

0 comments on commit 53721ca

Please sign in to comment.