Skip to main content
Glama

IT Tools MCP Server

commit-msg•2.53 kB
#!/bin/bash # Git commit-msg hook to validate conventional commit format # This enforces the commit message format for automated versioning commit_regex='^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert|major|feature|bug|hotfix)(\([a-z0-9-]+\))?!?:[[:space:]].+|^BREAKING CHANGE:[[:space:]].+' error_msg=" āŒ Invalid commit message format! Your commit message must follow the Conventional Commits specification: <type>[optional scope]: <description> Valid types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert, major, feature, bug, hotfix Version bumping (automatic): šŸ”“ MAJOR: feat!, major:, BREAKING CHANGE: 🟔 MINOR: feat: 🟢 PATCH: fix:, docs:, style:, refactor:, perf:, test:, build:, ci:, chore: ⚪ NONE: revert:, feature:, bug:, hotfix: Examples: āœ… feat: add new password generator tool (minor bump) āœ… fix: resolve base64 encoding issue (patch bump) āœ… docs: update README examples (patch bump) āœ… feat!: change API structure (major bump) āœ… revert: undo previous feature (no bump) For more info, see: COMMIT_TEMPLATE_SETUP.md " # Read the commit message commit_message=$(cat "$1") # Skip merge commits and revert commits with standard format if echo "$commit_message" | grep -qE "^(Merge|Revert)"; then exit 0 fi # Skip automated version bump commits if echo "$commit_message" | grep -qE "^chore: bump version to v[0-9]+\.[0-9]+\.[0-9]+$"; then exit 0 fi # Validate the commit message format if ! echo "$commit_message" | grep -qE "$commit_regex"; then echo "$error_msg" >&2 echo "Your commit message:" >&2 echo " $commit_message" >&2 exit 1 fi # Additional check for BREAKING CHANGE in footer if echo "$commit_message" | grep -qE "BREAKING CHANGE:"; then echo "āœ… Breaking change detected - will trigger MAJOR version bump" elif echo "$commit_message" | grep -qE "^(feat!|major):"; then echo "āœ… Major change detected - will trigger MAJOR version bump" elif echo "$commit_message" | grep -qE "^feat:"; then echo "āœ… Feature detected - will trigger MINOR version bump" elif echo "$commit_message" | grep -qE "^(fix|docs|style|refactor|perf|test|build|ci|chore):"; then echo "āœ… Patch change detected - will trigger PATCH version bump" elif echo "$commit_message" | grep -qE "!:"; then echo "āœ… Breaking change detected - will trigger MAJOR version bump" else echo "āœ… No version bump - commit type not recognized for versioning" fi exit 0

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wrenchpilot/it-tools-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server