Skip to content

Commit

Permalink
chore: git hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
Jehoszafat Zimnowoda committed Jan 25, 2023
1 parent 1ce5033 commit f5fce16
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .husky/prepare-commit-msg
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#!/bin/bash
#!/bin/sh

exec < /dev/tty && npx cz --hook || true
# It takes one to two parameters.
# $1 - is a name of the file that contains the commit log message.
# $2 - is a string indicating the source of the commit message: "message|template|merge|squash|commit" or empty.

# Read more: https://git-scm.com/docs/githooks#_prepare_commit_msg

# Run interactive commitizen if git message is not set
[ -z "$2" ] && exec </dev/tty && npx cz --hook || true

0 comments on commit f5fce16

Please sign in to comment.