Skip to content

Commit f652a49

Browse files
authored
Merge pull request #3 from qurami/bugfix-regex-branch-name
[bugfix] regex branch name
2 parents f125524 + e88cc0e commit f652a49

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/utils/utils.dart

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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)