Skip to content

Commit

Permalink
chore: Check that PR title matches conventional commit guidelines ♻️ (#…
Browse files Browse the repository at this point in the history
…459)

Co-authored-by: Josh McKinney <[email protected]>
  • Loading branch information
kdheepak and joshka authored Sep 2, 2023
1 parent 878b6fc commit 47ae602
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/check-pr-title.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 47ae602

Please sign in to comment.