restructure: flatten scripts dirs, remove roster, update SKILL.md

This commit is contained in:
lyn
2026-03-25 07:30:09 +00:00
parent b9785b6295
commit d358abf1ce
19 changed files with 62 additions and 92 deletions

View File

@@ -0,0 +1,28 @@
#!/usr/bin/env bash
set -euo pipefail
GIT_URL="https://git.hangman-lab.top"
USER="$(secret-mgr get-username --key git)"
PASS="$(secret-mgr get-secret --key git)"
if [[ -z "$USER" || -z "$PASS" ]]; then
echo "Missing credentials from secret-mgr (key: git)"
exit 2
fi
response=$(curl -s -w "%{http_code}" -u "$USER:$PASS" "$GIT_URL/api/v1/user")
http_code="${response: -3}"
body="${response:0:-3}"
if [[ "$http_code" == "200" ]]; then
echo "OK"
exit 0
elif [[ "$http_code" == "401" ]]; then
echo "AUTH FAILED"
exit 1
else
echo "ERROR: HTTP $http_code"
echo "$body"
exit 1
fi