Skip to content

Commit

Permalink
feat(workflows): add commitizen validation on pull request
Browse files Browse the repository at this point in the history
  • Loading branch information
eshanized committed May 2, 2024
1 parent 5a94d38 commit 74af07e
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/snigdhaos-commitzen-on-pull.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Snigdha OS Commitizen Check On Pull

on:
pull_request:
branches:
- master

jobs:
commitizen_check:
name: Check Commitizen Commit on Pull Request
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: '14'

- name: Install Commitizen
run: npm install -g commitizen

- name: Verify Commitizen Commit
run: |
if git log --format='%s' ${{ github.event.before }}..${{ github.sha }} | grep -v '^(feat|fix|docs|style|refactor|perf|test|chore)(\(.+\))?: .+'; then
echo "Invalid commit message found. Please use Commitizen convention."
exit 1
fi

0 comments on commit 74af07e

Please sign in to comment.