Skip to content

Commit

Permalink
✨ Allow git msg to contain external issue instead of local issue #1
Browse files Browse the repository at this point in the history
  • Loading branch information
D1no committed Mar 16, 2023
1 parent 6d47b4d commit cb15740
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion platform/_tooling/.husky/commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ message="$(cat $1)"
# POSIX Regex:
# Have a space followed by a hash, digits and a space or end of line
githubIssuePattern=" #[0-9]+($| )"
if ! [[ $message =~ $githubIssuePattern ]];
githubIssueUrlPattern="issues/[0-9]+"
if ! [[ $message =~ $githubIssuePattern || $message =~ $githubIssueUrlPattern ]];
then
echo "-"
echo "=== Error: Commit message has no associated Github Issue ==="
Expand Down

0 comments on commit cb15740

Please sign in to comment.