We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 50ce68c + 735580b commit 114a17eCopy full SHA for 114a17e
.husky/pre-push
@@ -1,6 +1,14 @@
1
#!/bin/sh
2
+. "$(dirname "$0")/_/husky.sh"
3
4
export NVM_DIR="$HOME/.nvm"
5
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
6
-npx branch-name-lint .branchlintrc
7
+BRANCH_NAME=$(git symbolic-ref --short HEAD)
8
+REGEX='^(renovate|feature|bugfix|hotfix|release|chore)\/[a-z0-9\-]+$'
9
+
10
+if ! [[ $BRANCH_NAME =~ $REGEX ]]; then
11
+ echo "Invalid branch name: $BRANCH_NAME" // EN: "Invalid branch name: $BRANCH_NAME"
12
+ echo "Branch names must follow the pattern: e.g. feature/my-feature"
13
+ exit 1
14
+fi
0 commit comments