Skip to content

Commit

Permalink
fix: add .githooks
Browse files Browse the repository at this point in the history
Signed-off-by: Mauricio Robayo <[email protected]>
  • Loading branch information
MauricioRobayo committed Apr 3, 2021
1 parent c3ae8bf commit a07e388
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .githooks/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

npx --no-install commitlint --edit $1

test "" = "$(grep '^Signed-off-by: ' "$1" |
sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || {
echo >&2 Duplicate Signed-off-by lines.
exit 1
}
3 changes: 3 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

npx --no-install lint-staged

0 comments on commit a07e388

Please sign in to comment.