refactor(check): check for commtizen on push and pull + CODEOWNERS

This commit is contained in:
Eshan Roy (Eshanized)
2024-05-19 04:02:29 +05:30
parent 1b03fa567c
commit adf4d7e212
2 changed files with 36 additions and 0 deletions

3
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1,3 @@
# https://help.github.com/articles/about-codeowners/
* @eshanized

33
.github/workflows/commitizen.yml vendored Normal file
View File

@@ -0,0 +1,33 @@
name: Commitizen Check on Push and Pull
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
commitizen_check:
name: Check Commitizen Commit on Push
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