Skip to content

Commit

Permalink
feat(husky): add DAO settings in hook
Browse files Browse the repository at this point in the history
  • Loading branch information
vinayakkulkarni committed Jul 5, 2022
1 parent 1858cb7 commit 575dc51
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

NAME=$(git config user.name)
EMAIL=$(git config user.email)

if [ -z "$NAME" ]; then
echo "empty git config user.name"
exit 1
fi

if [ -z "$EMAIL" ]; then
echo "empty git config user.email"
exit 1
fi

git interpret-trailers --if-exists doNothing --trailer \
"Signed-off-by: $NAME <$EMAIL>" \
--in-place "$1"

npm exec --no -- commitlint --edit $1

0 comments on commit 575dc51

Please sign in to comment.