diff --git a/.github/workflows/restrict-push.yml b/.github/workflows/restrict-push.yml new file mode 100644 index 0000000..cbf7f85 --- /dev/null +++ b/.github/workflows/restrict-push.yml @@ -0,0 +1,16 @@ +name: Restrict direct pushes + +on: + push: + branches: + - main + - develop + +jobs: + block_direct_push: + runs-on: ubuntu-latest + steps: + - name: Fail if direct push + run: | + echo "❌ Direct push to 'main' or 'develop' branch is not allowed. Please use a pull request." + exit 1 diff --git a/.husky/commit-msg b/.husky/commit-msg deleted file mode 100755 index 965f4a5..0000000 --- a/.husky/commit-msg +++ /dev/null @@ -1 +0,0 @@ -npx gitmoji --hook diff --git a/package.json b/package.json index c5349f8..7d8094e 100644 --- a/package.json +++ b/package.json @@ -7,8 +7,7 @@ "dev": "vite", "build": "tsc -b && vite build", "lint": "eslint .", - "preview": "vite preview", - "prepare": "husky" + "preview": "vite preview" }, "dependencies": { "@tanstack/react-query": "4", @@ -28,7 +27,6 @@ "eslint-plugin-react-hooks": "^5.0.0", "eslint-plugin-react-refresh": "^0.4.14", "globals": "^15.12.0", - "husky": "^9.1.7", "typescript": "~5.6.2", "typescript-eslint": "^8.15.0", "vite": "^6.0.1"