From 190f331d8a55b2793deb9b20ce35b5846b5b6a76 Mon Sep 17 00:00:00 2001 From: "Eshan Roy (Eshanized)" Date: Thu, 2 May 2024 21:40:23 +0530 Subject: [PATCH] feat: add pull as push --- .../workflows/snigdhaos-commitzen-on-pull.yml | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/snigdhaos-commitzen-on-pull.yml diff --git a/.github/workflows/snigdhaos-commitzen-on-pull.yml b/.github/workflows/snigdhaos-commitzen-on-pull.yml new file mode 100644 index 0000000..c80a671 --- /dev/null +++ b/.github/workflows/snigdhaos-commitzen-on-pull.yml @@ -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 \ No newline at end of file