feat: check for squash commits

ref: N25B-241
This commit is contained in:
2025-11-03 15:29:06 +01:00
parent 360f601d00
commit cb5457b6be

View File

@@ -53,6 +53,14 @@ if grep -qE "$CHERRY_PICK_PATTERN" "$COMMIT_MSG_FILE"; then
exit 0
fi
# Check for Squash
# Example: "Squash commits ..."
SQUASH_PATTERN="^Squash .+"
if [[ "$HEADER" =~ $SQUASH_PATTERN ]]; then
echo -e "${GREEN}Squash commit detected by message content. Skipping validation.${NC}"
exit 0
fi
# --- Validation Functions ---
# Function to print an error message and exit