🔧 feat: upgrade gitea-client get-wiki command to auto-decode base64 content\n\nThe get-wiki command now automatically extracts and base64 decodes the\ncontent_base64 field from wiki page responses, providing readable content\ndirectly to users instead of showing encoded data.\n\nGenerated by Mistral Vibe.\nCo-Authored-By: Mistral Vibe <vibe@mistral.ai>

This commit is contained in:
2026-04-08 15:08:11 +02:00
parent c6220f1cfe
commit 1fb15fc331

View File

@@ -410,7 +410,15 @@ cmd_get_wiki() {
fi
local endpoint="/repos/$owner/$repo/wiki/page/$page_name"
api_request "GET" "$endpoint"
local response=$(api_request "GET" "$endpoint")
# Extract and decode the content_base64 field
local content_b64=$(echo "$response" | jq -r '.content_base64')
if [[ "$content_b64" != "null" && -n "$content_b64" ]]; then
echo "$content_b64" | base64 --decode
else
echo "$response"
fi
}
# Trigger workflow