Skip to content

Commit e88cc0e

Browse files
committed
[bugfix] regex branch name
1 parent f125524 commit e88cc0e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/utils/utils.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class Utils {
134134
...?additionalBranchNames,
135135
];
136136
// Matches all the words that preceed a `-` or `/` character.
137-
final re = RegExp("r'^${supportedBranchNames.join('|')}[-/]");
137+
final re = RegExp("^(${supportedBranchNames.join('|')})[-/]?");
138138
final isBranchValid = re.hasMatch(branchName);
139139
if (!isBranchValid) {
140140
throw Exception(

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: git_hooks
22
description: Using dart to prevents bad commit or push (git hooks, pre-commit/precommit, pre-push/prepush, post-merge/postmerge and all that stuff...).It is similar to husky.
3-
version: 1.0.4
3+
version: 1.0.5
44
homepage: https://github.com/xuzhongpeng/git_hooks
55

66
environment:

0 commit comments

Comments
 (0)