Skip to content

Commit

Permalink
fix: Allow punctuations in tag:
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmubashshir committed May 15, 2023
1 parent cff1a71 commit b0c60d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ validate_commit_message() {

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

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

0 comments on commit b0c60d7

Please sign in to comment.