Skip to content

Commit

Permalink
ADD: pre-push hook && commit-msg
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniil-Oberlev committed Aug 23, 2024
1 parent 7673916 commit 72bca5d
Show file tree
Hide file tree
Showing 4 changed files with 1,651 additions and 1,489 deletions.
9 changes: 9 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

COMMIT_MSG=$(cat "$1")
if ! echo "$COMMIT_MSG" | grep -qE "^(FIX|ADD|FEAT|DOCS|STYLE|REFACTOR|TEST|CHORE): "; then
echo "Error: Commit message must start with one of the following prefixes:"
echo "FIX:, ADD:, FEAT:, DOCS:, STYLE:, REFACTOR:, TEST:, CHORE:"
exit 1
fi
4 changes: 4 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname "$0")/_/husky.sh"

npm test
2 changes: 1 addition & 1 deletion shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pkgs.mkShell {
if [ ! -d node_modules ]; then
echo "Installing npm dependencies..."
npm install
fi
fi
# Автоматический запуск проекта в режиме разработки
echo "Starting development server..."
Expand Down
Loading

0 comments on commit 72bca5d

Please sign in to comment.