feat: implement TorrentClaw Go API client v0.1.0
Some checks failed
CI / Test (push) Failing after 1s
CI / Test-1 (push) Failing after 1s
CI / Test-2 (push) Failing after 1s
CI / Lint (push) Failing after 1s
CI / Vet (push) Failing after 1s

This commit is contained in:
Deivid Soto 2026-03-28 11:28:48 +01:00
commit f6f24c2c3f
39 changed files with 5067 additions and 0 deletions

View file

@ -0,0 +1,37 @@
#!/bin/bash
# Validate commit message follows Conventional Commits format.
# Allowed types: feat, fix, docs, test, chore, refactor, ci, style, perf, build
#
# Valid examples:
# feat: add search by genre
# fix(client): handle nil response
# docs: update README
# feat!: breaking change in API
commit_msg_file="$1"
commit_msg=$(head -1 "$commit_msg_file")
# Allow merge commits
if echo "$commit_msg" | grep -qE '^Merge '; then
exit 0
fi
# Conventional Commits regex:
# type(optional-scope)optional-!: description
pattern='^(feat|fix|docs|test|chore|refactor|ci|style|perf|build)(\([a-zA-Z0-9_-]+\))?!?: .+'
if ! echo "$commit_msg" | grep -qE "$pattern"; then
echo "ERROR: Commit message does not follow Conventional Commits format."
echo ""
echo " Expected: <type>[optional scope]: <description>"
echo ""
echo " Allowed types: feat, fix, docs, test, chore, refactor, ci, style, perf, build"
echo ""
echo " Examples:"
echo " feat: add search by genre"
echo " fix(client): handle nil response body"
echo " docs: update API reference"
echo ""
echo " Your message: $commit_msg"
exit 1
fi