Skip to content

Commit

Permalink
Merge pull request #3 from qurami/bugfix-regex-branch-name
Browse files Browse the repository at this point in the history
[bugfix] regex branch name
  • Loading branch information
nank1ro authored Mar 23, 2023
2 parents f125524 + e88cc0e commit f652a49
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/utils/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class Utils {
...?additionalBranchNames,
];
// Matches all the words that preceed a `-` or `/` character.
final re = RegExp("r'^${supportedBranchNames.join('|')}[-/]");
final re = RegExp("^(${supportedBranchNames.join('|')})[-/]?");
final isBranchValid = re.hasMatch(branchName);
if (!isBranchValid) {
throw Exception(
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: git_hooks
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.
version: 1.0.4
version: 1.0.5
homepage: https://github.com/xuzhongpeng/git_hooks

environment:
Expand Down

0 comments on commit f652a49

Please sign in to comment.