chore: Check that PR title matches conventional commit guidelines ♻️ (#459)

Co-authored-by: Josh McKinney <joshka@users.noreply.github.com>
This commit is contained in:
Dheepak Krishnamurthy 2023-09-01 22:56:40 -04:00 committed by GitHub
parent 878b6fc258
commit 47ae602df4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

21
.github/workflows/check-pr-title.yml vendored Normal file
View File

@ -0,0 +1,21 @@
name: Check PR Title
on:
pull_request:
types:
- opened
- synchronize
- reopened
- edited
jobs:
check-title:
runs-on: ubuntu-latest
steps:
- name: Check PR title
run: |
title="${{ github.event.pull_request.title }}"
if ! echo "$title" | grep -qE '^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\(\w+\))?!?: '; then
echo "error: PR title does not follow the Conventional Commits guidelines"
exit 1
fi