Skip to content

Commit e365a99

Browse files
committed
fix: Allow punctuations in tag:
1 parent 7fe2b39 commit e365a99

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hook.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ validate_commit_message() {
214214

215215
# capture the subject, and remove the 'squash! ', 'tag: ', '[tag] ' or '{tag} ' prefix if present
216216
shopt -s extglob
217-
COMMIT_SUBJECT=${COMMIT_MSG_LINES[0]/#@(+([[:alnum:]])?(\(+([[:alnum:]])\)):|\[+([[:alnum:][:punct:]])\]|\{+([[:alnum:][:punct:]])\}|squash\!) /}
217+
COMMIT_SUBJECT=${COMMIT_MSG_LINES[0]/#@(+([[:alnum:][:punct:]])?(\(+([[:alnum:][:punct:]])\)):|\[+([[:alnum:][:punct:]])\]|\{+([[:alnum:][:punct:]])\}|squash\!) /}
218218
shopt -u extglob
219219

220220
# if the commit is empty there's nothing to validate, we can return here

0 commit comments

Comments
 (0)