We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/DollhouseMCP/DollhouseMCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
#!/bin/bash
# GitFlow Guardian - Pre-commit Hook
# Prevents direct commits to protected branches and enforces GitFlow
# Get the directory where this hook is located
HOOK_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Load configuration if it exists
CONFIG_FILE="$HOOK_DIR/config"
if [ -f "$CONFIG_FILE" ]; then
source "$CONFIG_FILE"
else
# Default configuration if config file doesn't exist
PROTECTED_BRANCHES=("main" "master" "develop")
ALLOWED_PREFIXES=("feature" "fix" "bugfix" "hotfix" "release" "support" "docs" "test" "chore" "refactor")
MIN_NAME_LENGTH=1
USE_COLORS=true
ENABLE_COMMIT_PROTECTION=true
fi
# Exit early if protection is disabled
if [ "$ENABLE_COMMIT_PROTECTION" != "true" ]; then
exit 0
fi
# Colors for output (only if enabled)
if [ "$USE_COLORS" = "true" ]; then
RED='\033[0;31m'
YELLOW='\033[1;33m'
GREEN='\033[0;32m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
else
RED=''
YELLOW=''
GREEN=''
BLUE=''
NC=''
fi
# Get current branch name
BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null)
# Check if we're on a protected branch
IS_PROTECTED=false
for protected_branch in "${PROTECTED_BRANCHES[@]}"; do
if [[ "$BRANCH" == "$protected_branch" ]]; then
IS_PROTECTED=true
break
fi
done
if [ "$IS_PROTECTED" = "true" ]; then
echo -e "${RED}╔════════════════════════════════════════════════════════════════╗${NC}"
echo -e "${RED}║ 🚨 GITFLOW VIOLATION DETECTED 🚨 ║${NC}"
echo -e "${RED}╠════════════════════════════════════════════════════════════════╣${NC}"
echo -e "${RED}║ ║${NC}"
echo -e "${RED}║ You are attempting to commit directly to: ${YELLOW}$BRANCH${RED} ║${NC}"
echo -e "${RED}║ ║${NC}"
echo -e "${RED}║ This violates GitFlow best practices! ║${NC}"
echo -e "${RED}║ ║${NC}"
echo -e "${RED}╠════════════════════════════════════════════════════════════════╣${NC}"
echo -e "${RED}║ ║${NC}"
echo -e "${RED}║ ${YELLOW}What you should do instead:${RED} ║${NC}"
echo -e "${RED}║ ║${NC}"
echo -e "${RED}║ 1. Create a feature branch: ║${NC}"
echo -e "${RED}║ ${GREEN}git checkout -b feature/your-feature-name${RED} ║${NC}"
echo -e "${RED}║ ║${NC}"
echo -e "${RED}║ 2. Or a fix branch: ║${NC}"
echo -e "${RED}║ ${GREEN}git checkout -b fix/your-fix-description${RED} ║${NC}"
echo -e "${RED}║ ║${NC}"
echo -e "${RED}║ 3. Commit your changes there ║${NC}"
echo -e "${RED}║ ║${NC}"
echo -e "${RED}║ 4. Push and create a Pull Request ║${NC}"
echo -e "${RED}║ ║${NC}"
echo -e "${RED}╠════════════════════════════════════════════════════════════════╣${NC}"
echo -e "${RED}║ ║${NC}"
echo -e "${RED}║ ${YELLOW}If you REALLY need to commit here (emergency only):${RED} ║${NC}"
echo -e "${RED}║ ║${NC}"
echo -e "${RED}║ Use --no-verify flag: ║${NC}"
echo -e "${RED}║ ${BLUE}git commit --no-verify -m \"Emergency: reason\"${RED} ║${NC}"
echo -e "${RED}║ ║${NC}"
echo -e "${RED}║ ⚠️ This should be rare and documented! ║${NC}"
echo -e "${RED}║ ║${NC}"
echo -e "${RED}╚════════════════════════════════════════════════════════════════╝${NC}"
echo ""
echo -e "${YELLOW}Commit aborted. Please use a feature branch.${NC}"
exit 1
fi
# Build regex pattern from allowed prefixes
PREFIX_PATTERN=$(IFS='|'; echo "${ALLOWED_PREFIXES[*]}")
# Check if branch follows GitFlow naming convention
if [[ ! "$BRANCH" =~ ^($PREFIX_PATTERN)/.{$MIN_NAME_LENGTH,} ]]; then
echo -e "${YELLOW}╔════════════════════════════════════════════════════════════════╗${NC}"
echo -e "${YELLOW}║ ⚠️ GITFLOW WARNING ⚠️ ║${NC}"
echo -e "${YELLOW}╠════════════════════════════════════════════════════════════════╣${NC}"
echo -e "${YELLOW}║ ║${NC}"
echo -e "${YELLOW}║ Current branch: ${BLUE}$BRANCH${YELLOW} ║${NC}"
echo -e "${YELLOW}║ ║${NC}"
echo -e "${YELLOW}║ This branch doesn't follow GitFlow naming conventions. ║${NC}"
echo -e "${YELLOW}║ ║${NC}"
echo -e "${YELLOW}║ Recommended prefixes: ║${NC}"
echo -e "${YELLOW}║ • feature/ - New features ║${NC}"
echo -e "${YELLOW}║ • fix/ - Bug fixes ║${NC}"
echo -e "${YELLOW}║ • hotfix/ - Urgent production fixes ║${NC}"
echo -e "${YELLOW}║ • release/ - Release preparation ║${NC}"
echo -e "${YELLOW}║ • docs/ - Documentation only ║${NC}"
echo -e "${YELLOW}║ • test/ - Test additions/fixes ║${NC}"
echo -e "${YELLOW}║ • chore/ - Maintenance tasks ║${NC}"
echo -e "${YELLOW}║ ║${NC}"
echo -e "${YELLOW}╚════════════════════════════════════════════════════════════════╝${NC}"
echo ""
echo -e "${GREEN}Proceeding with commit (non-standard branch name)...${NC}"
fi
# If we get here, the commit is allowed
echo -e "${GREEN}✅ GitFlow check passed. Branch '$BRANCH' is valid for direct commits.${NC}"