mirror of
https://github.com/Snigdha-OS/snigdhaos-assets.git
synced 2025-09-22 20:45:01 +02:00
🐞 fix(alt): remove npm
This commit is contained in:
38
.github/workflows/commitizen.yml
vendored
38
.github/workflows/commitizen.yml
vendored
@@ -1,27 +1,35 @@
|
|||||||
name: Conventional Commit Check
|
name: Check Conventional Commit
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master # Adjust to match your main branch name
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-commits:
|
check-commit-message:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Set up Node.js
|
- name: Check Conventional Commit
|
||||||
uses: actions/setup-node@v2
|
run: |
|
||||||
with:
|
# Define the conventional commit types with emojis
|
||||||
node-version: '16'
|
TYPES=("🎉 feat" "🐞 fix" "📚 docs" "💅 style" "🔨 refactor" "⚡️ perf" "🧪 test" "🛠️ build" "🤖 ci" "🧹 chore" "⏪️ revert")
|
||||||
|
|
||||||
- name: Install dependencies
|
# Extract the commit type and emoji from the commit message
|
||||||
run: npm install # Ensure to have npm dependencies set up
|
COMMIT_MSG=$(git log --format=%B -n 1)
|
||||||
|
for type in "${TYPES[@]}"; do
|
||||||
|
type_emoji=${type}
|
||||||
|
type=${type_emoji#* }
|
||||||
|
emoji=${type_emoji% *}
|
||||||
|
if [[ $COMMIT_MSG == $emoji* ]]; then
|
||||||
|
echo "Commit message is a conventional commit"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
- name: Run commit script
|
# If we reach here, the commit message is not a conventional commit
|
||||||
run: bash ./push.sh
|
echo "Commit message is not a conventional commit"
|
||||||
|
exit 1
|
||||||
# You can add additional steps here for testing, linting, etc.
|
|
Reference in New Issue
Block a user