Skip to content
This repository has been archived by the owner on Jan 1, 2025. It is now read-only.

add conventional commit message for github. #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/commitizen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: EZCommits Check on Push and Pull

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
commitizen_check:
name: Check EZCommits 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|wip|ci)(\(.+\))?: .+'; then
echo "Invalid commit message found. Please use Commitizen convention."
exit 1
fi
iconized marked this conversation as resolved.
Show resolved Hide resolved

13 changes: 13 additions & 0 deletions iconfig.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

# Setup Git Credentials

# Git Credential
username="Abhiraj Roy"
useremail="157954129+iconized@users.noreply.github.com"

# Git Config
git config --global user.name "$username"
git config --global user.email "$useremail"

echo -e "\033[0;32mSuccessfully Setup Git Credentials :)"