prepare_dcosignoff

Signed-off-by: RONAK <codeitronak226277@gmail.com>
This commit is contained in:
RONAK 2025-05-22 22:45:21 +05:30
parent bad5ca3fc3
commit 058428486a
2 changed files with 21 additions and 1 deletions

19
.husky/prepare-commit-msg Normal file
View File

@ -0,0 +1,19 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
# Check if the commit is a merge or squash, and skip
case "$2" in
merge|squash) exit 0 ;;
esac
# Check if the sign-off exists
if ! grep -q "^Signed-off-by: " "$1"; then
echo ""
echo "Commit rejected: missing 'Signed-off-by' line."
echo "To sign off your commit, use:"
echo " git commit --signoff"
echo ""
echo "Alternatively, set up Git to always sign off:"
echo " git config --global commit.signoff true"
exit 1
fi

View File

@ -13,7 +13,8 @@
"format": "prettier --write .",
"format:check": "prettier --check .",
"test:frontend": "npm run test -w frontend",
"test:backend": "npm run test -w backend"
"test:backend": "npm run test -w backend",
"prepare":"husky install"
},
"lint-staged": {
"**/*.{js,jsx,ts,tsx,json,md}": "prettier --write"