From 13ab908c9b4ff23ea2f8b809d675d154c359ebfc Mon Sep 17 00:00:00 2001 From: Abhiraj Roy <157954129+iconized@users.noreply.github.com> Date: Mon, 3 Jun 2024 03:46:35 +0530 Subject: [PATCH] :construction_worker: ci(add): valid conventional commit Signed-off-by: Abhiraj Roy <157954129+iconized@users.noreply.github.com> --- .github/workflows/commitizen.yml | 33 ++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/commitizen.yml diff --git a/.github/workflows/commitizen.yml b/.github/workflows/commitizen.yml new file mode 100644 index 0000000..9d6f8d1 --- /dev/null +++ b/.github/workflows/commitizen.yml @@ -0,0 +1,33 @@ +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 \ No newline at end of file