prepare_dcosignoff
Signed-off-by: RONAK <codeitronak226277@gmail.com>
This commit is contained in:
parent
bad5ca3fc3
commit
058428486a
|
@ -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
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue