Skip to content

Commit

Permalink
Merge pull request #328 from StephenMcConnel/ImproveBloomPlayerCommit…
Browse files Browse the repository at this point in the history
…Hook-20240925

chore: Tighten up the check in the commit message hook (20240925)
  • Loading branch information
andrew-polk authored Sep 26, 2024
2 parents ea91be6 + d0e8afc commit 37052d7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
# Read the commit message from the file passed as an argument
COMMIT_MSG=$(cat "$1")

# Check if the commit message contains a colon.
# This is a super basic validation and could certainly be improved.
if ! echo "$COMMIT_MSG" | grep -q ":"; then
# Check if the commit message starts with an expected keyword followed by a colon.
if ! echo "$COMMIT_MSG" | grep -q "^\(fix\|feat\|chore\):"; then
echo "Improper commit message for semantic-release."
echo "Please use the format 'type: message'"
echo "e.g. chore: Updated README"
Expand Down

0 comments on commit 37052d7

Please sign in to comment.